@atlaskit/smart-card 44.16.4 → 44.16.6

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
  4. package/dist/cjs/extractors/action/extract-invoke-copy-link-action.js +1 -1
  5. package/dist/cjs/extractors/action/extract-invoke-download-action.js +1 -1
  6. package/dist/cjs/extractors/action/extract-invoke-preview-action.js +7 -7
  7. package/dist/cjs/extractors/action/extract-invoke-view-action.js +1 -1
  8. package/dist/cjs/state/actions/index.js +7 -7
  9. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +46 -46
  10. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/readStream.js +44 -44
  11. package/dist/cjs/state/hooks/use-incoming-outgoing-links/index.js +34 -34
  12. package/dist/cjs/state/hooks/use-invoke/index.js +4 -4
  13. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +12 -12
  14. package/dist/cjs/state/hooks/use-resolve/index.js +4 -4
  15. package/dist/cjs/state/hooks/usePrefetch.js +14 -14
  16. package/dist/cjs/state/services/current-site-cloud-id/index.js +16 -16
  17. package/dist/cjs/state/services/personalization/index.js +23 -23
  18. package/dist/cjs/utils/analytics/analytics.js +1 -1
  19. package/dist/cjs/utils/index.js +26 -25
  20. package/dist/cjs/utils/mocks.js +16 -16
  21. package/dist/cjs/view/EmbedModal/utils.js +4 -4
  22. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +17 -17
  23. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +8 -8
  24. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +2 -2
  25. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +10 -10
  26. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +31 -31
  27. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +10 -10
  28. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -4
  29. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -1
  30. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +34 -34
  31. package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +1 -1
  32. package/dist/cjs/view/InlineCard/common/action-button/index.js +1 -1
  33. package/dist/cjs/view/LinkUrl/index.js +1 -1
  34. package/dist/cjs/view/RelatedLinksModal/index.js +41 -41
  35. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
  36. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
  37. package/dist/es2019/utils/analytics/analytics.js +1 -1
  38. package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +1 -1
  39. package/dist/es2019/view/InlineCard/common/action-button/index.js +1 -1
  40. package/dist/es2019/view/LinkUrl/index.js +1 -1
  41. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
  42. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
  43. package/dist/esm/extractors/action/extract-invoke-copy-link-action.js +1 -1
  44. package/dist/esm/extractors/action/extract-invoke-download-action.js +1 -1
  45. package/dist/esm/extractors/action/extract-invoke-preview-action.js +7 -7
  46. package/dist/esm/extractors/action/extract-invoke-view-action.js +1 -1
  47. package/dist/esm/state/actions/index.js +7 -7
  48. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +46 -46
  49. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/readStream.js +44 -44
  50. package/dist/esm/state/hooks/use-incoming-outgoing-links/index.js +34 -34
  51. package/dist/esm/state/hooks/use-invoke/index.js +4 -4
  52. package/dist/esm/state/hooks/use-invoke-client-action/index.js +11 -11
  53. package/dist/esm/state/hooks/use-resolve/index.js +4 -4
  54. package/dist/esm/state/hooks/usePrefetch.js +14 -14
  55. package/dist/esm/state/services/current-site-cloud-id/index.js +16 -16
  56. package/dist/esm/state/services/personalization/index.js +23 -23
  57. package/dist/esm/utils/analytics/analytics.js +1 -1
  58. package/dist/esm/utils/index.js +25 -24
  59. package/dist/esm/utils/mocks.js +16 -16
  60. package/dist/esm/view/EmbedModal/utils.js +4 -4
  61. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +16 -16
  62. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +8 -8
  63. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +2 -2
  64. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +10 -10
  65. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +30 -30
  66. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +10 -10
  67. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -4
  68. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -1
  69. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +33 -33
  70. package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +1 -1
  71. package/dist/esm/view/InlineCard/common/action-button/index.js +1 -1
  72. package/dist/esm/view/LinkUrl/index.js +1 -1
  73. package/dist/esm/view/RelatedLinksModal/index.js +40 -40
  74. package/package.json +9 -9
@@ -13,7 +13,7 @@ var _uuid = _interopRequireDefault(require("uuid"));
13
13
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
14
14
  var measure = _interopRequireWildcard(require("../../../utils/performance"));
15
15
  var _analytics = require("../../analytics");
16
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
17
17
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
18
18
 
19
19
  var ACTION_EXPERIENCE_NAME = 'smart-link-action-invocation';
@@ -28,8 +28,8 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
28
28
  var fireEvent = fireEventProp !== null && fireEventProp !== void 0 ? fireEventProp : defaultFireEvent;
29
29
  return (0, _react.useCallback)( /*#__PURE__*/function () {
30
30
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref2) {
31
- var actionSubjectId, actionType, actionFn, _ref2$definitionId, definitionId, extensionKey, display, id, prompt, _ref2$resourceType, resourceType, experienceId, markName, _measure$getMeasure$d, _measure$getMeasure, result, _measure$getMeasure$d2, _measure$getMeasure2, reason;
32
- return _regenerator.default.wrap(function _callee$(_context) {
31
+ var actionSubjectId, actionType, actionFn, _ref2$definitionId, definitionId, extensionKey, display, id, prompt, _ref2$resourceType, resourceType, experienceId, markName, _measure$getMeasure$d, _measure$getMeasure, result, _measure$getMeasure$d2, _measure$getMeasure2, reason, _t;
32
+ return _regenerator.default.wrap(function (_context) {
33
33
  while (1) switch (_context.prev = _context.next) {
34
34
  case 0:
35
35
  actionSubjectId = _ref2.actionSubjectId, actionType = _ref2.actionType, actionFn = _ref2.actionFn, _ref2$definitionId = _ref2.definitionId, definitionId = _ref2$definitionId === void 0 ? null : _ref2$definitionId, extensionKey = _ref2.extensionKey, display = _ref2.display, id = _ref2.id, prompt = _ref2.prompt, _ref2$resourceType = _ref2.resourceType, resourceType = _ref2$resourceType === void 0 ? null : _ref2$resourceType;
@@ -37,7 +37,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
37
37
  experienceId = (0, _uuid.default)(); // Begin performance instrumentation.
38
38
  markName = "".concat(experienceId, "-").concat(actionType);
39
39
  measure.mark(markName, 'pending');
40
- _context.prev = 4;
40
+ _context.prev = 1;
41
41
  // Begin UFO experience
42
42
  (0, _analytics.startUfoExperience)(ACTION_EXPERIENCE_NAME, experienceId, {
43
43
  actionType: actionType,
@@ -58,9 +58,9 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
58
58
  });
59
59
  }
60
60
  // Invoke action
61
- _context.next = 9;
61
+ _context.next = 2;
62
62
  return actionFn();
63
- case 9:
63
+ case 2:
64
64
  result = _context.sent;
65
65
  measure.mark(markName, 'resolved');
66
66
  (0, _analytics.succeedUfoExperience)(ACTION_EXPERIENCE_NAME, experienceId);
@@ -73,12 +73,12 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
73
73
  resourceType: resourceType
74
74
  });
75
75
  return _context.abrupt("return", result);
76
- case 16:
77
- _context.prev = 16;
78
- _context.t0 = _context["catch"](4);
76
+ case 3:
77
+ _context.prev = 3;
78
+ _t = _context["catch"](1);
79
79
  measure.mark(markName, 'errored');
80
80
  (0, _analytics.failUfoExperience)(ACTION_EXPERIENCE_NAME, experienceId);
81
- reason = typeof _context.t0 === 'string' ? _context.t0 : _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message;
81
+ reason = typeof _t === 'string' ? _t : _t === null || _t === void 0 ? void 0 : _t.message;
82
82
  fireEvent('operational.smartLinkAction.unresolved', {
83
83
  actionType: actionType !== null && actionType !== void 0 ? actionType : null,
84
84
  definitionId: definitionId,
@@ -88,11 +88,11 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
88
88
  reason: reason,
89
89
  resourceType: resourceType
90
90
  });
91
- case 22:
91
+ case 4:
92
92
  case "end":
93
93
  return _context.stop();
94
94
  }
95
- }, _callee, null, [[4, 16]]);
95
+ }, _callee, null, [[1, 3]]);
96
96
  }));
97
97
  return function (_x) {
98
98
  return _ref3.apply(this, arguments);
@@ -34,7 +34,7 @@ var useResolve = function useResolve() {
34
34
  details,
35
35
  hasData,
36
36
  _args = arguments;
37
- return _regenerator.default.wrap(function _callee$(_context) {
37
+ return _regenerator.default.wrap(function (_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
39
39
  case 0:
40
40
  isReloading = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
@@ -46,7 +46,7 @@ var useResolve = function useResolve() {
46
46
  }, details = _ref2.details;
47
47
  hasData = !!(details && details.data || (0, _linkExtractors.isEntityPresent)(details));
48
48
  if (!(isReloading || !hasData || isMetadataRequest)) {
49
- _context.next = 9;
49
+ _context.next = 1;
50
50
  break;
51
51
  }
52
52
  return _context.abrupt("return", connections.client.fetchData(url, isReloading).then(function (response) {
@@ -54,11 +54,11 @@ var useResolve = function useResolve() {
54
54
  }).catch(function (error) {
55
55
  return handleResolvedLinkError(url, error, undefined, isMetadataRequest);
56
56
  }));
57
- case 9:
57
+ case 1:
58
58
  (0, _analytics.addMetadataToExperience)('smart-link-rendered', id, {
59
59
  cached: true
60
60
  });
61
- case 10:
61
+ case 2:
62
62
  case "end":
63
63
  return _context.stop();
64
64
  }
@@ -21,16 +21,16 @@ function usePrefetch(url) {
21
21
  var _ref2 = connections || {},
22
22
  client = _ref2.client;
23
23
  return (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
24
- var isPrefetching, isFetching, needsPrefetch, response;
25
- return _regenerator.default.wrap(function _callee$(_context) {
24
+ var isPrefetching, isFetching, needsPrefetch, response, _t;
25
+ return _regenerator.default.wrap(function (_context) {
26
26
  while (1) switch (_context.prev = _context.next) {
27
27
  case 0:
28
28
  if (!(!store || !prefetchStore || !connections)) {
29
- _context.next = 2;
29
+ _context.next = 1;
30
30
  break;
31
31
  }
32
32
  return _context.abrupt("return");
33
- case 2:
33
+ case 1:
34
34
  // If the link is already being prefetched, the prefetch store
35
35
  // should have a flag set against the URL. The prefetch store is purposefully
36
36
  // separate from the UI in order to ensure no rendering takes place;
@@ -41,7 +41,7 @@ function usePrefetch(url) {
41
41
  isFetching = getState()[url]; // We compute if a link needs to be prefetched thus, referencing the above.
42
42
  needsPrefetch = !isPrefetching && !isFetching;
43
43
  if (!needsPrefetch) {
44
- _context.next = 16;
44
+ _context.next = 5;
45
45
  break;
46
46
  }
47
47
  // We specify in the prefetch store that this link no
@@ -52,10 +52,10 @@ function usePrefetch(url) {
52
52
  // Try fetch the data for this URL from Object Resolver Service (ORS), executing batch
53
53
  // requests by domain (as usual) to ensure we minimize the amount of connections
54
54
  // we create between browser -> ORS when making network requests.
55
- _context.prev = 7;
56
- _context.next = 10;
55
+ _context.prev = 2;
56
+ _context.next = 3;
57
57
  return client.prefetchData(url);
58
- case 10:
58
+ case 3:
59
59
  response = _context.sent;
60
60
  // Once the data comes back, we put the link in the `resolved` status. This ensures
61
61
  // that when the link enters the viewport and is rendered, we immediately show it as
@@ -72,15 +72,15 @@ function usePrefetch(url) {
72
72
  url: url
73
73
  }, undefined, undefined, 'resolved'));
74
74
  }
75
- _context.next = 16;
75
+ _context.next = 5;
76
76
  break;
77
- case 14:
78
- _context.prev = 14;
79
- _context.t0 = _context["catch"](7);
80
- case 16:
77
+ case 4:
78
+ _context.prev = 4;
79
+ _t = _context["catch"](2);
80
+ case 5:
81
81
  case "end":
82
82
  return _context.stop();
83
83
  }
84
- }, _callee, null, [[7, 14]]);
84
+ }, _callee, null, [[2, 4]]);
85
85
  })), [store, prefetchStore, connections, url, getState, client, dispatch]);
86
86
  }
@@ -75,33 +75,33 @@ var CurrentSiteCloudIdService = exports.CurrentSiteCloudIdService = /*#__PURE__*
75
75
  return existing;
76
76
  }
77
77
  var promise = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
78
- var response, cloudId;
79
- return _regenerator.default.wrap(function _callee$(_context) {
78
+ var response, cloudId, _t;
79
+ return _regenerator.default.wrap(function (_context) {
80
80
  while (1) switch (_context.prev = _context.next) {
81
81
  case 0:
82
82
  _context.prev = 0;
83
- _context.next = 3;
83
+ _context.next = 1;
84
84
  return (0, _linkingCommon.request)('get', "".concat(baseUri, "/_edge/tenant_info"));
85
- case 3:
85
+ case 1:
86
86
  response = _context.sent;
87
87
  cloudId = response === null || response === void 0 ? void 0 : response.cloudId;
88
88
  if (cloudId) {
89
89
  _this.writeStoredCloudId(baseUri, cloudId);
90
90
  }
91
91
  return _context.abrupt("return", cloudId ? cloudId : _this.readStoredCloudId(baseUri));
92
- case 9:
93
- _context.prev = 9;
94
- _context.t0 = _context["catch"](0);
92
+ case 2:
93
+ _context.prev = 2;
94
+ _t = _context["catch"](0);
95
95
  return _context.abrupt("return", _this.readStoredCloudId(baseUri));
96
- case 12:
97
- _context.prev = 12;
96
+ case 3:
97
+ _context.prev = 3;
98
98
  _this.tenantInfoInflightPromises.delete(baseUri);
99
- return _context.finish(12);
100
- case 15:
99
+ return _context.finish(3);
100
+ case 4:
101
101
  case "end":
102
102
  return _context.stop();
103
103
  }
104
- }, _callee, null, [[0, 9, 12, 15]]);
104
+ }, _callee, null, [[0, 2, 3, 4]]);
105
105
  }))();
106
106
  this.tenantInfoInflightPromises.set(baseUri, promise);
107
107
  return promise;
@@ -129,19 +129,19 @@ var CurrentSiteCloudIdService = exports.CurrentSiteCloudIdService = /*#__PURE__*
129
129
  var baseUriWithNoTrailingSlash,
130
130
  fromStorage,
131
131
  _args2 = arguments;
132
- return _regenerator.default.wrap(function _callee2$(_context2) {
132
+ return _regenerator.default.wrap(function (_context2) {
133
133
  while (1) switch (_context2.prev = _context2.next) {
134
134
  case 0:
135
135
  baseUriWithNoTrailingSlash = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : '';
136
136
  fromStorage = this.readStoredCloudId(baseUriWithNoTrailingSlash);
137
137
  if (!fromStorage) {
138
- _context2.next = 4;
138
+ _context2.next = 1;
139
139
  break;
140
140
  }
141
141
  return _context2.abrupt("return", fromStorage);
142
- case 4:
142
+ case 1:
143
143
  return _context2.abrupt("return", this.ensureTenantInfoInflightStarted(baseUriWithNoTrailingSlash));
144
- case 5:
144
+ case 2:
145
145
  case "end":
146
146
  return _context2.stop();
147
147
  }
@@ -43,10 +43,10 @@ function _fetchSiteTraits() {
43
43
  _fetchSiteTraits = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(cloudId) {
44
44
  var _data$attributes;
45
45
  var response, data;
46
- return _regenerator.default.wrap(function _callee3$(_context3) {
46
+ return _regenerator.default.wrap(function (_context3) {
47
47
  while (1) switch (_context3.prev = _context3.next) {
48
48
  case 0:
49
- _context3.next = 2;
49
+ _context3.next = 1;
50
50
  return fetch("".concat(BASE_URL, "/site/").concat(cloudId), {
51
51
  method: 'GET',
52
52
  credentials: 'include',
@@ -54,20 +54,20 @@ function _fetchSiteTraits() {
54
54
  'Content-Type': 'application/json'
55
55
  }
56
56
  });
57
- case 2:
57
+ case 1:
58
58
  response = _context3.sent;
59
59
  if (response.ok) {
60
- _context3.next = 5;
60
+ _context3.next = 2;
61
61
  break;
62
62
  }
63
63
  return _context3.abrupt("return", []);
64
- case 5:
65
- _context3.next = 7;
64
+ case 2:
65
+ _context3.next = 3;
66
66
  return response.json();
67
- case 7:
67
+ case 3:
68
68
  data = _context3.sent;
69
69
  return _context3.abrupt("return", (_data$attributes = data === null || data === void 0 ? void 0 : data.attributes) !== null && _data$attributes !== void 0 ? _data$attributes : []);
70
- case 9:
70
+ case 4:
71
71
  case "end":
72
72
  return _context3.stop();
73
73
  }
@@ -95,32 +95,32 @@ var PersonalizationService = exports.PersonalizationService = /*#__PURE__*/funct
95
95
  var _getProviderPctMap = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(cloudId, traitName) {
96
96
  var _this = this;
97
97
  var cacheKey, cachedPromise, promise, retryablePromise;
98
- return _regenerator.default.wrap(function _callee2$(_context2) {
98
+ return _regenerator.default.wrap(function (_context2) {
99
99
  while (1) switch (_context2.prev = _context2.next) {
100
100
  case 0:
101
101
  if (cloudId) {
102
- _context2.next = 2;
102
+ _context2.next = 1;
103
103
  break;
104
104
  }
105
105
  return _context2.abrupt("return", undefined);
106
- case 2:
106
+ case 1:
107
107
  cacheKey = scopedCacheKey(cloudId, traitName);
108
108
  cachedPromise = this.cache.get(cacheKey);
109
109
  if (!cachedPromise) {
110
- _context2.next = 6;
110
+ _context2.next = 2;
111
111
  break;
112
112
  }
113
113
  return _context2.abrupt("return", cachedPromise);
114
- case 6:
114
+ case 2:
115
115
  promise = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
116
- var traits, trait, mapped;
117
- return _regenerator.default.wrap(function _callee$(_context) {
116
+ var traits, trait, mapped, _t;
117
+ return _regenerator.default.wrap(function (_context) {
118
118
  while (1) switch (_context.prev = _context.next) {
119
119
  case 0:
120
120
  _context.prev = 0;
121
- _context.next = 3;
121
+ _context.next = 1;
122
122
  return fetchSiteTraits(cloudId);
123
- case 3:
123
+ case 1:
124
124
  traits = _context.sent;
125
125
  trait = traits.find(function (t) {
126
126
  return t.name === traitName;
@@ -130,22 +130,22 @@ var PersonalizationService = exports.PersonalizationService = /*#__PURE__*/funct
130
130
  _this.writeStoredProviderPctMap(cloudId, traitName, mapped);
131
131
  }
132
132
  return _context.abrupt("return", mapped);
133
- case 10:
134
- _context.prev = 10;
135
- _context.t0 = _context["catch"](0);
133
+ case 2:
134
+ _context.prev = 2;
135
+ _t = _context["catch"](0);
136
136
  return _context.abrupt("return", undefined);
137
- case 13:
137
+ case 3:
138
138
  case "end":
139
139
  return _context.stop();
140
140
  }
141
- }, _callee, null, [[0, 10]]);
141
+ }, _callee, null, [[0, 2]]);
142
142
  }))();
143
143
  retryablePromise = promise.finally(function () {
144
144
  _this.cache.delete(cacheKey);
145
145
  });
146
146
  this.cache.set(cacheKey, retryablePromise);
147
147
  return _context2.abrupt("return", retryablePromise);
148
- case 10:
148
+ case 3:
149
149
  case "end":
150
150
  return _context2.stop();
151
151
  }
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card" || '',
14
- packageVersion: "44.16.3" || ''
14
+ packageVersion: "44.16.5" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -17,7 +17,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
17
  var _tokens = require("@atlaskit/tokens");
18
18
  var _constants = require("../constants");
19
19
  var _extractFileFormatIcon = _interopRequireDefault(require("../extractors/flexible/icon/extract-file-formatIcon"));
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
21
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
22
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
23
  var isSpecialEvent = exports.isSpecialEvent = function isSpecialEvent(evt) {
@@ -793,35 +793,36 @@ var _importWithRetry = exports.importWithRetry = /*#__PURE__*/function () {
793
793
  var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(importFn) {
794
794
  var retries,
795
795
  interval,
796
- _args = arguments;
797
- return _regenerator.default.wrap(function _callee$(_context) {
796
+ _args = arguments,
797
+ _t;
798
+ return _regenerator.default.wrap(function (_context) {
798
799
  while (1) switch (_context.prev = _context.next) {
799
800
  case 0:
800
801
  retries = _args.length > 1 && _args[1] !== undefined ? _args[1] : 2;
801
802
  interval = _args.length > 2 && _args[2] !== undefined ? _args[2] : 500;
802
- _context.prev = 2;
803
- _context.next = 5;
803
+ _context.prev = 1;
804
+ _context.next = 2;
804
805
  return importFn();
805
- case 5:
806
+ case 2:
806
807
  return _context.abrupt("return", _context.sent);
807
- case 8:
808
- _context.prev = 8;
809
- _context.t0 = _context["catch"](2);
810
- if (!(_context.t0.name === 'ChunkLoadError' && retries > 0)) {
811
- _context.next = 16;
808
+ case 3:
809
+ _context.prev = 3;
810
+ _t = _context["catch"](1);
811
+ if (!(_t.name === 'ChunkLoadError' && retries > 0)) {
812
+ _context.next = 5;
812
813
  break;
813
814
  }
814
- _context.next = 13;
815
+ _context.next = 4;
815
816
  return sleep(interval);
816
- case 13:
817
+ case 4:
817
818
  return _context.abrupt("return", _importWithRetry(importFn, retries - 1, interval));
818
- case 16:
819
- throw _context.t0;
820
- case 17:
819
+ case 5:
820
+ throw _t;
821
+ case 6:
821
822
  case "end":
822
823
  return _context.stop();
823
824
  }
824
- }, _callee, null, [[2, 8]]);
825
+ }, _callee, null, [[1, 3]]);
825
826
  }));
826
827
  return function importWithRetry(_x) {
827
828
  return _ref5.apply(this, arguments);
@@ -830,15 +831,15 @@ var _importWithRetry = exports.importWithRetry = /*#__PURE__*/function () {
830
831
  var downloadUrl = exports.downloadUrl = /*#__PURE__*/function () {
831
832
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(url) {
832
833
  var isIE11, isSafari, iframeName, link, iframe;
833
- return _regenerator.default.wrap(function _callee2$(_context2) {
834
+ return _regenerator.default.wrap(function (_context2) {
834
835
  while (1) switch (_context2.prev = _context2.next) {
835
836
  case 0:
836
837
  if (url) {
837
- _context2.next = 2;
838
+ _context2.next = 1;
838
839
  break;
839
840
  }
840
841
  return _context2.abrupt("return");
841
- case 2:
842
+ case 1:
842
843
  isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
843
844
  isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
844
845
  iframeName = 'media-download-iframe';
@@ -857,7 +858,7 @@ var downloadUrl = exports.downloadUrl = /*#__PURE__*/function () {
857
858
  document.body.appendChild(link);
858
859
  link.click();
859
860
  document.body.removeChild(link);
860
- case 14:
861
+ case 2:
861
862
  case "end":
862
863
  return _context2.stop();
863
864
  }
@@ -869,17 +870,17 @@ var downloadUrl = exports.downloadUrl = /*#__PURE__*/function () {
869
870
  }();
870
871
  var openUrl = exports.openUrl = /*#__PURE__*/function () {
871
872
  var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(url) {
872
- return _regenerator.default.wrap(function _callee3$(_context3) {
873
+ return _regenerator.default.wrap(function (_context3) {
873
874
  while (1) switch (_context3.prev = _context3.next) {
874
875
  case 0:
875
876
  if (url) {
876
- _context3.next = 2;
877
+ _context3.next = 1;
877
878
  break;
878
879
  }
879
880
  return _context3.abrupt("return");
880
- case 2:
881
+ case 1:
881
882
  window.open(url, '_blank', 'noopener=yes');
882
- case 3:
883
+ case 2:
883
884
  case "end":
884
885
  return _context3.stop();
885
886
  }
@@ -259,14 +259,14 @@ var fakeFactory = exports.fakeFactory = function fakeFactory(implementation, imp
259
259
  value: // @ts-ignore
260
260
  function () {
261
261
  var _fetchData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) {
262
- return _regenerator.default.wrap(function _callee$(_context) {
262
+ return _regenerator.default.wrap(function (_context) {
263
263
  while (1) switch (_context.prev = _context.next) {
264
264
  case 0:
265
- _context.next = 2;
265
+ _context.next = 1;
266
266
  return implementation(url);
267
- case 2:
267
+ case 1:
268
268
  return _context.abrupt("return", _context.sent);
269
- case 3:
269
+ case 2:
270
270
  case "end":
271
271
  return _context.stop();
272
272
  }
@@ -281,14 +281,14 @@ var fakeFactory = exports.fakeFactory = function fakeFactory(implementation, imp
281
281
  key: "postData",
282
282
  value: function () {
283
283
  var _postData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
284
- return _regenerator.default.wrap(function _callee2$(_context2) {
284
+ return _regenerator.default.wrap(function (_context2) {
285
285
  while (1) switch (_context2.prev = _context2.next) {
286
286
  case 0:
287
- _context2.next = 2;
287
+ _context2.next = 1;
288
288
  return implementationPost();
289
- case 2:
289
+ case 1:
290
290
  return _context2.abrupt("return", _context2.sent);
291
- case 3:
291
+ case 2:
292
292
  case "end":
293
293
  return _context2.stop();
294
294
  }
@@ -303,14 +303,14 @@ var fakeFactory = exports.fakeFactory = function fakeFactory(implementation, imp
303
303
  key: "prefetchData",
304
304
  value: function () {
305
305
  var _prefetchData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
306
- return _regenerator.default.wrap(function _callee3$(_context3) {
306
+ return _regenerator.default.wrap(function (_context3) {
307
307
  while (1) switch (_context3.prev = _context3.next) {
308
308
  case 0:
309
- _context3.next = 2;
309
+ _context3.next = 1;
310
310
  return implementationPrefetch();
311
- case 2:
311
+ case 1:
312
312
  return _context3.abrupt("return", _context3.sent);
313
- case 3:
313
+ case 2:
314
314
  case "end":
315
315
  return _context3.stop();
316
316
  }
@@ -325,14 +325,14 @@ var fakeFactory = exports.fakeFactory = function fakeFactory(implementation, imp
325
325
  key: "fetchDataAris",
326
326
  value: function () {
327
327
  var _fetchDataAris = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(aris) {
328
- return _regenerator.default.wrap(function _callee4$(_context4) {
328
+ return _regenerator.default.wrap(function (_context4) {
329
329
  while (1) switch (_context4.prev = _context4.next) {
330
330
  case 0:
331
- _context4.next = 2;
331
+ _context4.next = 1;
332
332
  return implementationAri(aris);
333
- case 2:
333
+ case 1:
334
334
  return _context4.abrupt("return", _context4.sent);
335
- case 3:
335
+ case 2:
336
336
  case "end":
337
337
  return _context4.stop();
338
338
  }
@@ -43,7 +43,7 @@ function _openEmbedModal() {
43
43
  popupMountPoint,
44
44
  Modal,
45
45
  _args = arguments;
46
- return _regenerator.default.wrap(function _callee$(_context2) {
46
+ return _regenerator.default.wrap(function (_context2) {
47
47
  while (1) switch (_context2.prev = _context2.next) {
48
48
  case 0:
49
49
  _ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
@@ -55,11 +55,11 @@ function _openEmbedModal() {
55
55
  popupMountPoint.setAttribute('data-testid', 'preview-modal');
56
56
  document.body.appendChild(popupMountPoint);
57
57
  }
58
- _context2.next = 6;
58
+ _context2.next = 1;
59
59
  return Promise.resolve().then(function () {
60
60
  return _interopRequireWildcard(require('./index'));
61
61
  });
62
- case 6:
62
+ case 1:
63
63
  Modal = _context2.sent;
64
64
  _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
65
65
  locale: "en"
@@ -75,7 +75,7 @@ function _openEmbedModal() {
75
75
  },
76
76
  showModal: true
77
77
  }))), popupMountPoint);
78
- case 8:
78
+ case 2:
79
79
  case "end":
80
80
  return _context2.stop();
81
81
  }