@atlaskit/smart-card 31.0.1 → 31.0.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 +15 -0
- package/dist/cjs/state/actions/index.js +4 -12
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +0 -23
- package/dist/cjs/utils/analytics/analytics.js +54 -76
- package/dist/cjs/utils/analytics/index.js +0 -6
- package/dist/cjs/view/BlockCard/components/Provider.js +3 -1
- package/dist/cjs/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Metadata.js +1 -0
- package/dist/cjs/view/common/stop-propagation/index.js +7 -4
- package/dist/es2019/state/actions/index.js +4 -12
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +1 -24
- package/dist/es2019/utils/analytics/analytics.js +1 -23
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +3 -1
- package/dist/es2019/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Metadata.js +1 -0
- package/dist/es2019/view/common/stop-propagation/index.js +7 -4
- package/dist/esm/state/actions/index.js +4 -12
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +1 -24
- package/dist/esm/utils/analytics/analytics.js +53 -75
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/view/BlockCard/components/Provider.js +3 -1
- package/dist/esm/view/EmbedCard/components/IFrame.js +1 -0
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +12 -8
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Metadata.js +1 -0
- package/dist/esm/view/common/stop-propagation/index.js +7 -4
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +1 -9
- package/dist/types/state/hooks/useSmartLink.d.ts +0 -1
- package/dist/types/utils/analytics/analytics.d.ts +1 -5
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/analytics/types.d.ts +0 -4
- package/dist/types/utils/mocks.d.ts +0 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +1 -9
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +1 -5
- package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -4
- package/dist/types-ts4.5/utils/mocks.d.ts +0 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 31.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169708](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169708)
|
|
8
|
+
[`17cabe50b6e6b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/17cabe50b6e6b) -
|
|
9
|
+
Remove FF platform_smart-card-migrate-screen-analytics
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 31.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 31.0.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _react = require("react");
|
|
|
11
11
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
12
12
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
13
13
|
var _outboundAuthFlowClient = require("@atlaskit/outbound-auth-flow-client");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _constants = require("../../constants");
|
|
17
16
|
var _helpers = require("../helpers");
|
|
@@ -120,16 +119,9 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
120
119
|
});
|
|
121
120
|
}
|
|
122
121
|
if (services.length > 0) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
});
|
|
127
|
-
} else {
|
|
128
|
-
analytics.screen.authPopupEvent({
|
|
129
|
-
definitionId: definitionId,
|
|
130
|
-
extensionKey: extensionKey
|
|
131
|
-
});
|
|
132
|
-
}
|
|
122
|
+
fireEvent('screen.consentModal.viewed', {
|
|
123
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
124
|
+
});
|
|
133
125
|
(0, _outboundAuthFlowClient.auth)(services[0].url).then(function () {
|
|
134
126
|
fireEvent('track.applicationAccount.connected', {
|
|
135
127
|
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
@@ -157,7 +149,7 @@ var useSmartCardActions = exports.useSmartCardActions = function useSmartCardAct
|
|
|
157
149
|
reload();
|
|
158
150
|
});
|
|
159
151
|
}
|
|
160
|
-
}, [getSmartLinkState, analytics.ui, analytics.
|
|
152
|
+
}, [getSmartLinkState, analytics.ui, analytics.operational, id, reload, fireEvent]);
|
|
161
153
|
var invoke = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
162
154
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(opts, appearance) {
|
|
163
155
|
var key, action, source;
|
|
@@ -643,29 +643,6 @@ var useSmartLinkAnalytics = exports.useSmartLinkAnalytics = function useSmartLin
|
|
|
643
643
|
/** Contains all screen analytics events */
|
|
644
644
|
var screen = (0, _react.useMemo)(function () {
|
|
645
645
|
return {
|
|
646
|
-
/**
|
|
647
|
-
* This fires an event which represents the connect account page being opened.
|
|
648
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
649
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
650
|
-
* @returns
|
|
651
|
-
* @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
|
|
652
|
-
*/
|
|
653
|
-
authPopupEvent: function authPopupEvent(_ref17) {
|
|
654
|
-
var extensionKey = _ref17.extensionKey,
|
|
655
|
-
definitionId = _ref17.definitionId,
|
|
656
|
-
resourceType = _ref17.resourceType,
|
|
657
|
-
destinationProduct = _ref17.destinationProduct,
|
|
658
|
-
destinationSubproduct = _ref17.destinationSubproduct,
|
|
659
|
-
location = _ref17.location;
|
|
660
|
-
return dispatchAnalytics(applyCommonAttributes((0, _analytics.screenAuthPopupEvent)(_objectSpread(_objectSpread({}, commonAttributes), {}, {
|
|
661
|
-
extensionKey: extensionKey,
|
|
662
|
-
definitionId: definitionId,
|
|
663
|
-
resourceType: resourceType,
|
|
664
|
-
destinationProduct: destinationProduct,
|
|
665
|
-
destinationSubproduct: destinationSubproduct,
|
|
666
|
-
location: location
|
|
667
|
-
})), commonAttributes));
|
|
668
|
-
},
|
|
669
646
|
/**
|
|
670
647
|
* This fires an event that represents when a user view a modal.
|
|
671
648
|
* @param data A partial analytics event payload
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.
|
|
7
|
+
exports.unresolvedEvent = exports.uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusLozengeButtonClicked = exports.uiSmartLinkStatusListItemButtonClicked = exports.uiServerActionClicked = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.TrackQuickActionType = exports.TrackQuickActionFailureReason = exports.SmartLinkEvents = exports.SmartLinkActionTypeUiEventMapper = exports.SmartLinkActionTypeTrackingEventMapper = exports.ANALYTICS_CHANNEL = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -17,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
17
17
|
var context = exports.context = {
|
|
18
18
|
componentName: 'smart-cards',
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "31.0.
|
|
20
|
+
packageVersion: "31.0.3"
|
|
21
21
|
};
|
|
22
22
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
23
23
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -327,81 +327,87 @@ var uiClosedAuthEvent = exports.uiClosedAuthEvent = function uiClosedAuthEvent(_
|
|
|
327
327
|
})
|
|
328
328
|
};
|
|
329
329
|
};
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
var screenAuthPopupEvent = exports.screenAuthPopupEvent = function screenAuthPopupEvent(_ref11) {
|
|
335
|
-
var extensionKey = _ref11.extensionKey,
|
|
330
|
+
var uiRenderSuccessEvent = exports.uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref11) {
|
|
331
|
+
var display = _ref11.display,
|
|
332
|
+
status = _ref11.status,
|
|
333
|
+
extensionKey = _ref11.extensionKey,
|
|
336
334
|
definitionId = _ref11.definitionId,
|
|
337
335
|
destinationProduct = _ref11.destinationProduct,
|
|
338
336
|
destinationSubproduct = _ref11.destinationSubproduct,
|
|
339
|
-
location = _ref11.location
|
|
337
|
+
location = _ref11.location,
|
|
338
|
+
canBeDatasource = _ref11.canBeDatasource;
|
|
340
339
|
return {
|
|
341
|
-
|
|
342
|
-
|
|
340
|
+
action: 'renderSuccess',
|
|
341
|
+
actionSubject: 'smartLink',
|
|
342
|
+
eventType: 'ui',
|
|
343
343
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
344
|
+
status: status,
|
|
344
345
|
extensionKey: extensionKey,
|
|
345
346
|
definitionId: definitionId,
|
|
346
347
|
destinationProduct: destinationProduct,
|
|
347
348
|
destinationSubproduct: destinationSubproduct,
|
|
348
|
-
location: location
|
|
349
|
+
location: location,
|
|
350
|
+
display: display,
|
|
351
|
+
canBeDatasource: canBeDatasource
|
|
349
352
|
})
|
|
350
353
|
};
|
|
351
354
|
};
|
|
352
|
-
var
|
|
355
|
+
var uiRenderFailedEvent = exports.uiRenderFailedEvent = function uiRenderFailedEvent(_ref12) {
|
|
353
356
|
var display = _ref12.display,
|
|
354
|
-
|
|
357
|
+
error = _ref12.error,
|
|
358
|
+
errorInfo = _ref12.errorInfo,
|
|
355
359
|
extensionKey = _ref12.extensionKey,
|
|
356
360
|
definitionId = _ref12.definitionId,
|
|
357
361
|
destinationProduct = _ref12.destinationProduct,
|
|
358
362
|
destinationSubproduct = _ref12.destinationSubproduct,
|
|
359
|
-
location = _ref12.location
|
|
360
|
-
canBeDatasource = _ref12.canBeDatasource;
|
|
363
|
+
location = _ref12.location;
|
|
361
364
|
return {
|
|
362
|
-
action: 'renderSuccess',
|
|
363
365
|
actionSubject: 'smartLink',
|
|
366
|
+
action: 'renderFailed',
|
|
364
367
|
eventType: 'ui',
|
|
365
368
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
366
|
-
|
|
369
|
+
error: error,
|
|
370
|
+
errorInfo: errorInfo,
|
|
371
|
+
display: display,
|
|
367
372
|
extensionKey: extensionKey,
|
|
368
373
|
definitionId: definitionId,
|
|
369
374
|
destinationProduct: destinationProduct,
|
|
370
375
|
destinationSubproduct: destinationSubproduct,
|
|
371
|
-
location: location
|
|
372
|
-
display: display,
|
|
373
|
-
canBeDatasource: canBeDatasource
|
|
376
|
+
location: location
|
|
374
377
|
})
|
|
375
378
|
};
|
|
376
379
|
};
|
|
377
|
-
var
|
|
378
|
-
var
|
|
379
|
-
|
|
380
|
-
errorInfo = _ref13.errorInfo,
|
|
380
|
+
var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref13) {
|
|
381
|
+
var id = _ref13.id,
|
|
382
|
+
previewDisplay = _ref13.previewDisplay,
|
|
381
383
|
extensionKey = _ref13.extensionKey,
|
|
382
384
|
definitionId = _ref13.definitionId,
|
|
383
385
|
destinationProduct = _ref13.destinationProduct,
|
|
384
386
|
destinationSubproduct = _ref13.destinationSubproduct,
|
|
385
|
-
location = _ref13.location
|
|
387
|
+
location = _ref13.location,
|
|
388
|
+
previewInvokeMethod = _ref13.previewInvokeMethod,
|
|
389
|
+
status = _ref13.status;
|
|
386
390
|
return {
|
|
387
|
-
|
|
388
|
-
|
|
391
|
+
action: 'viewed',
|
|
392
|
+
actionSubject: 'hoverCard',
|
|
389
393
|
eventType: 'ui',
|
|
390
394
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
display: display,
|
|
395
|
+
id: id,
|
|
396
|
+
previewDisplay: previewDisplay,
|
|
394
397
|
extensionKey: extensionKey,
|
|
395
398
|
definitionId: definitionId,
|
|
396
399
|
destinationProduct: destinationProduct,
|
|
397
400
|
destinationSubproduct: destinationSubproduct,
|
|
398
|
-
location: location
|
|
401
|
+
location: location,
|
|
402
|
+
previewInvokeMethod: previewInvokeMethod,
|
|
403
|
+
status: status
|
|
399
404
|
})
|
|
400
405
|
};
|
|
401
406
|
};
|
|
402
|
-
var
|
|
407
|
+
var uiHoverCardDismissedEvent = exports.uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref14) {
|
|
403
408
|
var id = _ref14.id,
|
|
404
409
|
previewDisplay = _ref14.previewDisplay,
|
|
410
|
+
hoverTime = _ref14.hoverTime,
|
|
405
411
|
extensionKey = _ref14.extensionKey,
|
|
406
412
|
definitionId = _ref14.definitionId,
|
|
407
413
|
destinationProduct = _ref14.destinationProduct,
|
|
@@ -410,12 +416,13 @@ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCa
|
|
|
410
416
|
previewInvokeMethod = _ref14.previewInvokeMethod,
|
|
411
417
|
status = _ref14.status;
|
|
412
418
|
return {
|
|
413
|
-
action: '
|
|
419
|
+
action: 'dismissed',
|
|
414
420
|
actionSubject: 'hoverCard',
|
|
415
421
|
eventType: 'ui',
|
|
416
422
|
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
417
423
|
id: id,
|
|
418
424
|
previewDisplay: previewDisplay,
|
|
425
|
+
hoverTime: hoverTime,
|
|
419
426
|
extensionKey: extensionKey,
|
|
420
427
|
definitionId: definitionId,
|
|
421
428
|
destinationProduct: destinationProduct,
|
|
@@ -426,44 +433,15 @@ var uiHoverCardViewedEvent = exports.uiHoverCardViewedEvent = function uiHoverCa
|
|
|
426
433
|
})
|
|
427
434
|
};
|
|
428
435
|
};
|
|
429
|
-
var
|
|
436
|
+
var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref15) {
|
|
430
437
|
var id = _ref15.id,
|
|
431
438
|
previewDisplay = _ref15.previewDisplay,
|
|
432
|
-
hoverTime = _ref15.hoverTime,
|
|
433
439
|
extensionKey = _ref15.extensionKey,
|
|
434
440
|
definitionId = _ref15.definitionId,
|
|
435
441
|
destinationProduct = _ref15.destinationProduct,
|
|
436
442
|
destinationSubproduct = _ref15.destinationSubproduct,
|
|
437
443
|
location = _ref15.location,
|
|
438
|
-
previewInvokeMethod = _ref15.previewInvokeMethod
|
|
439
|
-
status = _ref15.status;
|
|
440
|
-
return {
|
|
441
|
-
action: 'dismissed',
|
|
442
|
-
actionSubject: 'hoverCard',
|
|
443
|
-
eventType: 'ui',
|
|
444
|
-
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
445
|
-
id: id,
|
|
446
|
-
previewDisplay: previewDisplay,
|
|
447
|
-
hoverTime: hoverTime,
|
|
448
|
-
extensionKey: extensionKey,
|
|
449
|
-
definitionId: definitionId,
|
|
450
|
-
destinationProduct: destinationProduct,
|
|
451
|
-
destinationSubproduct: destinationSubproduct,
|
|
452
|
-
location: location,
|
|
453
|
-
previewInvokeMethod: previewInvokeMethod,
|
|
454
|
-
status: status
|
|
455
|
-
})
|
|
456
|
-
};
|
|
457
|
-
};
|
|
458
|
-
var uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref16) {
|
|
459
|
-
var id = _ref16.id,
|
|
460
|
-
previewDisplay = _ref16.previewDisplay,
|
|
461
|
-
extensionKey = _ref16.extensionKey,
|
|
462
|
-
definitionId = _ref16.definitionId,
|
|
463
|
-
destinationProduct = _ref16.destinationProduct,
|
|
464
|
-
destinationSubproduct = _ref16.destinationSubproduct,
|
|
465
|
-
location = _ref16.location,
|
|
466
|
-
previewInvokeMethod = _ref16.previewInvokeMethod;
|
|
444
|
+
previewInvokeMethod = _ref15.previewInvokeMethod;
|
|
467
445
|
return {
|
|
468
446
|
action: 'clicked',
|
|
469
447
|
actionSubject: 'button',
|
|
@@ -490,15 +468,15 @@ var uiLearnMoreLinkClickedEvent = exports.uiLearnMoreLinkClickedEvent = function
|
|
|
490
468
|
attributes: _objectSpread({}, context)
|
|
491
469
|
};
|
|
492
470
|
};
|
|
493
|
-
var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(
|
|
494
|
-
var display =
|
|
495
|
-
error =
|
|
496
|
-
errorInfo =
|
|
497
|
-
extensionKey =
|
|
498
|
-
definitionId =
|
|
499
|
-
destinationProduct =
|
|
500
|
-
destinationSubproduct =
|
|
501
|
-
location =
|
|
471
|
+
var chunkloadFailedEvent = exports.chunkloadFailedEvent = function chunkloadFailedEvent(_ref16) {
|
|
472
|
+
var display = _ref16.display,
|
|
473
|
+
error = _ref16.error,
|
|
474
|
+
errorInfo = _ref16.errorInfo,
|
|
475
|
+
extensionKey = _ref16.extensionKey,
|
|
476
|
+
definitionId = _ref16.definitionId,
|
|
477
|
+
destinationProduct = _ref16.destinationProduct,
|
|
478
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
479
|
+
location = _ref16.location;
|
|
502
480
|
return {
|
|
503
481
|
action: 'chunkLoadFailed',
|
|
504
482
|
actionSubject: 'smartLink',
|
|
@@ -542,9 +520,9 @@ var uiSmartLinkStatusOpenPreviewButtonClicked = exports.uiSmartLinkStatusOpenPre
|
|
|
542
520
|
attributes: _objectSpread({}, context)
|
|
543
521
|
};
|
|
544
522
|
};
|
|
545
|
-
var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(
|
|
523
|
+
var uiServerActionClicked = exports.uiServerActionClicked = function uiServerActionClicked(_ref17) {
|
|
546
524
|
var _SmartLinkActionTypeU2;
|
|
547
|
-
var smartLinkActionType =
|
|
525
|
+
var smartLinkActionType = _ref17.smartLinkActionType;
|
|
548
526
|
return {
|
|
549
527
|
action: 'clicked',
|
|
550
528
|
actionSubject: 'button',
|
|
@@ -59,12 +59,6 @@ Object.defineProperty(exports, "resolvedEvent", {
|
|
|
59
59
|
return _analytics.resolvedEvent;
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
Object.defineProperty(exports, "screenAuthPopupEvent", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function get() {
|
|
65
|
-
return _analytics.screenAuthPopupEvent;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
62
|
Object.defineProperty(exports, "uiActionClickedEvent", {
|
|
69
63
|
enumerable: true,
|
|
70
64
|
get: function get() {
|
|
@@ -40,7 +40,9 @@ var Provider = exports.Provider = function Provider(_ref) {
|
|
|
40
40
|
icon = _ref.icon;
|
|
41
41
|
var iconToRender = icon || null;
|
|
42
42
|
if (typeof icon === 'string') {
|
|
43
|
-
iconToRender =
|
|
43
|
+
iconToRender =
|
|
44
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
45
|
+
(0, _react.jsx)("img", {
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
45
47
|
className: "smart-link-icon",
|
|
46
48
|
css: imgStyles,
|
|
@@ -15,6 +15,7 @@ var _excluded = ["childRef"];
|
|
|
15
15
|
var IFrame = exports.IFrame = function IFrame(_ref) {
|
|
16
16
|
var childRef = _ref.childRef,
|
|
17
17
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
|
+
// eslint-disable-next-line jsx-a11y/iframe-has-title
|
|
18
19
|
return /*#__PURE__*/_react.default.createElement("iframe", (0, _extends2.default)({}, props, {
|
|
19
20
|
ref: childRef
|
|
20
21
|
}));
|
|
@@ -81,6 +81,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
81
81
|
}
|
|
82
82
|
var imageTestId = "".concat(testId, "-unresolved-image");
|
|
83
83
|
if (typeof imageUrlOrElement === 'string') {
|
|
84
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
84
85
|
return (0, _react2.jsx)("img", {
|
|
85
86
|
css: imageStyles,
|
|
86
87
|
"data-testid": imageTestId,
|
|
@@ -25,7 +25,9 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
25
25
|
src: url,
|
|
26
26
|
loading: (0, _react.jsx)(_loadingSkeleton.default, {
|
|
27
27
|
testId: "".concat(testId, "-loading")
|
|
28
|
-
})
|
|
28
|
+
})
|
|
29
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
30
|
+
,
|
|
29
31
|
loaded: (0, _react.jsx)("img", {
|
|
30
32
|
src: url,
|
|
31
33
|
"data-testid": "".concat(testId, "-image")
|
|
@@ -29,13 +29,17 @@ var LozengeActionItem = function LozengeActionItem(_ref) {
|
|
|
29
29
|
var _e$currentTarget;
|
|
30
30
|
(_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.firstElementChild) === null || _e$currentTarget === void 0 || _e$currentTarget.focus();
|
|
31
31
|
}, []);
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
return (
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
35
|
+
_react.default.createElement("span", {
|
|
36
|
+
onMouseEnter: handleMouseEnter
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
testId: testId
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
41
|
+
appearance: appearance
|
|
42
|
+
}, text)))
|
|
43
|
+
);
|
|
40
44
|
};
|
|
41
45
|
var _default = exports.default = LozengeActionItem;
|
|
@@ -212,6 +212,7 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
212
212
|
return (0, _react2.jsx)("span", {
|
|
213
213
|
ref: parentSpan
|
|
214
214
|
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, triggerProps, {
|
|
215
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
215
216
|
onMouseOver: initShowCard,
|
|
216
217
|
onMouseLeave: initHideCard,
|
|
217
218
|
onMouseMove: setMousePosition,
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "31.0.
|
|
20
|
+
packageVersion: "31.0.3",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -36,6 +36,7 @@ var Metadata = exports.Metadata = function Metadata(_ref) {
|
|
|
36
36
|
tooltip = _ref.tooltip;
|
|
37
37
|
var metadataIcon = icon || null;
|
|
38
38
|
if (!metadataIcon && iconUrl) {
|
|
39
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
39
40
|
metadataIcon = (0, _react.jsx)("img", {
|
|
40
41
|
src: iconUrl,
|
|
41
42
|
css: imgStyles
|
|
@@ -27,8 +27,11 @@ var StopPropagation = exports.StopPropagation = function StopPropagation(_ref) {
|
|
|
27
27
|
// Prevent click event inside modal from bubble up
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
}, []);
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
return (
|
|
31
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
32
|
+
(0, _react2.jsx)("span", {
|
|
33
|
+
css: styles,
|
|
34
|
+
onClick: onClick
|
|
35
|
+
}, children)
|
|
36
|
+
);
|
|
34
37
|
};
|
|
@@ -2,7 +2,6 @@ import { useCallback, useMemo } from 'react';
|
|
|
2
2
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
3
3
|
import { ACTION_RESOLVING, ACTION_UPDATE_METADATA_STATUS, cardAction } from '@atlaskit/linking-common';
|
|
4
4
|
import { auth } from '@atlaskit/outbound-auth-flow-client';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
7
6
|
import { SmartLinkStatus } from '../../constants';
|
|
8
7
|
import { getByDefinitionId, getDefinitionId, getExtensionKey, getServices } from '../helpers';
|
|
@@ -101,16 +100,9 @@ export const useSmartCardActions = (id, url, analytics) => {
|
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
102
|
if (services.length > 0) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
});
|
|
108
|
-
} else {
|
|
109
|
-
analytics.screen.authPopupEvent({
|
|
110
|
-
definitionId,
|
|
111
|
-
extensionKey
|
|
112
|
-
});
|
|
113
|
-
}
|
|
103
|
+
fireEvent('screen.consentModal.viewed', {
|
|
104
|
+
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
105
|
+
});
|
|
114
106
|
auth(services[0].url).then(() => {
|
|
115
107
|
fireEvent('track.applicationAccount.connected', {
|
|
116
108
|
definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null
|
|
@@ -138,7 +130,7 @@ export const useSmartCardActions = (id, url, analytics) => {
|
|
|
138
130
|
reload();
|
|
139
131
|
});
|
|
140
132
|
}
|
|
141
|
-
}, [getSmartLinkState, analytics.ui, analytics.
|
|
133
|
+
}, [getSmartLinkState, analytics.ui, analytics.operational, id, reload, fireEvent]);
|
|
142
134
|
const invoke = useCallback(async (opts, appearance) => {
|
|
143
135
|
const {
|
|
144
136
|
key,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
3
3
|
import { getUrl } from '@atlaskit/linking-common';
|
|
4
|
-
import { chunkloadFailedEvent, connectFailedEvent, connectSucceededEvent, context, instrumentEvent, invokeFailedEvent, invokeSucceededEvent,
|
|
4
|
+
import { chunkloadFailedEvent, connectFailedEvent, connectSucceededEvent, context, instrumentEvent, invokeFailedEvent, invokeSucceededEvent, uiActionClickedEvent, uiAuthAlternateAccountEvent, uiAuthEvent, uiCardClickedEvent, uiClosedAuthEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiHoverCardViewedEvent, uiLearnMoreLinkClickedEvent, uiRenderFailedEvent, uiRenderSuccessEvent, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from '../../utils/analytics';
|
|
5
5
|
import { uiServerActionClicked } from '../../utils/analytics/analytics';
|
|
6
6
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getStatusDetails, getSubproduct } from '../helpers';
|
|
7
7
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
@@ -622,29 +622,6 @@ export const useSmartLinkAnalytics = (url, id, defaultLocation) => {
|
|
|
622
622
|
|
|
623
623
|
/** Contains all screen analytics events */
|
|
624
624
|
const screen = useMemo(() => ({
|
|
625
|
-
/**
|
|
626
|
-
* This fires an event which represents the connect account page being opened.
|
|
627
|
-
* @param definitionId The definitionId of the Smart Link resolver invoked.
|
|
628
|
-
* @param extensionKey The extensionKey of the Smart Link resovler invoked.
|
|
629
|
-
* @returns
|
|
630
|
-
* @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
|
|
631
|
-
*/
|
|
632
|
-
authPopupEvent: ({
|
|
633
|
-
extensionKey,
|
|
634
|
-
definitionId,
|
|
635
|
-
resourceType,
|
|
636
|
-
destinationProduct,
|
|
637
|
-
destinationSubproduct,
|
|
638
|
-
location
|
|
639
|
-
}) => dispatchAnalytics(applyCommonAttributes(screenAuthPopupEvent({
|
|
640
|
-
...commonAttributes,
|
|
641
|
-
extensionKey,
|
|
642
|
-
definitionId,
|
|
643
|
-
resourceType,
|
|
644
|
-
destinationProduct,
|
|
645
|
-
destinationSubproduct,
|
|
646
|
-
location
|
|
647
|
-
}), commonAttributes)),
|
|
648
625
|
/**
|
|
649
626
|
* This fires an event that represents when a user view a modal.
|
|
650
627
|
* @param data A partial analytics event payload
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "31.0.
|
|
7
|
+
packageVersion: "31.0.3"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -324,28 +324,6 @@ export const uiClosedAuthEvent = ({
|
|
|
324
324
|
display
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* @deprecated remove when platform_smart-card-migrate-screen-analytics is cleaned up
|
|
330
|
-
*/
|
|
331
|
-
export const screenAuthPopupEvent = ({
|
|
332
|
-
extensionKey,
|
|
333
|
-
definitionId,
|
|
334
|
-
destinationProduct,
|
|
335
|
-
destinationSubproduct,
|
|
336
|
-
location
|
|
337
|
-
}) => ({
|
|
338
|
-
actionSubject: 'consentModal',
|
|
339
|
-
eventType: 'screen',
|
|
340
|
-
attributes: {
|
|
341
|
-
...context,
|
|
342
|
-
extensionKey,
|
|
343
|
-
definitionId,
|
|
344
|
-
destinationProduct,
|
|
345
|
-
destinationSubproduct,
|
|
346
|
-
location
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
327
|
export const uiRenderSuccessEvent = ({
|
|
350
328
|
display,
|
|
351
329
|
status,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getMeasure } from '../performance';
|
|
2
2
|
import { resolvedEvent, unresolvedEvent } from './analytics';
|
|
3
|
-
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent,
|
|
3
|
+
export { ANALYTICS_CHANNEL, context, fireSmartLinkEvent, resolvedEvent, unresolvedEvent, invokeSucceededEvent, invokeFailedEvent, chunkloadFailedEvent, connectSucceededEvent, connectFailedEvent, uiAuthEvent, uiAuthAlternateAccountEvent, uiCardClickedEvent, uiActionClickedEvent, uiClosedAuthEvent, uiRenderSuccessEvent, uiRenderFailedEvent, uiHoverCardViewedEvent, uiHoverCardDismissedEvent, uiHoverCardOpenLinkClickedEvent, uiLearnMoreLinkClickedEvent, uiSmartLinkStatusLozengeButtonClicked, uiSmartLinkStatusListItemButtonClicked, uiSmartLinkStatusOpenPreviewButtonClicked } from './analytics';
|
|
4
4
|
export const instrumentEvent = ({
|
|
5
5
|
id,
|
|
6
6
|
status,
|
|
@@ -34,7 +34,9 @@ export const Provider = ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
let iconToRender = icon || null;
|
|
36
36
|
if (typeof icon === 'string') {
|
|
37
|
-
iconToRender =
|
|
37
|
+
iconToRender =
|
|
38
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
39
|
+
jsx("img", {
|
|
38
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
41
|
className: "smart-link-icon",
|
|
40
42
|
css: imgStyles,
|
|
@@ -20,13 +20,17 @@ const LozengeActionItem = ({
|
|
|
20
20
|
var _e$currentTarget, _e$currentTarget$firs;
|
|
21
21
|
(_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : (_e$currentTarget$firs = _e$currentTarget.firstElementChild) === null || _e$currentTarget$firs === void 0 ? void 0 : _e$currentTarget$firs.focus();
|
|
22
22
|
}, []);
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
return (
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
26
|
+
React.createElement("span", {
|
|
27
|
+
onMouseEnter: handleMouseEnter
|
|
28
|
+
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
29
|
+
onClick: handleClick,
|
|
30
|
+
testId: testId
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
32
|
+
appearance: appearance
|
|
33
|
+
}, text)))
|
|
34
|
+
);
|
|
31
35
|
};
|
|
32
36
|
export default LozengeActionItem;
|