@atlaskit/smart-card 23.10.3 → 23.11.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 +6 -0
- package/dist/cjs/extractors/common/lozenge/extractLozengeText.js +21 -0
- package/dist/cjs/state/actions/index.js +29 -4
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +12 -3
- package/dist/cjs/utils/analytics/analytics.js +122 -104
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/extractors/common/lozenge/extractLozengeText.js +11 -0
- package/dist/es2019/state/actions/index.js +25 -3
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +8 -0
- package/dist/es2019/utils/analytics/analytics.js +12 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/extractors/common/lozenge/extractLozengeText.js +11 -0
- package/dist/esm/state/actions/index.js +28 -4
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +11 -3
- package/dist/esm/utils/analytics/analytics.js +117 -103
- package/dist/esm/version.json +1 -1
- package/dist/types/extractors/common/lozenge/extractLozengeText.d.ts +2 -0
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +7 -1
- package/dist/types/state/flexible-ui-context/index.d.ts +6 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +4 -1
- package/dist/types/utils/mocks.d.ts +3 -0
- package/dist/types/utils/types.d.ts +2 -2
- package/package.json +1 -1
- package/report.api.md +7 -0
- package/tmp/api-report-tmp.d.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 23.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`32aa136af5c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/32aa136af5c) - Hover Preview: Add actionable element experiment reload analytics
|
|
8
|
+
|
|
3
9
|
## 23.10.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.extractLozengeText = void 0;
|
|
7
|
+
|
|
8
|
+
var _extractLozenge = require("./extractLozenge");
|
|
9
|
+
|
|
10
|
+
var extractLozengeText = function extractLozengeText(response) {
|
|
11
|
+
var data = response === null || response === void 0 ? void 0 : response.data;
|
|
12
|
+
|
|
13
|
+
if (data) {
|
|
14
|
+
var _ref = (0, _extractLozenge.extractLozenge)(data) || {},
|
|
15
|
+
text = _ref.text;
|
|
16
|
+
|
|
17
|
+
return text;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.extractLozengeText = extractLozengeText;
|
|
@@ -33,6 +33,8 @@ var _analytics = require("../analytics");
|
|
|
33
33
|
|
|
34
34
|
var _constants2 = require("../../constants");
|
|
35
35
|
|
|
36
|
+
var _extractLozengeText = require("../../extractors/common/lozenge/extractLozengeText");
|
|
37
|
+
|
|
36
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
39
|
|
|
38
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -189,16 +191,39 @@ var useSmartCardActions = function useSmartCardActions(id, url, analytics) {
|
|
|
189
191
|
return resolve();
|
|
190
192
|
}, [details, resolve, dispatch, url, setMetadataStatus]);
|
|
191
193
|
var reload = (0, _react.useCallback)(function () {
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
var _details$data, _details$data$Type;
|
|
195
|
+
|
|
196
|
+
var definitionId = (0, _helpers.getDefinitionId)(details); // Start: Smart link Actions experiment
|
|
197
|
+
|
|
198
|
+
if (definitionId === 'jira-object-provider' && details !== null && details !== void 0 && (_details$data = details.data) !== null && _details$data !== void 0 && (_details$data$Type = _details$data['@type']) !== null && _details$data$Type !== void 0 && _details$data$Type.includes('atlassian:Task')) {
|
|
199
|
+
// EDM-5149: This is part of actionable element experiment where we
|
|
200
|
+
// reload jira issue link after embed view modal is closed.
|
|
201
|
+
// In our component, `reload` is only used in auth flow which
|
|
202
|
+
// jira link, being Atlassian product, would not fall into this category
|
|
203
|
+
// and would not be reloaded in normal smart link context.
|
|
204
|
+
// The code from resolve is duplicated here to avoid changing the response
|
|
205
|
+
// shape of resolve.
|
|
206
|
+
var previousJiraStatus = (0, _extractLozengeText.extractLozengeText)(details);
|
|
207
|
+
connections.client.fetchData(url, true).then(function (response) {
|
|
208
|
+
handleResolvedLinkResponse(url, response, true, false);
|
|
209
|
+
var jiraStatus = (0, _extractLozengeText.extractLozengeText)(response);
|
|
210
|
+
analytics.track.linkUpdated({
|
|
211
|
+
actionSubjectId: 'jiraIssueStatus',
|
|
212
|
+
previousJiraStatus: previousJiraStatus,
|
|
213
|
+
jiraStatus: jiraStatus
|
|
214
|
+
});
|
|
215
|
+
}).catch(function (error) {
|
|
216
|
+
return handleResolvedLinkError(url, error, undefined, false);
|
|
217
|
+
});
|
|
218
|
+
} // End: Smart ink Actions experiment
|
|
219
|
+
else if (definitionId) {
|
|
195
220
|
(0, _helpers.getByDefinitionId)(definitionId, getState()).map(function (url) {
|
|
196
221
|
return resolve(url, true);
|
|
197
222
|
});
|
|
198
223
|
} else {
|
|
199
224
|
resolve(url, true);
|
|
200
225
|
}
|
|
201
|
-
}, [url,
|
|
226
|
+
}, [details, connections.client, url, handleResolvedLinkResponse, analytics.track, handleResolvedLinkError, getState, resolve]);
|
|
202
227
|
var loadMetadata = (0, _react.useCallback)(function () {
|
|
203
228
|
//metadataStatus will be undefined for SSR links only
|
|
204
229
|
if (metadataStatus === undefined) {
|
|
@@ -23,6 +23,8 @@ var _helpers = require("../helpers");
|
|
|
23
23
|
|
|
24
24
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
25
25
|
|
|
26
|
+
var _analytics2 = require("../../utils/analytics/analytics");
|
|
27
|
+
|
|
26
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
29
|
|
|
28
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -31,11 +33,11 @@ var applyCommonAttributes = function applyCommonAttributes(event, commonAttribut
|
|
|
31
33
|
if (event && event.attributes) {
|
|
32
34
|
for (var _i = 0, _Object$entries = Object.entries(commonAttributes); _i < _Object$entries.length; _i++) {
|
|
33
35
|
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
34
|
-
|
|
36
|
+
_key = _Object$entries$_i[0],
|
|
35
37
|
value = _Object$entries$_i[1];
|
|
36
38
|
|
|
37
|
-
if (event.attributes[
|
|
38
|
-
event.attributes[
|
|
39
|
+
if (event.attributes[_key] === undefined) {
|
|
40
|
+
event.attributes[_key] = value;
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
@@ -689,6 +691,13 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchAnalytic
|
|
|
689
691
|
extensionKey: extensionKey,
|
|
690
692
|
location: location
|
|
691
693
|
})), commonAttributes));
|
|
694
|
+
},
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* This fires a tracking event before and after link updated.
|
|
698
|
+
*/
|
|
699
|
+
linkUpdated: function linkUpdated(props) {
|
|
700
|
+
return dispatchAnalytics(applyCommonAttributes((0, _analytics2.trackLinkUpdated)(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
|
|
692
701
|
}
|
|
693
702
|
};
|
|
694
703
|
}, [commonAttributes, dispatchAnalytics]);
|
|
@@ -5,7 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.unresolvedEvent = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
8
|
+
exports.unresolvedEvent = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiLearnMoreLinkClickedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackLinkUpdated = exports.trackAppAccountConnected = exports.trackAppAccountAuthStarted = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.chunkloadFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
11
|
|
|
10
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
13
|
|
|
@@ -17,6 +19,8 @@ var _version = require("../../version.json");
|
|
|
17
19
|
|
|
18
20
|
var _performance = require("../performance");
|
|
19
21
|
|
|
22
|
+
var _excluded = ["actionSubjectId"];
|
|
23
|
+
|
|
20
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
25
|
|
|
22
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -273,13 +277,27 @@ var trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref7) {
|
|
|
273
277
|
|
|
274
278
|
exports.trackAppAccountAuthStarted = trackAppAccountAuthStarted;
|
|
275
279
|
|
|
276
|
-
var
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
var trackLinkUpdated = function trackLinkUpdated(_ref8) {
|
|
281
|
+
var actionSubjectId = _ref8.actionSubjectId,
|
|
282
|
+
attributes = (0, _objectWithoutProperties2.default)(_ref8, _excluded);
|
|
283
|
+
return {
|
|
284
|
+
action: 'updated',
|
|
285
|
+
actionSubject: 'link',
|
|
286
|
+
actionSubjectId: actionSubjectId,
|
|
287
|
+
eventType: 'track',
|
|
288
|
+
attributes: _objectSpread(_objectSpread({}, context), attributes)
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
exports.trackLinkUpdated = trackLinkUpdated;
|
|
293
|
+
|
|
294
|
+
var uiAuthEvent = function uiAuthEvent(_ref9) {
|
|
295
|
+
var definitionId = _ref9.definitionId,
|
|
296
|
+
extensionKey = _ref9.extensionKey,
|
|
297
|
+
destinationProduct = _ref9.destinationProduct,
|
|
298
|
+
destinationSubproduct = _ref9.destinationSubproduct,
|
|
299
|
+
location = _ref9.location,
|
|
300
|
+
display = _ref9.display;
|
|
283
301
|
return {
|
|
284
302
|
action: 'clicked',
|
|
285
303
|
actionSubject: 'button',
|
|
@@ -298,13 +316,13 @@ var uiAuthEvent = function uiAuthEvent(_ref8) {
|
|
|
298
316
|
|
|
299
317
|
exports.uiAuthEvent = uiAuthEvent;
|
|
300
318
|
|
|
301
|
-
var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(
|
|
302
|
-
var definitionId =
|
|
303
|
-
extensionKey =
|
|
304
|
-
destinationProduct =
|
|
305
|
-
destinationSubproduct =
|
|
306
|
-
location =
|
|
307
|
-
display =
|
|
319
|
+
var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref10) {
|
|
320
|
+
var definitionId = _ref10.definitionId,
|
|
321
|
+
extensionKey = _ref10.extensionKey,
|
|
322
|
+
destinationProduct = _ref10.destinationProduct,
|
|
323
|
+
destinationSubproduct = _ref10.destinationSubproduct,
|
|
324
|
+
location = _ref10.location,
|
|
325
|
+
display = _ref10.display;
|
|
308
326
|
return {
|
|
309
327
|
action: 'clicked',
|
|
310
328
|
actionSubject: 'smartLink',
|
|
@@ -323,17 +341,17 @@ var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref9) {
|
|
|
323
341
|
|
|
324
342
|
exports.uiAuthAlternateAccountEvent = uiAuthAlternateAccountEvent;
|
|
325
343
|
|
|
326
|
-
var uiCardClickedEvent = function uiCardClickedEvent(
|
|
327
|
-
var id =
|
|
328
|
-
display =
|
|
329
|
-
status =
|
|
330
|
-
definitionId =
|
|
331
|
-
extensionKey =
|
|
332
|
-
isModifierKeyPressed =
|
|
333
|
-
location =
|
|
334
|
-
destinationProduct =
|
|
335
|
-
destinationSubproduct =
|
|
336
|
-
actionSubjectId =
|
|
344
|
+
var uiCardClickedEvent = function uiCardClickedEvent(_ref11) {
|
|
345
|
+
var id = _ref11.id,
|
|
346
|
+
display = _ref11.display,
|
|
347
|
+
status = _ref11.status,
|
|
348
|
+
definitionId = _ref11.definitionId,
|
|
349
|
+
extensionKey = _ref11.extensionKey,
|
|
350
|
+
isModifierKeyPressed = _ref11.isModifierKeyPressed,
|
|
351
|
+
location = _ref11.location,
|
|
352
|
+
destinationProduct = _ref11.destinationProduct,
|
|
353
|
+
destinationSubproduct = _ref11.destinationSubproduct,
|
|
354
|
+
actionSubjectId = _ref11.actionSubjectId;
|
|
337
355
|
return {
|
|
338
356
|
action: 'clicked',
|
|
339
357
|
actionSubject: 'smartLink',
|
|
@@ -355,15 +373,15 @@ var uiCardClickedEvent = function uiCardClickedEvent(_ref10) {
|
|
|
355
373
|
|
|
356
374
|
exports.uiCardClickedEvent = uiCardClickedEvent;
|
|
357
375
|
|
|
358
|
-
var uiActionClickedEvent = function uiActionClickedEvent(
|
|
359
|
-
var id =
|
|
360
|
-
actionType =
|
|
361
|
-
extensionKey =
|
|
362
|
-
display =
|
|
363
|
-
definitionId =
|
|
364
|
-
destinationProduct =
|
|
365
|
-
destinationSubproduct =
|
|
366
|
-
location =
|
|
376
|
+
var uiActionClickedEvent = function uiActionClickedEvent(_ref12) {
|
|
377
|
+
var id = _ref12.id,
|
|
378
|
+
actionType = _ref12.actionType,
|
|
379
|
+
extensionKey = _ref12.extensionKey,
|
|
380
|
+
display = _ref12.display,
|
|
381
|
+
definitionId = _ref12.definitionId,
|
|
382
|
+
destinationProduct = _ref12.destinationProduct,
|
|
383
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
384
|
+
location = _ref12.location;
|
|
367
385
|
return {
|
|
368
386
|
action: 'clicked',
|
|
369
387
|
actionSubject: 'button',
|
|
@@ -384,13 +402,13 @@ var uiActionClickedEvent = function uiActionClickedEvent(_ref11) {
|
|
|
384
402
|
|
|
385
403
|
exports.uiActionClickedEvent = uiActionClickedEvent;
|
|
386
404
|
|
|
387
|
-
var uiClosedAuthEvent = function uiClosedAuthEvent(
|
|
388
|
-
var display =
|
|
389
|
-
extensionKey =
|
|
390
|
-
definitionId =
|
|
391
|
-
destinationProduct =
|
|
392
|
-
destinationSubproduct =
|
|
393
|
-
location =
|
|
405
|
+
var uiClosedAuthEvent = function uiClosedAuthEvent(_ref13) {
|
|
406
|
+
var display = _ref13.display,
|
|
407
|
+
extensionKey = _ref13.extensionKey,
|
|
408
|
+
definitionId = _ref13.definitionId,
|
|
409
|
+
destinationProduct = _ref13.destinationProduct,
|
|
410
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
411
|
+
location = _ref13.location;
|
|
394
412
|
return {
|
|
395
413
|
action: 'closed',
|
|
396
414
|
actionSubject: 'consentModal',
|
|
@@ -408,12 +426,12 @@ var uiClosedAuthEvent = function uiClosedAuthEvent(_ref12) {
|
|
|
408
426
|
|
|
409
427
|
exports.uiClosedAuthEvent = uiClosedAuthEvent;
|
|
410
428
|
|
|
411
|
-
var screenAuthPopupEvent = function screenAuthPopupEvent(
|
|
412
|
-
var extensionKey =
|
|
413
|
-
definitionId =
|
|
414
|
-
destinationProduct =
|
|
415
|
-
destinationSubproduct =
|
|
416
|
-
location =
|
|
429
|
+
var screenAuthPopupEvent = function screenAuthPopupEvent(_ref14) {
|
|
430
|
+
var extensionKey = _ref14.extensionKey,
|
|
431
|
+
definitionId = _ref14.definitionId,
|
|
432
|
+
destinationProduct = _ref14.destinationProduct,
|
|
433
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
434
|
+
location = _ref14.location;
|
|
417
435
|
return {
|
|
418
436
|
actionSubject: 'consentModal',
|
|
419
437
|
eventType: 'screen',
|
|
@@ -429,14 +447,14 @@ var screenAuthPopupEvent = function screenAuthPopupEvent(_ref13) {
|
|
|
429
447
|
|
|
430
448
|
exports.screenAuthPopupEvent = screenAuthPopupEvent;
|
|
431
449
|
|
|
432
|
-
var uiRenderSuccessEvent = function uiRenderSuccessEvent(
|
|
433
|
-
var display =
|
|
434
|
-
status =
|
|
435
|
-
extensionKey =
|
|
436
|
-
definitionId =
|
|
437
|
-
destinationProduct =
|
|
438
|
-
destinationSubproduct =
|
|
439
|
-
location =
|
|
450
|
+
var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref15) {
|
|
451
|
+
var display = _ref15.display,
|
|
452
|
+
status = _ref15.status,
|
|
453
|
+
extensionKey = _ref15.extensionKey,
|
|
454
|
+
definitionId = _ref15.definitionId,
|
|
455
|
+
destinationProduct = _ref15.destinationProduct,
|
|
456
|
+
destinationSubproduct = _ref15.destinationSubproduct,
|
|
457
|
+
location = _ref15.location;
|
|
440
458
|
return {
|
|
441
459
|
action: 'renderSuccess',
|
|
442
460
|
actionSubject: 'smartLink',
|
|
@@ -455,15 +473,15 @@ var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref14) {
|
|
|
455
473
|
|
|
456
474
|
exports.uiRenderSuccessEvent = uiRenderSuccessEvent;
|
|
457
475
|
|
|
458
|
-
var uiRenderFailedEvent = function uiRenderFailedEvent(
|
|
459
|
-
var display =
|
|
460
|
-
error =
|
|
461
|
-
errorInfo =
|
|
462
|
-
extensionKey =
|
|
463
|
-
definitionId =
|
|
464
|
-
destinationProduct =
|
|
465
|
-
destinationSubproduct =
|
|
466
|
-
location =
|
|
476
|
+
var uiRenderFailedEvent = function uiRenderFailedEvent(_ref16) {
|
|
477
|
+
var display = _ref16.display,
|
|
478
|
+
error = _ref16.error,
|
|
479
|
+
errorInfo = _ref16.errorInfo,
|
|
480
|
+
extensionKey = _ref16.extensionKey,
|
|
481
|
+
definitionId = _ref16.definitionId,
|
|
482
|
+
destinationProduct = _ref16.destinationProduct,
|
|
483
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
484
|
+
location = _ref16.location;
|
|
467
485
|
return {
|
|
468
486
|
actionSubject: 'smartLink',
|
|
469
487
|
action: 'renderFailed',
|
|
@@ -483,16 +501,16 @@ var uiRenderFailedEvent = function uiRenderFailedEvent(_ref15) {
|
|
|
483
501
|
|
|
484
502
|
exports.uiRenderFailedEvent = uiRenderFailedEvent;
|
|
485
503
|
|
|
486
|
-
var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(
|
|
487
|
-
var id =
|
|
488
|
-
previewDisplay =
|
|
489
|
-
extensionKey =
|
|
490
|
-
definitionId =
|
|
491
|
-
destinationProduct =
|
|
492
|
-
destinationSubproduct =
|
|
493
|
-
location =
|
|
494
|
-
previewInvokeMethod =
|
|
495
|
-
status =
|
|
504
|
+
var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref17) {
|
|
505
|
+
var id = _ref17.id,
|
|
506
|
+
previewDisplay = _ref17.previewDisplay,
|
|
507
|
+
extensionKey = _ref17.extensionKey,
|
|
508
|
+
definitionId = _ref17.definitionId,
|
|
509
|
+
destinationProduct = _ref17.destinationProduct,
|
|
510
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
511
|
+
location = _ref17.location,
|
|
512
|
+
previewInvokeMethod = _ref17.previewInvokeMethod,
|
|
513
|
+
status = _ref17.status;
|
|
496
514
|
return {
|
|
497
515
|
action: 'viewed',
|
|
498
516
|
actionSubject: 'hoverCard',
|
|
@@ -513,17 +531,17 @@ var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref16) {
|
|
|
513
531
|
|
|
514
532
|
exports.uiHoverCardViewedEvent = uiHoverCardViewedEvent;
|
|
515
533
|
|
|
516
|
-
var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(
|
|
517
|
-
var id =
|
|
518
|
-
previewDisplay =
|
|
519
|
-
hoverTime =
|
|
520
|
-
extensionKey =
|
|
521
|
-
definitionId =
|
|
522
|
-
destinationProduct =
|
|
523
|
-
destinationSubproduct =
|
|
524
|
-
location =
|
|
525
|
-
previewInvokeMethod =
|
|
526
|
-
status =
|
|
534
|
+
var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref18) {
|
|
535
|
+
var id = _ref18.id,
|
|
536
|
+
previewDisplay = _ref18.previewDisplay,
|
|
537
|
+
hoverTime = _ref18.hoverTime,
|
|
538
|
+
extensionKey = _ref18.extensionKey,
|
|
539
|
+
definitionId = _ref18.definitionId,
|
|
540
|
+
destinationProduct = _ref18.destinationProduct,
|
|
541
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
542
|
+
location = _ref18.location,
|
|
543
|
+
previewInvokeMethod = _ref18.previewInvokeMethod,
|
|
544
|
+
status = _ref18.status;
|
|
527
545
|
return {
|
|
528
546
|
action: 'dismissed',
|
|
529
547
|
actionSubject: 'hoverCard',
|
|
@@ -545,15 +563,15 @@ var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref17) {
|
|
|
545
563
|
|
|
546
564
|
exports.uiHoverCardDismissedEvent = uiHoverCardDismissedEvent;
|
|
547
565
|
|
|
548
|
-
var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(
|
|
549
|
-
var id =
|
|
550
|
-
previewDisplay =
|
|
551
|
-
extensionKey =
|
|
552
|
-
definitionId =
|
|
553
|
-
destinationProduct =
|
|
554
|
-
destinationSubproduct =
|
|
555
|
-
location =
|
|
556
|
-
previewInvokeMethod =
|
|
566
|
+
var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref19) {
|
|
567
|
+
var id = _ref19.id,
|
|
568
|
+
previewDisplay = _ref19.previewDisplay,
|
|
569
|
+
extensionKey = _ref19.extensionKey,
|
|
570
|
+
definitionId = _ref19.definitionId,
|
|
571
|
+
destinationProduct = _ref19.destinationProduct,
|
|
572
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
573
|
+
location = _ref19.location,
|
|
574
|
+
previewInvokeMethod = _ref19.previewInvokeMethod;
|
|
557
575
|
return {
|
|
558
576
|
action: 'clicked',
|
|
559
577
|
actionSubject: 'button',
|
|
@@ -586,15 +604,15 @@ var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent() {
|
|
|
586
604
|
|
|
587
605
|
exports.uiLearnMoreLinkClickedEvent = uiLearnMoreLinkClickedEvent;
|
|
588
606
|
|
|
589
|
-
var chunkloadFailedEvent = function chunkloadFailedEvent(
|
|
590
|
-
var display =
|
|
591
|
-
error =
|
|
592
|
-
errorInfo =
|
|
593
|
-
extensionKey =
|
|
594
|
-
definitionId =
|
|
595
|
-
destinationProduct =
|
|
596
|
-
destinationSubproduct =
|
|
597
|
-
location =
|
|
607
|
+
var chunkloadFailedEvent = function chunkloadFailedEvent(_ref20) {
|
|
608
|
+
var display = _ref20.display,
|
|
609
|
+
error = _ref20.error,
|
|
610
|
+
errorInfo = _ref20.errorInfo,
|
|
611
|
+
extensionKey = _ref20.extensionKey,
|
|
612
|
+
definitionId = _ref20.definitionId,
|
|
613
|
+
destinationProduct = _ref20.destinationProduct,
|
|
614
|
+
destinationSubproduct = _ref20.destinationSubproduct,
|
|
615
|
+
location = _ref20.location;
|
|
598
616
|
return {
|
|
599
617
|
action: 'chunkLoadFailed',
|
|
600
618
|
actionSubject: 'smartLink',
|
package/dist/cjs/version.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { extractLozenge } from './extractLozenge';
|
|
2
|
+
export const extractLozengeText = response => {
|
|
3
|
+
const data = response === null || response === void 0 ? void 0 : response.data;
|
|
4
|
+
|
|
5
|
+
if (data) {
|
|
6
|
+
const {
|
|
7
|
+
text
|
|
8
|
+
} = extractLozenge(data) || {};
|
|
9
|
+
return text;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -8,6 +8,7 @@ import * as measure from '../../utils/performance';
|
|
|
8
8
|
import { getUnauthorizedJsonLd } from '../../utils/jsonld';
|
|
9
9
|
import { addMetadataToExperience } from '../analytics';
|
|
10
10
|
import { SmartLinkStatus } from '../../constants';
|
|
11
|
+
import { extractLozengeText } from '../../extractors/common/lozenge/extractLozengeText';
|
|
11
12
|
export const useSmartCardActions = (id, url, analytics) => {
|
|
12
13
|
const {
|
|
13
14
|
store,
|
|
@@ -135,14 +136,35 @@ export const useSmartCardActions = (id, url, analytics) => {
|
|
|
135
136
|
return resolve();
|
|
136
137
|
}, [details, resolve, dispatch, url, setMetadataStatus]);
|
|
137
138
|
const reload = useCallback(() => {
|
|
138
|
-
|
|
139
|
+
var _details$data, _details$data$Type;
|
|
140
|
+
|
|
141
|
+
const definitionId = getDefinitionId(details); // Start: Smart link Actions experiment
|
|
139
142
|
|
|
140
|
-
if (definitionId) {
|
|
143
|
+
if (definitionId === 'jira-object-provider' && details !== null && details !== void 0 && (_details$data = details.data) !== null && _details$data !== void 0 && (_details$data$Type = _details$data['@type']) !== null && _details$data$Type !== void 0 && _details$data$Type.includes('atlassian:Task')) {
|
|
144
|
+
// EDM-5149: This is part of actionable element experiment where we
|
|
145
|
+
// reload jira issue link after embed view modal is closed.
|
|
146
|
+
// In our component, `reload` is only used in auth flow which
|
|
147
|
+
// jira link, being Atlassian product, would not fall into this category
|
|
148
|
+
// and would not be reloaded in normal smart link context.
|
|
149
|
+
// The code from resolve is duplicated here to avoid changing the response
|
|
150
|
+
// shape of resolve.
|
|
151
|
+
const previousJiraStatus = extractLozengeText(details);
|
|
152
|
+
connections.client.fetchData(url, true).then(response => {
|
|
153
|
+
handleResolvedLinkResponse(url, response, true, false);
|
|
154
|
+
const jiraStatus = extractLozengeText(response);
|
|
155
|
+
analytics.track.linkUpdated({
|
|
156
|
+
actionSubjectId: 'jiraIssueStatus',
|
|
157
|
+
previousJiraStatus,
|
|
158
|
+
jiraStatus
|
|
159
|
+
});
|
|
160
|
+
}).catch(error => handleResolvedLinkError(url, error, undefined, false));
|
|
161
|
+
} // End: Smart ink Actions experiment
|
|
162
|
+
else if (definitionId) {
|
|
141
163
|
getByDefinitionId(definitionId, getState()).map(url => resolve(url, true));
|
|
142
164
|
} else {
|
|
143
165
|
resolve(url, true);
|
|
144
166
|
}
|
|
145
|
-
}, [url,
|
|
167
|
+
}, [details, connections.client, url, handleResolvedLinkResponse, analytics.track, handleResolvedLinkError, getState, resolve]);
|
|
146
168
|
const loadMetadata = useCallback(() => {
|
|
147
169
|
//metadataStatus will be undefined for SSR links only
|
|
148
170
|
if (metadataStatus === undefined) {
|
|
@@ -4,6 +4,7 @@ import { chunkloadFailedEvent, connectFailedEvent, connectSucceededEvent, contex
|
|
|
4
4
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
5
5
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getSubproduct } from '../helpers';
|
|
6
6
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
7
|
+
import { trackLinkUpdated } from '../../utils/analytics/analytics';
|
|
7
8
|
|
|
8
9
|
const applyCommonAttributes = (event, commonAttributes) => {
|
|
9
10
|
if (event && event.attributes) {
|
|
@@ -656,6 +657,13 @@ export const useSmartLinkAnalytics = (url, dispatchAnalytics, id, defaultLocatio
|
|
|
656
657
|
}) => dispatchAnalytics(applyCommonAttributes(trackAppAccountAuthStarted({ ...commonAttributes,
|
|
657
658
|
extensionKey,
|
|
658
659
|
location
|
|
660
|
+
}), commonAttributes)),
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* This fires a tracking event before and after link updated.
|
|
664
|
+
*/
|
|
665
|
+
linkUpdated: props => dispatchAnalytics(applyCommonAttributes(trackLinkUpdated({ ...commonAttributes,
|
|
666
|
+
...props
|
|
659
667
|
}), commonAttributes))
|
|
660
668
|
}), [commonAttributes, dispatchAnalytics]);
|
|
661
669
|
/** Contains all screen analytics events */
|
|
@@ -215,6 +215,18 @@ export const trackAppAccountAuthStarted = ({
|
|
|
215
215
|
location
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
|
+
export const trackLinkUpdated = ({
|
|
219
|
+
actionSubjectId,
|
|
220
|
+
...attributes
|
|
221
|
+
}) => ({
|
|
222
|
+
action: 'updated',
|
|
223
|
+
actionSubject: 'link',
|
|
224
|
+
actionSubjectId,
|
|
225
|
+
eventType: 'track',
|
|
226
|
+
attributes: { ...context,
|
|
227
|
+
...attributes
|
|
228
|
+
}
|
|
229
|
+
});
|
|
218
230
|
export const uiAuthEvent = ({
|
|
219
231
|
definitionId,
|
|
220
232
|
extensionKey,
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { extractLozenge } from './extractLozenge';
|
|
2
|
+
export var extractLozengeText = function extractLozengeText(response) {
|
|
3
|
+
var data = response === null || response === void 0 ? void 0 : response.data;
|
|
4
|
+
|
|
5
|
+
if (data) {
|
|
6
|
+
var _ref = extractLozenge(data) || {},
|
|
7
|
+
text = _ref.text;
|
|
8
|
+
|
|
9
|
+
return text;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -10,6 +10,7 @@ import * as measure from '../../utils/performance';
|
|
|
10
10
|
import { getUnauthorizedJsonLd } from '../../utils/jsonld';
|
|
11
11
|
import { addMetadataToExperience } from '../analytics';
|
|
12
12
|
import { SmartLinkStatus } from '../../constants';
|
|
13
|
+
import { extractLozengeText } from '../../extractors/common/lozenge/extractLozengeText';
|
|
13
14
|
export var useSmartCardActions = function useSmartCardActions(id, url, analytics) {
|
|
14
15
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
15
16
|
store = _useSmartLinkContext.store,
|
|
@@ -162,16 +163,39 @@ export var useSmartCardActions = function useSmartCardActions(id, url, analytics
|
|
|
162
163
|
return resolve();
|
|
163
164
|
}, [details, resolve, dispatch, url, setMetadataStatus]);
|
|
164
165
|
var reload = useCallback(function () {
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
var _details$data, _details$data$Type;
|
|
167
|
+
|
|
168
|
+
var definitionId = getDefinitionId(details); // Start: Smart link Actions experiment
|
|
169
|
+
|
|
170
|
+
if (definitionId === 'jira-object-provider' && details !== null && details !== void 0 && (_details$data = details.data) !== null && _details$data !== void 0 && (_details$data$Type = _details$data['@type']) !== null && _details$data$Type !== void 0 && _details$data$Type.includes('atlassian:Task')) {
|
|
171
|
+
// EDM-5149: This is part of actionable element experiment where we
|
|
172
|
+
// reload jira issue link after embed view modal is closed.
|
|
173
|
+
// In our component, `reload` is only used in auth flow which
|
|
174
|
+
// jira link, being Atlassian product, would not fall into this category
|
|
175
|
+
// and would not be reloaded in normal smart link context.
|
|
176
|
+
// The code from resolve is duplicated here to avoid changing the response
|
|
177
|
+
// shape of resolve.
|
|
178
|
+
var previousJiraStatus = extractLozengeText(details);
|
|
179
|
+
connections.client.fetchData(url, true).then(function (response) {
|
|
180
|
+
handleResolvedLinkResponse(url, response, true, false);
|
|
181
|
+
var jiraStatus = extractLozengeText(response);
|
|
182
|
+
analytics.track.linkUpdated({
|
|
183
|
+
actionSubjectId: 'jiraIssueStatus',
|
|
184
|
+
previousJiraStatus: previousJiraStatus,
|
|
185
|
+
jiraStatus: jiraStatus
|
|
186
|
+
});
|
|
187
|
+
}).catch(function (error) {
|
|
188
|
+
return handleResolvedLinkError(url, error, undefined, false);
|
|
189
|
+
});
|
|
190
|
+
} // End: Smart ink Actions experiment
|
|
191
|
+
else if (definitionId) {
|
|
168
192
|
getByDefinitionId(definitionId, getState()).map(function (url) {
|
|
169
193
|
return resolve(url, true);
|
|
170
194
|
});
|
|
171
195
|
} else {
|
|
172
196
|
resolve(url, true);
|
|
173
197
|
}
|
|
174
|
-
}, [url,
|
|
198
|
+
}, [details, connections.client, url, handleResolvedLinkResponse, analytics.track, handleResolvedLinkError, getState, resolve]);
|
|
175
199
|
var loadMetadata = useCallback(function () {
|
|
176
200
|
//metadataStatus will be undefined for SSR links only
|
|
177
201
|
if (metadataStatus === undefined) {
|
|
@@ -11,16 +11,17 @@ import { chunkloadFailedEvent as _chunkloadFailedEvent, connectFailedEvent as _c
|
|
|
11
11
|
import { failUfoExperience, startUfoExperience, succeedUfoExperience } from './ufoExperiences';
|
|
12
12
|
import { getDefinitionId, getExtensionKey, getProduct, getResourceType, getSubproduct } from '../helpers';
|
|
13
13
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
14
|
+
import { trackLinkUpdated } from '../../utils/analytics/analytics';
|
|
14
15
|
|
|
15
16
|
var applyCommonAttributes = function applyCommonAttributes(event, commonAttributes) {
|
|
16
17
|
if (event && event.attributes) {
|
|
17
18
|
for (var _i = 0, _Object$entries = Object.entries(commonAttributes); _i < _Object$entries.length; _i++) {
|
|
18
19
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
19
|
-
|
|
20
|
+
_key = _Object$entries$_i[0],
|
|
20
21
|
value = _Object$entries$_i[1];
|
|
21
22
|
|
|
22
|
-
if (event.attributes[
|
|
23
|
-
event.attributes[
|
|
23
|
+
if (event.attributes[_key] === undefined) {
|
|
24
|
+
event.attributes[_key] = value;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -674,6 +675,13 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, dispatchA
|
|
|
674
675
|
extensionKey: extensionKey,
|
|
675
676
|
location: location
|
|
676
677
|
})), commonAttributes));
|
|
678
|
+
},
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* This fires a tracking event before and after link updated.
|
|
682
|
+
*/
|
|
683
|
+
linkUpdated: function linkUpdated(props) {
|
|
684
|
+
return dispatchAnalytics(applyCommonAttributes(trackLinkUpdated(_objectSpread(_objectSpread({}, commonAttributes), props)), commonAttributes));
|
|
677
685
|
}
|
|
678
686
|
};
|
|
679
687
|
}, [commonAttributes, dispatchAnalytics]);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
+
var _excluded = ["actionSubjectId"];
|
|
4
6
|
|
|
5
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
8
|
|
|
@@ -228,13 +230,25 @@ export var trackAppAccountAuthStarted = function trackAppAccountAuthStarted(_ref
|
|
|
228
230
|
})
|
|
229
231
|
};
|
|
230
232
|
};
|
|
231
|
-
export var
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
export var trackLinkUpdated = function trackLinkUpdated(_ref8) {
|
|
234
|
+
var actionSubjectId = _ref8.actionSubjectId,
|
|
235
|
+
attributes = _objectWithoutProperties(_ref8, _excluded);
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
action: 'updated',
|
|
239
|
+
actionSubject: 'link',
|
|
240
|
+
actionSubjectId: actionSubjectId,
|
|
241
|
+
eventType: 'track',
|
|
242
|
+
attributes: _objectSpread(_objectSpread({}, context), attributes)
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
export var uiAuthEvent = function uiAuthEvent(_ref9) {
|
|
246
|
+
var definitionId = _ref9.definitionId,
|
|
247
|
+
extensionKey = _ref9.extensionKey,
|
|
248
|
+
destinationProduct = _ref9.destinationProduct,
|
|
249
|
+
destinationSubproduct = _ref9.destinationSubproduct,
|
|
250
|
+
location = _ref9.location,
|
|
251
|
+
display = _ref9.display;
|
|
238
252
|
return {
|
|
239
253
|
action: 'clicked',
|
|
240
254
|
actionSubject: 'button',
|
|
@@ -250,13 +264,13 @@ export var uiAuthEvent = function uiAuthEvent(_ref8) {
|
|
|
250
264
|
})
|
|
251
265
|
};
|
|
252
266
|
};
|
|
253
|
-
export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(
|
|
254
|
-
var definitionId =
|
|
255
|
-
extensionKey =
|
|
256
|
-
destinationProduct =
|
|
257
|
-
destinationSubproduct =
|
|
258
|
-
location =
|
|
259
|
-
display =
|
|
267
|
+
export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_ref10) {
|
|
268
|
+
var definitionId = _ref10.definitionId,
|
|
269
|
+
extensionKey = _ref10.extensionKey,
|
|
270
|
+
destinationProduct = _ref10.destinationProduct,
|
|
271
|
+
destinationSubproduct = _ref10.destinationSubproduct,
|
|
272
|
+
location = _ref10.location,
|
|
273
|
+
display = _ref10.display;
|
|
260
274
|
return {
|
|
261
275
|
action: 'clicked',
|
|
262
276
|
actionSubject: 'smartLink',
|
|
@@ -272,17 +286,17 @@ export var uiAuthAlternateAccountEvent = function uiAuthAlternateAccountEvent(_r
|
|
|
272
286
|
})
|
|
273
287
|
};
|
|
274
288
|
};
|
|
275
|
-
export var uiCardClickedEvent = function uiCardClickedEvent(
|
|
276
|
-
var id =
|
|
277
|
-
display =
|
|
278
|
-
status =
|
|
279
|
-
definitionId =
|
|
280
|
-
extensionKey =
|
|
281
|
-
isModifierKeyPressed =
|
|
282
|
-
location =
|
|
283
|
-
destinationProduct =
|
|
284
|
-
destinationSubproduct =
|
|
285
|
-
actionSubjectId =
|
|
289
|
+
export var uiCardClickedEvent = function uiCardClickedEvent(_ref11) {
|
|
290
|
+
var id = _ref11.id,
|
|
291
|
+
display = _ref11.display,
|
|
292
|
+
status = _ref11.status,
|
|
293
|
+
definitionId = _ref11.definitionId,
|
|
294
|
+
extensionKey = _ref11.extensionKey,
|
|
295
|
+
isModifierKeyPressed = _ref11.isModifierKeyPressed,
|
|
296
|
+
location = _ref11.location,
|
|
297
|
+
destinationProduct = _ref11.destinationProduct,
|
|
298
|
+
destinationSubproduct = _ref11.destinationSubproduct,
|
|
299
|
+
actionSubjectId = _ref11.actionSubjectId;
|
|
286
300
|
return {
|
|
287
301
|
action: 'clicked',
|
|
288
302
|
actionSubject: 'smartLink',
|
|
@@ -301,15 +315,15 @@ export var uiCardClickedEvent = function uiCardClickedEvent(_ref10) {
|
|
|
301
315
|
})
|
|
302
316
|
};
|
|
303
317
|
};
|
|
304
|
-
export var uiActionClickedEvent = function uiActionClickedEvent(
|
|
305
|
-
var id =
|
|
306
|
-
actionType =
|
|
307
|
-
extensionKey =
|
|
308
|
-
display =
|
|
309
|
-
definitionId =
|
|
310
|
-
destinationProduct =
|
|
311
|
-
destinationSubproduct =
|
|
312
|
-
location =
|
|
318
|
+
export var uiActionClickedEvent = function uiActionClickedEvent(_ref12) {
|
|
319
|
+
var id = _ref12.id,
|
|
320
|
+
actionType = _ref12.actionType,
|
|
321
|
+
extensionKey = _ref12.extensionKey,
|
|
322
|
+
display = _ref12.display,
|
|
323
|
+
definitionId = _ref12.definitionId,
|
|
324
|
+
destinationProduct = _ref12.destinationProduct,
|
|
325
|
+
destinationSubproduct = _ref12.destinationSubproduct,
|
|
326
|
+
location = _ref12.location;
|
|
313
327
|
return {
|
|
314
328
|
action: 'clicked',
|
|
315
329
|
actionSubject: 'button',
|
|
@@ -327,13 +341,13 @@ export var uiActionClickedEvent = function uiActionClickedEvent(_ref11) {
|
|
|
327
341
|
})
|
|
328
342
|
};
|
|
329
343
|
};
|
|
330
|
-
export var uiClosedAuthEvent = function uiClosedAuthEvent(
|
|
331
|
-
var display =
|
|
332
|
-
extensionKey =
|
|
333
|
-
definitionId =
|
|
334
|
-
destinationProduct =
|
|
335
|
-
destinationSubproduct =
|
|
336
|
-
location =
|
|
344
|
+
export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref13) {
|
|
345
|
+
var display = _ref13.display,
|
|
346
|
+
extensionKey = _ref13.extensionKey,
|
|
347
|
+
definitionId = _ref13.definitionId,
|
|
348
|
+
destinationProduct = _ref13.destinationProduct,
|
|
349
|
+
destinationSubproduct = _ref13.destinationSubproduct,
|
|
350
|
+
location = _ref13.location;
|
|
337
351
|
return {
|
|
338
352
|
action: 'closed',
|
|
339
353
|
actionSubject: 'consentModal',
|
|
@@ -348,12 +362,12 @@ export var uiClosedAuthEvent = function uiClosedAuthEvent(_ref12) {
|
|
|
348
362
|
})
|
|
349
363
|
};
|
|
350
364
|
};
|
|
351
|
-
export var screenAuthPopupEvent = function screenAuthPopupEvent(
|
|
352
|
-
var extensionKey =
|
|
353
|
-
definitionId =
|
|
354
|
-
destinationProduct =
|
|
355
|
-
destinationSubproduct =
|
|
356
|
-
location =
|
|
365
|
+
export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref14) {
|
|
366
|
+
var extensionKey = _ref14.extensionKey,
|
|
367
|
+
definitionId = _ref14.definitionId,
|
|
368
|
+
destinationProduct = _ref14.destinationProduct,
|
|
369
|
+
destinationSubproduct = _ref14.destinationSubproduct,
|
|
370
|
+
location = _ref14.location;
|
|
357
371
|
return {
|
|
358
372
|
actionSubject: 'consentModal',
|
|
359
373
|
eventType: 'screen',
|
|
@@ -366,14 +380,14 @@ export var screenAuthPopupEvent = function screenAuthPopupEvent(_ref13) {
|
|
|
366
380
|
})
|
|
367
381
|
};
|
|
368
382
|
};
|
|
369
|
-
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(
|
|
370
|
-
var display =
|
|
371
|
-
status =
|
|
372
|
-
extensionKey =
|
|
373
|
-
definitionId =
|
|
374
|
-
destinationProduct =
|
|
375
|
-
destinationSubproduct =
|
|
376
|
-
location =
|
|
383
|
+
export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref15) {
|
|
384
|
+
var display = _ref15.display,
|
|
385
|
+
status = _ref15.status,
|
|
386
|
+
extensionKey = _ref15.extensionKey,
|
|
387
|
+
definitionId = _ref15.definitionId,
|
|
388
|
+
destinationProduct = _ref15.destinationProduct,
|
|
389
|
+
destinationSubproduct = _ref15.destinationSubproduct,
|
|
390
|
+
location = _ref15.location;
|
|
377
391
|
return {
|
|
378
392
|
action: 'renderSuccess',
|
|
379
393
|
actionSubject: 'smartLink',
|
|
@@ -389,15 +403,15 @@ export var uiRenderSuccessEvent = function uiRenderSuccessEvent(_ref14) {
|
|
|
389
403
|
})
|
|
390
404
|
};
|
|
391
405
|
};
|
|
392
|
-
export var uiRenderFailedEvent = function uiRenderFailedEvent(
|
|
393
|
-
var display =
|
|
394
|
-
error =
|
|
395
|
-
errorInfo =
|
|
396
|
-
extensionKey =
|
|
397
|
-
definitionId =
|
|
398
|
-
destinationProduct =
|
|
399
|
-
destinationSubproduct =
|
|
400
|
-
location =
|
|
406
|
+
export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref16) {
|
|
407
|
+
var display = _ref16.display,
|
|
408
|
+
error = _ref16.error,
|
|
409
|
+
errorInfo = _ref16.errorInfo,
|
|
410
|
+
extensionKey = _ref16.extensionKey,
|
|
411
|
+
definitionId = _ref16.definitionId,
|
|
412
|
+
destinationProduct = _ref16.destinationProduct,
|
|
413
|
+
destinationSubproduct = _ref16.destinationSubproduct,
|
|
414
|
+
location = _ref16.location;
|
|
401
415
|
return {
|
|
402
416
|
actionSubject: 'smartLink',
|
|
403
417
|
action: 'renderFailed',
|
|
@@ -414,16 +428,16 @@ export var uiRenderFailedEvent = function uiRenderFailedEvent(_ref15) {
|
|
|
414
428
|
})
|
|
415
429
|
};
|
|
416
430
|
};
|
|
417
|
-
export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(
|
|
418
|
-
var id =
|
|
419
|
-
previewDisplay =
|
|
420
|
-
extensionKey =
|
|
421
|
-
definitionId =
|
|
422
|
-
destinationProduct =
|
|
423
|
-
destinationSubproduct =
|
|
424
|
-
location =
|
|
425
|
-
previewInvokeMethod =
|
|
426
|
-
status =
|
|
431
|
+
export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref17) {
|
|
432
|
+
var id = _ref17.id,
|
|
433
|
+
previewDisplay = _ref17.previewDisplay,
|
|
434
|
+
extensionKey = _ref17.extensionKey,
|
|
435
|
+
definitionId = _ref17.definitionId,
|
|
436
|
+
destinationProduct = _ref17.destinationProduct,
|
|
437
|
+
destinationSubproduct = _ref17.destinationSubproduct,
|
|
438
|
+
location = _ref17.location,
|
|
439
|
+
previewInvokeMethod = _ref17.previewInvokeMethod,
|
|
440
|
+
status = _ref17.status;
|
|
427
441
|
return {
|
|
428
442
|
action: 'viewed',
|
|
429
443
|
actionSubject: 'hoverCard',
|
|
@@ -441,17 +455,17 @@ export var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(_ref16) {
|
|
|
441
455
|
})
|
|
442
456
|
};
|
|
443
457
|
};
|
|
444
|
-
export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(
|
|
445
|
-
var id =
|
|
446
|
-
previewDisplay =
|
|
447
|
-
hoverTime =
|
|
448
|
-
extensionKey =
|
|
449
|
-
definitionId =
|
|
450
|
-
destinationProduct =
|
|
451
|
-
destinationSubproduct =
|
|
452
|
-
location =
|
|
453
|
-
previewInvokeMethod =
|
|
454
|
-
status =
|
|
458
|
+
export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref18) {
|
|
459
|
+
var id = _ref18.id,
|
|
460
|
+
previewDisplay = _ref18.previewDisplay,
|
|
461
|
+
hoverTime = _ref18.hoverTime,
|
|
462
|
+
extensionKey = _ref18.extensionKey,
|
|
463
|
+
definitionId = _ref18.definitionId,
|
|
464
|
+
destinationProduct = _ref18.destinationProduct,
|
|
465
|
+
destinationSubproduct = _ref18.destinationSubproduct,
|
|
466
|
+
location = _ref18.location,
|
|
467
|
+
previewInvokeMethod = _ref18.previewInvokeMethod,
|
|
468
|
+
status = _ref18.status;
|
|
455
469
|
return {
|
|
456
470
|
action: 'dismissed',
|
|
457
471
|
actionSubject: 'hoverCard',
|
|
@@ -470,15 +484,15 @@ export var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(_ref17
|
|
|
470
484
|
})
|
|
471
485
|
};
|
|
472
486
|
};
|
|
473
|
-
export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(
|
|
474
|
-
var id =
|
|
475
|
-
previewDisplay =
|
|
476
|
-
extensionKey =
|
|
477
|
-
definitionId =
|
|
478
|
-
destinationProduct =
|
|
479
|
-
destinationSubproduct =
|
|
480
|
-
location =
|
|
481
|
-
previewInvokeMethod =
|
|
487
|
+
export var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(_ref19) {
|
|
488
|
+
var id = _ref19.id,
|
|
489
|
+
previewDisplay = _ref19.previewDisplay,
|
|
490
|
+
extensionKey = _ref19.extensionKey,
|
|
491
|
+
definitionId = _ref19.definitionId,
|
|
492
|
+
destinationProduct = _ref19.destinationProduct,
|
|
493
|
+
destinationSubproduct = _ref19.destinationSubproduct,
|
|
494
|
+
location = _ref19.location,
|
|
495
|
+
previewInvokeMethod = _ref19.previewInvokeMethod;
|
|
482
496
|
return {
|
|
483
497
|
action: 'clicked',
|
|
484
498
|
actionSubject: 'button',
|
|
@@ -505,15 +519,15 @@ export var uiLearnMoreLinkClickedEvent = function uiLearnMoreLinkClickedEvent()
|
|
|
505
519
|
attributes: _objectSpread({}, context)
|
|
506
520
|
};
|
|
507
521
|
};
|
|
508
|
-
export var chunkloadFailedEvent = function chunkloadFailedEvent(
|
|
509
|
-
var display =
|
|
510
|
-
error =
|
|
511
|
-
errorInfo =
|
|
512
|
-
extensionKey =
|
|
513
|
-
definitionId =
|
|
514
|
-
destinationProduct =
|
|
515
|
-
destinationSubproduct =
|
|
516
|
-
location =
|
|
522
|
+
export var chunkloadFailedEvent = function chunkloadFailedEvent(_ref20) {
|
|
523
|
+
var display = _ref20.display,
|
|
524
|
+
error = _ref20.error,
|
|
525
|
+
errorInfo = _ref20.errorInfo,
|
|
526
|
+
extensionKey = _ref20.extensionKey,
|
|
527
|
+
definitionId = _ref20.definitionId,
|
|
528
|
+
destinationProduct = _ref20.destinationProduct,
|
|
529
|
+
destinationSubproduct = _ref20.destinationSubproduct,
|
|
530
|
+
location = _ref20.location;
|
|
517
531
|
return {
|
|
518
532
|
action: 'chunkLoadFailed',
|
|
519
533
|
actionSubject: 'smartLink',
|
package/dist/esm/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsHandler, AnalyticsName, AnalyticsPayload } from '../../utils/types';
|
|
2
|
-
import { ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps } from '../../utils/analytics/types';
|
|
2
|
+
import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps } from '../../utils/analytics/types';
|
|
3
3
|
/**
|
|
4
4
|
* This hook provides usage of Smart Link analytics outside of the Card component.
|
|
5
5
|
* Can be provided to Card via the analyticsEvents prop to change the analytics events.
|
|
@@ -195,6 +195,12 @@ export declare const useSmartLinkAnalytics: (url: string, dispatchAnalytics: Ana
|
|
|
195
195
|
* @returns
|
|
196
196
|
*/
|
|
197
197
|
appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
|
|
198
|
+
/**
|
|
199
|
+
* This fires a tracking event before and after link updated.
|
|
200
|
+
*/
|
|
201
|
+
linkUpdated: (props: CommonEventProps & {
|
|
202
|
+
[key: string]: any;
|
|
203
|
+
}) => void;
|
|
198
204
|
};
|
|
199
205
|
screen: {
|
|
200
206
|
/**
|
|
@@ -41,6 +41,9 @@ export declare const FlexibleUiAnalyticsContext: import("react").Context<{
|
|
|
41
41
|
track: {
|
|
42
42
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
43
43
|
appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
44
|
+
linkUpdated: (props: import("../../utils/analytics/types").CommonEventProps & {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}) => void;
|
|
44
47
|
};
|
|
45
48
|
screen: {
|
|
46
49
|
authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
@@ -80,6 +83,9 @@ export declare const useFlexibleUiAnalyticsContext: () => {
|
|
|
80
83
|
track: {
|
|
81
84
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
82
85
|
appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
86
|
+
linkUpdated: (props: import("../../utils/analytics/types").CommonEventProps & {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}) => void;
|
|
83
89
|
};
|
|
84
90
|
screen: {
|
|
85
91
|
authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
@@ -40,6 +40,9 @@ export declare function useSmartLink(id: string, url: string, dispatchAnalytics:
|
|
|
40
40
|
track: {
|
|
41
41
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
42
42
|
appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
43
|
+
linkUpdated: (props: import("../../utils/analytics/types").CommonEventProps & {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}) => void;
|
|
43
46
|
};
|
|
44
47
|
screen: {
|
|
45
48
|
authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { AnalyticsPayload } from '../types';
|
|
3
3
|
import { CardInnerAppearance } from '../../view/Card/types';
|
|
4
|
-
import { ConnectFailedEventProps, ConnectSucceededEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ResolvedEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UnresolvedEventProps } from './types';
|
|
4
|
+
import { CommonEventProps, ConnectFailedEventProps, ConnectSucceededEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ResolvedEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UnresolvedEventProps } from './types';
|
|
5
5
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
6
6
|
export declare const context: {
|
|
7
7
|
componentName: string;
|
|
@@ -20,6 +20,9 @@ export declare const connectSucceededEvent: ({ definitionId, extensionKey, desti
|
|
|
20
20
|
export declare const connectFailedEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, reason, }: ConnectFailedEventProps) => AnalyticsPayload;
|
|
21
21
|
export declare const trackAppAccountConnected: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
|
|
22
22
|
export declare const trackAppAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => AnalyticsPayload;
|
|
23
|
+
export declare const trackLinkUpdated: ({ actionSubjectId, ...attributes }: CommonEventProps & {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}) => AnalyticsPayload;
|
|
23
26
|
export declare const uiAuthEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthEventProps) => AnalyticsPayload;
|
|
24
27
|
export declare const uiAuthAlternateAccountEvent: ({ definitionId, extensionKey, destinationProduct, destinationSubproduct, location, display, }: UiAuthAlternateAccountEventProps) => AnalyticsPayload;
|
|
25
28
|
export declare const uiCardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => AnalyticsPayload;
|
|
@@ -70,6 +70,9 @@ export declare const mockAnalytics: {
|
|
|
70
70
|
track: {
|
|
71
71
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
72
72
|
appAccountAuthStarted: ({ extensionKey, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
73
|
+
linkUpdated: (props: import("./analytics/types").CommonEventProps & {
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
}) => void;
|
|
73
76
|
};
|
|
74
77
|
screen: {
|
|
75
78
|
authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GasPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
import { CardInnerAppearance } from '../view/Card/types';
|
|
3
|
-
export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved' | 'chunkLoadFailed';
|
|
4
|
-
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard' | 'modal' | 'embedPreviewModal';
|
|
3
|
+
export declare type AnalyticsAction = 'authStarted' | 'clicked' | 'closed' | 'connected' | 'connectFailed' | 'connectSucceeded' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'viewed' | 'unresolved' | 'updated' | 'chunkLoadFailed';
|
|
4
|
+
export declare type AnalyticsActionSubject = 'smartLink' | 'smartLinkAction' | 'applicationAccount' | 'button' | 'consentModal' | 'hoverCard' | 'modal' | 'embedPreviewModal' | 'link';
|
|
5
5
|
export declare type AnalyticsName = 'embedPreviewModal';
|
|
6
6
|
export declare type AnalyticsOrigin = 'smartLinkCard' | 'smartLinkEmbed' | 'smartLinkInline' | 'smartLinkPreviewHoverCard';
|
|
7
7
|
export declare type AnalyticsPayload = GasPayload & {
|
package/package.json
CHANGED
package/report.api.md
CHANGED
|
@@ -100,6 +100,7 @@ export type AnalyticsAction =
|
|
|
100
100
|
| 'renderWithStatus'
|
|
101
101
|
| 'resolved'
|
|
102
102
|
| 'unresolved'
|
|
103
|
+
| 'updated'
|
|
103
104
|
| 'viewed';
|
|
104
105
|
|
|
105
106
|
// @public (undocumented)
|
|
@@ -109,6 +110,7 @@ export type AnalyticsActionSubject =
|
|
|
109
110
|
| 'consentModal'
|
|
110
111
|
| 'embedPreviewModal'
|
|
111
112
|
| 'hoverCard'
|
|
113
|
+
| 'link'
|
|
112
114
|
| 'modal'
|
|
113
115
|
| 'smartLink'
|
|
114
116
|
| 'smartLinkAction';
|
|
@@ -1123,6 +1125,11 @@ export const useSmartLinkAnalytics: (
|
|
|
1123
1125
|
extensionKey,
|
|
1124
1126
|
location,
|
|
1125
1127
|
}: TrackAppAccountConnectedProps) => void;
|
|
1128
|
+
linkUpdated: (
|
|
1129
|
+
props: CommonEventProps & {
|
|
1130
|
+
[key: string]: any;
|
|
1131
|
+
},
|
|
1132
|
+
) => void;
|
|
1126
1133
|
};
|
|
1127
1134
|
screen: {
|
|
1128
1135
|
authPopupEvent: ({
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -70,10 +70,10 @@ type ActionProps = {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// @public (undocumented)
|
|
73
|
-
export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'viewed';
|
|
73
|
+
export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'updated' | 'viewed';
|
|
74
74
|
|
|
75
75
|
// @public (undocumented)
|
|
76
|
-
export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'modal' | 'smartLink' | 'smartLinkAction';
|
|
76
|
+
export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction';
|
|
77
77
|
|
|
78
78
|
// @public (undocumented)
|
|
79
79
|
type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
|
|
@@ -820,6 +820,9 @@ export const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHa
|
|
|
820
820
|
track: {
|
|
821
821
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
|
|
822
822
|
appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
|
|
823
|
+
linkUpdated: (props: CommonEventProps & {
|
|
824
|
+
[key: string]: any;
|
|
825
|
+
}) => void;
|
|
823
826
|
};
|
|
824
827
|
screen: {
|
|
825
828
|
authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => void;
|