@atlaskit/smart-card 44.16.5 → 44.17.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.
Files changed (219) hide show
  1. package/CHANGELOG.md +17 -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/i18n/cs.js +3 -180
  9. package/dist/cjs/i18n/da.js +3 -180
  10. package/dist/cjs/i18n/de.js +3 -180
  11. package/dist/cjs/i18n/en.js +3 -182
  12. package/dist/cjs/i18n/en_GB.js +3 -182
  13. package/dist/cjs/i18n/en_ZZ.js +3 -182
  14. package/dist/cjs/i18n/es.js +3 -180
  15. package/dist/cjs/i18n/fi.js +3 -180
  16. package/dist/cjs/i18n/fr.js +3 -180
  17. package/dist/cjs/i18n/hr.js +3 -175
  18. package/dist/cjs/i18n/hu.js +3 -180
  19. package/dist/cjs/i18n/it.js +3 -180
  20. package/dist/cjs/i18n/ja.js +3 -180
  21. package/dist/cjs/i18n/ko.js +3 -180
  22. package/dist/cjs/i18n/nb.js +3 -180
  23. package/dist/cjs/i18n/nl.js +3 -180
  24. package/dist/cjs/i18n/pl.js +3 -180
  25. package/dist/cjs/i18n/pt_BR.js +3 -180
  26. package/dist/cjs/i18n/ru.js +3 -180
  27. package/dist/cjs/i18n/sl.js +3 -175
  28. package/dist/cjs/i18n/sr_RS.js +3 -175
  29. package/dist/cjs/i18n/sr_YR.js +3 -175
  30. package/dist/cjs/i18n/sv.js +3 -180
  31. package/dist/cjs/i18n/th.js +3 -180
  32. package/dist/cjs/i18n/tr.js +3 -180
  33. package/dist/cjs/i18n/uk.js +3 -180
  34. package/dist/cjs/i18n/vi.js +3 -180
  35. package/dist/cjs/i18n/zh.js +3 -180
  36. package/dist/cjs/i18n/zh_TW.js +3 -180
  37. package/dist/cjs/state/actions/index.js +7 -7
  38. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +46 -46
  39. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/readStream.js +44 -44
  40. package/dist/cjs/state/hooks/use-incoming-outgoing-links/index.js +34 -34
  41. package/dist/cjs/state/hooks/use-invoke/index.js +4 -4
  42. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +12 -12
  43. package/dist/cjs/state/hooks/use-resolve/index.js +4 -4
  44. package/dist/cjs/state/hooks/usePrefetch.js +14 -14
  45. package/dist/cjs/state/services/current-site-cloud-id/index.js +16 -16
  46. package/dist/cjs/state/services/personalization/index.js +23 -23
  47. package/dist/cjs/utils/analytics/analytics.js +1 -1
  48. package/dist/cjs/utils/index.js +26 -25
  49. package/dist/cjs/utils/mocks.js +16 -16
  50. package/dist/cjs/view/EmbedModal/utils.js +4 -4
  51. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +17 -17
  52. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +8 -8
  53. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +2 -2
  54. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +10 -10
  55. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +31 -31
  56. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +10 -10
  57. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -4
  58. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -1
  59. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +34 -34
  60. package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +1 -1
  61. package/dist/cjs/view/InlineCard/common/action-button/index.js +1 -1
  62. package/dist/cjs/view/LinkUrl/index.js +1 -1
  63. package/dist/cjs/view/RelatedLinksModal/index.js +41 -41
  64. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
  65. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
  66. package/dist/es2019/i18n/cs.js +3 -180
  67. package/dist/es2019/i18n/da.js +3 -180
  68. package/dist/es2019/i18n/de.js +3 -180
  69. package/dist/es2019/i18n/en.js +3 -182
  70. package/dist/es2019/i18n/en_GB.js +3 -182
  71. package/dist/es2019/i18n/en_ZZ.js +3 -182
  72. package/dist/es2019/i18n/es.js +3 -180
  73. package/dist/es2019/i18n/fi.js +3 -180
  74. package/dist/es2019/i18n/fr.js +3 -180
  75. package/dist/es2019/i18n/hr.js +3 -175
  76. package/dist/es2019/i18n/hu.js +3 -180
  77. package/dist/es2019/i18n/it.js +3 -180
  78. package/dist/es2019/i18n/ja.js +3 -180
  79. package/dist/es2019/i18n/ko.js +3 -180
  80. package/dist/es2019/i18n/nb.js +3 -180
  81. package/dist/es2019/i18n/nl.js +3 -180
  82. package/dist/es2019/i18n/pl.js +3 -180
  83. package/dist/es2019/i18n/pt_BR.js +3 -180
  84. package/dist/es2019/i18n/ru.js +3 -180
  85. package/dist/es2019/i18n/sl.js +3 -175
  86. package/dist/es2019/i18n/sr_RS.js +3 -175
  87. package/dist/es2019/i18n/sr_YR.js +3 -175
  88. package/dist/es2019/i18n/sv.js +3 -180
  89. package/dist/es2019/i18n/th.js +3 -180
  90. package/dist/es2019/i18n/tr.js +3 -180
  91. package/dist/es2019/i18n/uk.js +3 -180
  92. package/dist/es2019/i18n/vi.js +3 -180
  93. package/dist/es2019/i18n/zh.js +3 -180
  94. package/dist/es2019/i18n/zh_TW.js +3 -180
  95. package/dist/es2019/utils/analytics/analytics.js +1 -1
  96. package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +1 -1
  97. package/dist/es2019/view/InlineCard/common/action-button/index.js +1 -1
  98. package/dist/es2019/view/LinkUrl/index.js +1 -1
  99. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
  100. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
  101. package/dist/esm/extractors/action/extract-invoke-copy-link-action.js +1 -1
  102. package/dist/esm/extractors/action/extract-invoke-download-action.js +1 -1
  103. package/dist/esm/extractors/action/extract-invoke-preview-action.js +7 -7
  104. package/dist/esm/extractors/action/extract-invoke-view-action.js +1 -1
  105. package/dist/esm/i18n/cs.js +3 -180
  106. package/dist/esm/i18n/da.js +3 -180
  107. package/dist/esm/i18n/de.js +3 -180
  108. package/dist/esm/i18n/en.js +3 -182
  109. package/dist/esm/i18n/en_GB.js +3 -182
  110. package/dist/esm/i18n/en_ZZ.js +3 -182
  111. package/dist/esm/i18n/es.js +3 -180
  112. package/dist/esm/i18n/fi.js +3 -180
  113. package/dist/esm/i18n/fr.js +3 -180
  114. package/dist/esm/i18n/hr.js +3 -175
  115. package/dist/esm/i18n/hu.js +3 -180
  116. package/dist/esm/i18n/it.js +3 -180
  117. package/dist/esm/i18n/ja.js +3 -180
  118. package/dist/esm/i18n/ko.js +3 -180
  119. package/dist/esm/i18n/nb.js +3 -180
  120. package/dist/esm/i18n/nl.js +3 -180
  121. package/dist/esm/i18n/pl.js +3 -180
  122. package/dist/esm/i18n/pt_BR.js +3 -180
  123. package/dist/esm/i18n/ru.js +3 -180
  124. package/dist/esm/i18n/sl.js +3 -175
  125. package/dist/esm/i18n/sr_RS.js +3 -175
  126. package/dist/esm/i18n/sr_YR.js +3 -175
  127. package/dist/esm/i18n/sv.js +3 -180
  128. package/dist/esm/i18n/th.js +3 -180
  129. package/dist/esm/i18n/tr.js +3 -180
  130. package/dist/esm/i18n/uk.js +3 -180
  131. package/dist/esm/i18n/vi.js +3 -180
  132. package/dist/esm/i18n/zh.js +3 -180
  133. package/dist/esm/i18n/zh_TW.js +3 -180
  134. package/dist/esm/state/actions/index.js +7 -7
  135. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +46 -46
  136. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/readStream.js +44 -44
  137. package/dist/esm/state/hooks/use-incoming-outgoing-links/index.js +34 -34
  138. package/dist/esm/state/hooks/use-invoke/index.js +4 -4
  139. package/dist/esm/state/hooks/use-invoke-client-action/index.js +11 -11
  140. package/dist/esm/state/hooks/use-resolve/index.js +4 -4
  141. package/dist/esm/state/hooks/usePrefetch.js +14 -14
  142. package/dist/esm/state/services/current-site-cloud-id/index.js +16 -16
  143. package/dist/esm/state/services/personalization/index.js +23 -23
  144. package/dist/esm/utils/analytics/analytics.js +1 -1
  145. package/dist/esm/utils/index.js +25 -24
  146. package/dist/esm/utils/mocks.js +16 -16
  147. package/dist/esm/view/EmbedModal/utils.js +4 -4
  148. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +16 -16
  149. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +8 -8
  150. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +2 -2
  151. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +10 -10
  152. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +30 -30
  153. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +10 -10
  154. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -4
  155. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -1
  156. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +33 -33
  157. package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +1 -1
  158. package/dist/esm/view/InlineCard/common/action-button/index.js +1 -1
  159. package/dist/esm/view/LinkUrl/index.js +1 -1
  160. package/dist/esm/view/RelatedLinksModal/index.js +40 -40
  161. package/dist/types/i18n/cs.d.ts +2 -180
  162. package/dist/types/i18n/da.d.ts +2 -180
  163. package/dist/types/i18n/de.d.ts +2 -180
  164. package/dist/types/i18n/en.d.ts +2 -182
  165. package/dist/types/i18n/en_GB.d.ts +2 -182
  166. package/dist/types/i18n/en_ZZ.d.ts +2 -182
  167. package/dist/types/i18n/es.d.ts +2 -180
  168. package/dist/types/i18n/fi.d.ts +2 -180
  169. package/dist/types/i18n/fr.d.ts +2 -180
  170. package/dist/types/i18n/hr.d.ts +2 -175
  171. package/dist/types/i18n/hu.d.ts +2 -180
  172. package/dist/types/i18n/it.d.ts +2 -180
  173. package/dist/types/i18n/ja.d.ts +2 -180
  174. package/dist/types/i18n/ko.d.ts +2 -180
  175. package/dist/types/i18n/nb.d.ts +2 -180
  176. package/dist/types/i18n/nl.d.ts +2 -180
  177. package/dist/types/i18n/pl.d.ts +2 -180
  178. package/dist/types/i18n/pt_BR.d.ts +2 -180
  179. package/dist/types/i18n/ru.d.ts +2 -180
  180. package/dist/types/i18n/sl.d.ts +2 -175
  181. package/dist/types/i18n/sr_RS.d.ts +2 -175
  182. package/dist/types/i18n/sr_YR.d.ts +2 -175
  183. package/dist/types/i18n/sv.d.ts +2 -180
  184. package/dist/types/i18n/th.d.ts +2 -180
  185. package/dist/types/i18n/tr.d.ts +2 -180
  186. package/dist/types/i18n/uk.d.ts +2 -180
  187. package/dist/types/i18n/vi.d.ts +2 -180
  188. package/dist/types/i18n/zh.d.ts +2 -180
  189. package/dist/types/i18n/zh_TW.d.ts +2 -180
  190. package/dist/types-ts4.5/i18n/cs.d.ts +2 -180
  191. package/dist/types-ts4.5/i18n/da.d.ts +2 -180
  192. package/dist/types-ts4.5/i18n/de.d.ts +2 -180
  193. package/dist/types-ts4.5/i18n/en.d.ts +2 -182
  194. package/dist/types-ts4.5/i18n/en_GB.d.ts +2 -182
  195. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -182
  196. package/dist/types-ts4.5/i18n/es.d.ts +2 -180
  197. package/dist/types-ts4.5/i18n/fi.d.ts +2 -180
  198. package/dist/types-ts4.5/i18n/fr.d.ts +2 -180
  199. package/dist/types-ts4.5/i18n/hr.d.ts +2 -175
  200. package/dist/types-ts4.5/i18n/hu.d.ts +2 -180
  201. package/dist/types-ts4.5/i18n/it.d.ts +2 -180
  202. package/dist/types-ts4.5/i18n/ja.d.ts +2 -180
  203. package/dist/types-ts4.5/i18n/ko.d.ts +2 -180
  204. package/dist/types-ts4.5/i18n/nb.d.ts +2 -180
  205. package/dist/types-ts4.5/i18n/nl.d.ts +2 -180
  206. package/dist/types-ts4.5/i18n/pl.d.ts +2 -180
  207. package/dist/types-ts4.5/i18n/pt_BR.d.ts +2 -180
  208. package/dist/types-ts4.5/i18n/ru.d.ts +2 -180
  209. package/dist/types-ts4.5/i18n/sl.d.ts +2 -175
  210. package/dist/types-ts4.5/i18n/sr_RS.d.ts +2 -175
  211. package/dist/types-ts4.5/i18n/sr_YR.d.ts +2 -175
  212. package/dist/types-ts4.5/i18n/sv.d.ts +2 -180
  213. package/dist/types-ts4.5/i18n/th.d.ts +2 -180
  214. package/dist/types-ts4.5/i18n/tr.d.ts +2 -180
  215. package/dist/types-ts4.5/i18n/uk.d.ts +2 -180
  216. package/dist/types-ts4.5/i18n/vi.d.ts +2 -180
  217. package/dist/types-ts4.5/i18n/zh.d.ts +2 -180
  218. package/dist/types-ts4.5/i18n/zh_TW.d.ts +2 -180
  219. package/package.json +8 -8
@@ -10,99 +10,99 @@ export function readStream(_x) {
10
10
  }
11
11
  function _readStream() {
12
12
  _readStream = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
13
- var reader, doneStreaming, chunkBuffer, _yield$_awaitAsyncGen, value, done, processedChunks, _iterator, _step, chunk, jsonChunk, error;
14
- return _regeneratorRuntime.wrap(function _callee$(_context) {
13
+ var reader, doneStreaming, chunkBuffer, _yield$_awaitAsyncGen, value, done, processedChunks, _iterator, _step, chunk, jsonChunk, error, _t, _t2, _t3;
14
+ return _regeneratorRuntime.wrap(function (_context) {
15
15
  while (1) switch (_context.prev = _context.next) {
16
16
  case 0:
17
17
  reader = getBufferReader(response);
18
18
  doneStreaming = false;
19
19
  chunkBuffer = '';
20
- case 3:
21
- _context.prev = 3;
22
- _context.next = 6;
20
+ case 1:
21
+ _context.prev = 1;
22
+ _context.next = 2;
23
23
  return _awaitAsyncGenerator(reader.read());
24
- case 6:
24
+ case 2:
25
25
  _yield$_awaitAsyncGen = _context.sent;
26
26
  value = _yield$_awaitAsyncGen.value;
27
27
  done = _yield$_awaitAsyncGen.done;
28
28
  doneStreaming = done;
29
29
  if (!value) {
30
- _context.next = 38;
30
+ _context.next = 12;
31
31
  break;
32
32
  }
33
33
  processedChunks = "".concat(chunkBuffer).concat(value).split('\n'); // assumes that all JSON chunks are separated by a new-line;
34
34
  chunkBuffer = '';
35
35
  _iterator = _createForOfIteratorHelper(processedChunks);
36
- _context.prev = 14;
36
+ _context.prev = 3;
37
37
  _iterator.s();
38
- case 16:
38
+ case 4:
39
39
  if ((_step = _iterator.n()).done) {
40
- _context.next = 30;
40
+ _context.next = 9;
41
41
  break;
42
42
  }
43
43
  chunk = _step.value;
44
- _context.prev = 18;
44
+ _context.prev = 5;
45
45
  jsonChunk = JSON.parse(chunk);
46
46
  if (jsonChunk.type === 'ERROR') {
47
47
  reader.cancel();
48
48
  }
49
- _context.next = 23;
49
+ _context.next = 6;
50
50
  return jsonChunk;
51
- case 23:
52
- _context.next = 28;
51
+ case 6:
52
+ _context.next = 8;
53
53
  break;
54
- case 25:
55
- _context.prev = 25;
56
- _context.t0 = _context["catch"](18);
54
+ case 7:
55
+ _context.prev = 7;
56
+ _t = _context["catch"](5);
57
57
  // the chunk may be incomplete, so we'll save it for the next iteration.
58
58
  chunkBuffer = chunk;
59
- case 28:
60
- _context.next = 16;
59
+ case 8:
60
+ _context.next = 4;
61
61
  break;
62
- case 30:
63
- _context.next = 35;
62
+ case 9:
63
+ _context.next = 11;
64
64
  break;
65
- case 32:
66
- _context.prev = 32;
67
- _context.t1 = _context["catch"](14);
68
- _iterator.e(_context.t1);
69
- case 35:
70
- _context.prev = 35;
65
+ case 10:
66
+ _context.prev = 10;
67
+ _t2 = _context["catch"](3);
68
+ _iterator.e(_t2);
69
+ case 11:
70
+ _context.prev = 11;
71
71
  _iterator.f();
72
- return _context.finish(35);
73
- case 38:
74
- _context.next = 48;
72
+ return _context.finish(11);
73
+ case 12:
74
+ _context.next = 15;
75
75
  break;
76
- case 40:
77
- _context.prev = 40;
78
- _context.t2 = _context["catch"](3);
79
- if (!(_context.t2 instanceof DOMException && _context.t2.name === 'AbortError')) {
80
- _context.next = 46;
76
+ case 13:
77
+ _context.prev = 13;
78
+ _t3 = _context["catch"](1);
79
+ if (!(_t3 instanceof DOMException && _t3.name === 'AbortError')) {
80
+ _context.next = 14;
81
81
  break;
82
82
  }
83
83
  doneStreaming = true;
84
- _context.next = 48;
84
+ _context.next = 15;
85
85
  break;
86
- case 46:
86
+ case 14:
87
87
  reader.cancel();
88
- throw _context.t2;
89
- case 48:
88
+ throw _t3;
89
+ case 15:
90
90
  if (!doneStreaming) {
91
- _context.next = 3;
91
+ _context.next = 1;
92
92
  break;
93
93
  }
94
- case 49:
94
+ case 16:
95
95
  if (!chunkBuffer) {
96
- _context.next = 52;
96
+ _context.next = 17;
97
97
  break;
98
98
  }
99
99
  error = new Error("Not all the data was processed: ".concat(chunkBuffer));
100
100
  throw error;
101
- case 52:
101
+ case 17:
102
102
  case "end":
103
103
  return _context.stop();
104
104
  }
105
- }, _callee, null, [[3, 40], [14, 32, 35, 38], [18, 25]]);
105
+ }, _callee, null, [[1, 13], [3, 10, 11, 12], [5, 7]]);
106
106
  }));
107
107
  return _readStream.apply(this, arguments);
108
108
  }
@@ -12,7 +12,7 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
12
12
  var baseUriWithNoTrailingSlash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13
13
  var aggRequestCall = useCallback( /*#__PURE__*/function () {
14
14
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(body, headers) {
15
- return _regeneratorRuntime.wrap(function _callee$(_context) {
15
+ return _regeneratorRuntime.wrap(function (_context) {
16
16
  while (1) switch (_context.prev = _context.next) {
17
17
  case 0:
18
18
  return _context.abrupt("return", request('post', baseUriWithNoTrailingSlash + '/gateway/api/graphql', body, headers, [200]));
@@ -27,30 +27,30 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
27
27
  };
28
28
  }(), [baseUriWithNoTrailingSlash]);
29
29
  var getCurrentSiteId = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
30
- var response;
31
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
30
+ var response, _t;
31
+ return _regeneratorRuntime.wrap(function (_context2) {
32
32
  while (1) switch (_context2.prev = _context2.next) {
33
33
  case 0:
34
34
  _context2.prev = 0;
35
- _context2.next = 3;
35
+ _context2.next = 1;
36
36
  return request('get', baseUriWithNoTrailingSlash + '/_edge/tenant_info');
37
- case 3:
37
+ case 1:
38
38
  response = _context2.sent;
39
39
  return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.cloudId);
40
- case 7:
41
- _context2.prev = 7;
42
- _context2.t0 = _context2["catch"](0);
40
+ case 2:
41
+ _context2.prev = 2;
42
+ _t = _context2["catch"](0);
43
43
  return _context2.abrupt("return", undefined);
44
- case 10:
44
+ case 3:
45
45
  case "end":
46
46
  return _context2.stop();
47
47
  }
48
- }, _callee2, null, [[0, 7]]);
48
+ }, _callee2, null, [[0, 2]]);
49
49
  })), [baseUriWithNoTrailingSlash]);
50
50
  var getSiteId = useCallback( /*#__PURE__*/function () {
51
51
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(resourceAri) {
52
- var ariPattern, match;
53
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
52
+ var ariPattern, match, _t2;
53
+ return _regeneratorRuntime.wrap(function (_context3) {
54
54
  while (1) switch (_context3.prev = _context3.next) {
55
55
  case 0:
56
56
  // ARI pattern that matches both formats:
@@ -67,29 +67,29 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
67
67
  ariPattern = /^ari:cloud:([a-z][a-z.-]+):([a-zA-Z0-9_.-]+):([a-z][a-zA-Z.-]+)\/(.+)$/;
68
68
  match = resourceAri.match(ariPattern);
69
69
  if (!(match && match[2])) {
70
- _context3.next = 4;
70
+ _context3.next = 1;
71
71
  break;
72
72
  }
73
73
  return _context3.abrupt("return", match[2]);
74
- case 4:
74
+ case 1:
75
75
  if (!fg('platform_sl_incoming_outgoing_tenant_info_killswitch')) {
76
- _context3.next = 10;
76
+ _context3.next = 3;
77
77
  break;
78
78
  }
79
- _context3.next = 7;
79
+ _context3.next = 2;
80
80
  return getCurrentSiteCloudId(baseUriWithNoTrailingSlash);
81
- case 7:
82
- _context3.t0 = _context3.sent;
83
- _context3.next = 13;
81
+ case 2:
82
+ _t2 = _context3.sent;
83
+ _context3.next = 5;
84
84
  break;
85
- case 10:
86
- _context3.next = 12;
85
+ case 3:
86
+ _context3.next = 4;
87
87
  return getCurrentSiteId();
88
- case 12:
89
- _context3.t0 = _context3.sent;
90
- case 13:
91
- return _context3.abrupt("return", _context3.t0);
92
- case 14:
88
+ case 4:
89
+ _t2 = _context3.sent;
90
+ case 5:
91
+ return _context3.abrupt("return", _t2);
92
+ case 6:
93
93
  case "end":
94
94
  return _context3.stop();
95
95
  }
@@ -120,28 +120,28 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
120
120
  incomingAris,
121
121
  outgoingAris,
122
122
  _args4 = arguments;
123
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
123
+ return _regeneratorRuntime.wrap(function (_context4) {
124
124
  while (1) switch (_context4.prev = _context4.next) {
125
125
  case 0:
126
126
  firstIncoming = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : 50;
127
127
  firstOutgoing = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : 50;
128
- _context4.next = 4;
128
+ _context4.next = 1;
129
129
  return getSiteId(ari);
130
- case 4:
130
+ case 1:
131
131
  siteId = _context4.sent;
132
132
  if (siteId) {
133
- _context4.next = 7;
133
+ _context4.next = 2;
134
134
  break;
135
135
  }
136
136
  return _context4.abrupt("return", {
137
137
  incomingAris: [],
138
138
  outgoingAris: []
139
139
  });
140
- case 7:
140
+ case 2:
141
141
  headers = {
142
142
  'X-Query-Context': "ari:cloud:platform::site/".concat(siteId)
143
143
  };
144
- _context4.next = 10;
144
+ _context4.next = 3;
145
145
  return aggRequestCall({
146
146
  variables: {
147
147
  id: ari,
@@ -150,7 +150,7 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
150
150
  },
151
151
  query: queryIncomingOutgoingAris
152
152
  }, headers);
153
- case 10:
153
+ case 3:
154
154
  response = _context4.sent;
155
155
  incomingAris = (_response$data$graphS = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 || (_response$data = _response$data.graphStore) === null || _response$data === void 0 || (_response$data = _response$data.incoming) === null || _response$data === void 0 || (_response$data = _response$data.aris) === null || _response$data === void 0 || (_response$data = _response$data.map(function (node) {
156
156
  return node === null || node === void 0 ? void 0 : node.id;
@@ -166,7 +166,7 @@ var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
166
166
  incomingAris: incomingAris,
167
167
  outgoingAris: outgoingAris
168
168
  });
169
- case 14:
169
+ case 4:
170
170
  case "end":
171
171
  return _context4.stop();
172
172
  }
@@ -10,15 +10,15 @@ var useInvoke = function useInvoke() {
10
10
  return useCallback( /*#__PURE__*/function () {
11
11
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(req, cb) {
12
12
  var response;
13
- return _regeneratorRuntime.wrap(function _callee$(_context) {
13
+ return _regeneratorRuntime.wrap(function (_context) {
14
14
  while (1) switch (_context.prev = _context.next) {
15
15
  case 0:
16
- _context.next = 2;
16
+ _context.next = 1;
17
17
  return clientExt.invoke(req);
18
- case 2:
18
+ case 1:
19
19
  response = _context.sent;
20
20
  return _context.abrupt("return", cb ? cb(response) : response);
21
- case 4:
21
+ case 2:
22
22
  case "end":
23
23
  return _context.stop();
24
24
  }
@@ -19,8 +19,8 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
19
19
  var fireEvent = fireEventProp !== null && fireEventProp !== void 0 ? fireEventProp : defaultFireEvent;
20
20
  return useCallback( /*#__PURE__*/function () {
21
21
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
22
- 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;
23
- return _regeneratorRuntime.wrap(function _callee$(_context) {
22
+ 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;
23
+ return _regeneratorRuntime.wrap(function (_context) {
24
24
  while (1) switch (_context.prev = _context.next) {
25
25
  case 0:
26
26
  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;
@@ -28,7 +28,7 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
28
28
  experienceId = uuid(); // Begin performance instrumentation.
29
29
  markName = "".concat(experienceId, "-").concat(actionType);
30
30
  measure.mark(markName, 'pending');
31
- _context.prev = 4;
31
+ _context.prev = 1;
32
32
  // Begin UFO experience
33
33
  startUfoExperience(ACTION_EXPERIENCE_NAME, experienceId, {
34
34
  actionType: actionType,
@@ -49,9 +49,9 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
49
49
  });
50
50
  }
51
51
  // Invoke action
52
- _context.next = 9;
52
+ _context.next = 2;
53
53
  return actionFn();
54
- case 9:
54
+ case 2:
55
55
  result = _context.sent;
56
56
  measure.mark(markName, 'resolved');
57
57
  succeedUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
@@ -64,12 +64,12 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
64
64
  resourceType: resourceType
65
65
  });
66
66
  return _context.abrupt("return", result);
67
- case 16:
68
- _context.prev = 16;
69
- _context.t0 = _context["catch"](4);
67
+ case 3:
68
+ _context.prev = 3;
69
+ _t = _context["catch"](1);
70
70
  measure.mark(markName, 'errored');
71
71
  failUfoExperience(ACTION_EXPERIENCE_NAME, experienceId);
72
- reason = typeof _context.t0 === 'string' ? _context.t0 : _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message;
72
+ reason = typeof _t === 'string' ? _t : _t === null || _t === void 0 ? void 0 : _t.message;
73
73
  fireEvent('operational.smartLinkAction.unresolved', {
74
74
  actionType: actionType !== null && actionType !== void 0 ? actionType : null,
75
75
  definitionId: definitionId,
@@ -79,11 +79,11 @@ var useInvokeClientAction = function useInvokeClientAction(_ref) {
79
79
  reason: reason,
80
80
  resourceType: resourceType
81
81
  });
82
- case 22:
82
+ case 4:
83
83
  case "end":
84
84
  return _context.stop();
85
85
  }
86
- }, _callee, null, [[4, 16]]);
86
+ }, _callee, null, [[1, 3]]);
87
87
  }));
88
88
  return function (_x) {
89
89
  return _ref3.apply(this, arguments);
@@ -27,7 +27,7 @@ var useResolve = function useResolve() {
27
27
  details,
28
28
  hasData,
29
29
  _args = arguments;
30
- return _regeneratorRuntime.wrap(function _callee$(_context) {
30
+ return _regeneratorRuntime.wrap(function (_context) {
31
31
  while (1) switch (_context.prev = _context.next) {
32
32
  case 0:
33
33
  isReloading = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
@@ -39,7 +39,7 @@ var useResolve = function useResolve() {
39
39
  }, details = _ref2.details;
40
40
  hasData = !!(details && details.data || isEntityPresent(details));
41
41
  if (!(isReloading || !hasData || isMetadataRequest)) {
42
- _context.next = 9;
42
+ _context.next = 1;
43
43
  break;
44
44
  }
45
45
  return _context.abrupt("return", connections.client.fetchData(url, isReloading).then(function (response) {
@@ -47,11 +47,11 @@ var useResolve = function useResolve() {
47
47
  }).catch(function (error) {
48
48
  return handleResolvedLinkError(url, error, undefined, isMetadataRequest);
49
49
  }));
50
- case 9:
50
+ case 1:
51
51
  addMetadataToExperience('smart-link-rendered', id, {
52
52
  cached: true
53
53
  });
54
- case 10:
54
+ case 2:
55
55
  case "end":
56
56
  return _context.stop();
57
57
  }
@@ -14,16 +14,16 @@ export function usePrefetch(url) {
14
14
  var _ref2 = connections || {},
15
15
  client = _ref2.client;
16
16
  return useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
17
- var isPrefetching, isFetching, needsPrefetch, response;
18
- return _regeneratorRuntime.wrap(function _callee$(_context) {
17
+ var isPrefetching, isFetching, needsPrefetch, response, _t;
18
+ return _regeneratorRuntime.wrap(function (_context) {
19
19
  while (1) switch (_context.prev = _context.next) {
20
20
  case 0:
21
21
  if (!(!store || !prefetchStore || !connections)) {
22
- _context.next = 2;
22
+ _context.next = 1;
23
23
  break;
24
24
  }
25
25
  return _context.abrupt("return");
26
- case 2:
26
+ case 1:
27
27
  // If the link is already being prefetched, the prefetch store
28
28
  // should have a flag set against the URL. The prefetch store is purposefully
29
29
  // separate from the UI in order to ensure no rendering takes place;
@@ -34,7 +34,7 @@ export function usePrefetch(url) {
34
34
  isFetching = getState()[url]; // We compute if a link needs to be prefetched thus, referencing the above.
35
35
  needsPrefetch = !isPrefetching && !isFetching;
36
36
  if (!needsPrefetch) {
37
- _context.next = 16;
37
+ _context.next = 5;
38
38
  break;
39
39
  }
40
40
  // We specify in the prefetch store that this link no
@@ -45,10 +45,10 @@ export function usePrefetch(url) {
45
45
  // Try fetch the data for this URL from Object Resolver Service (ORS), executing batch
46
46
  // requests by domain (as usual) to ensure we minimize the amount of connections
47
47
  // we create between browser -> ORS when making network requests.
48
- _context.prev = 7;
49
- _context.next = 10;
48
+ _context.prev = 2;
49
+ _context.next = 3;
50
50
  return client.prefetchData(url);
51
- case 10:
51
+ case 3:
52
52
  response = _context.sent;
53
53
  // Once the data comes back, we put the link in the `resolved` status. This ensures
54
54
  // that when the link enters the viewport and is rendered, we immediately show it as
@@ -65,15 +65,15 @@ export function usePrefetch(url) {
65
65
  url: url
66
66
  }, undefined, undefined, 'resolved'));
67
67
  }
68
- _context.next = 16;
68
+ _context.next = 5;
69
69
  break;
70
- case 14:
71
- _context.prev = 14;
72
- _context.t0 = _context["catch"](7);
73
- case 16:
70
+ case 4:
71
+ _context.prev = 4;
72
+ _t = _context["catch"](2);
73
+ case 5:
74
74
  case "end":
75
75
  return _context.stop();
76
76
  }
77
- }, _callee, null, [[7, 14]]);
77
+ }, _callee, null, [[2, 4]]);
78
78
  })), [store, prefetchStore, connections, url, getState, client, dispatch]);
79
79
  }
@@ -67,33 +67,33 @@ export var CurrentSiteCloudIdService = /*#__PURE__*/function () {
67
67
  return existing;
68
68
  }
69
69
  var promise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
70
- var response, cloudId;
71
- return _regeneratorRuntime.wrap(function _callee$(_context) {
70
+ var response, cloudId, _t;
71
+ return _regeneratorRuntime.wrap(function (_context) {
72
72
  while (1) switch (_context.prev = _context.next) {
73
73
  case 0:
74
74
  _context.prev = 0;
75
- _context.next = 3;
75
+ _context.next = 1;
76
76
  return request('get', "".concat(baseUri, "/_edge/tenant_info"));
77
- case 3:
77
+ case 1:
78
78
  response = _context.sent;
79
79
  cloudId = response === null || response === void 0 ? void 0 : response.cloudId;
80
80
  if (cloudId) {
81
81
  _this.writeStoredCloudId(baseUri, cloudId);
82
82
  }
83
83
  return _context.abrupt("return", cloudId ? cloudId : _this.readStoredCloudId(baseUri));
84
- case 9:
85
- _context.prev = 9;
86
- _context.t0 = _context["catch"](0);
84
+ case 2:
85
+ _context.prev = 2;
86
+ _t = _context["catch"](0);
87
87
  return _context.abrupt("return", _this.readStoredCloudId(baseUri));
88
- case 12:
89
- _context.prev = 12;
88
+ case 3:
89
+ _context.prev = 3;
90
90
  _this.tenantInfoInflightPromises.delete(baseUri);
91
- return _context.finish(12);
92
- case 15:
91
+ return _context.finish(3);
92
+ case 4:
93
93
  case "end":
94
94
  return _context.stop();
95
95
  }
96
- }, _callee, null, [[0, 9, 12, 15]]);
96
+ }, _callee, null, [[0, 2, 3, 4]]);
97
97
  }))();
98
98
  this.tenantInfoInflightPromises.set(baseUri, promise);
99
99
  return promise;
@@ -121,19 +121,19 @@ export var CurrentSiteCloudIdService = /*#__PURE__*/function () {
121
121
  var baseUriWithNoTrailingSlash,
122
122
  fromStorage,
123
123
  _args2 = arguments;
124
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
124
+ return _regeneratorRuntime.wrap(function (_context2) {
125
125
  while (1) switch (_context2.prev = _context2.next) {
126
126
  case 0:
127
127
  baseUriWithNoTrailingSlash = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : '';
128
128
  fromStorage = this.readStoredCloudId(baseUriWithNoTrailingSlash);
129
129
  if (!fromStorage) {
130
- _context2.next = 4;
130
+ _context2.next = 1;
131
131
  break;
132
132
  }
133
133
  return _context2.abrupt("return", fromStorage);
134
- case 4:
134
+ case 1:
135
135
  return _context2.abrupt("return", this.ensureTenantInfoInflightStarted(baseUriWithNoTrailingSlash));
136
- case 5:
136
+ case 2:
137
137
  case "end":
138
138
  return _context2.stop();
139
139
  }
@@ -32,10 +32,10 @@ function _fetchSiteTraits() {
32
32
  _fetchSiteTraits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(cloudId) {
33
33
  var _data$attributes;
34
34
  var response, data;
35
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
35
+ return _regeneratorRuntime.wrap(function (_context3) {
36
36
  while (1) switch (_context3.prev = _context3.next) {
37
37
  case 0:
38
- _context3.next = 2;
38
+ _context3.next = 1;
39
39
  return fetch("".concat(BASE_URL, "/site/").concat(cloudId), {
40
40
  method: 'GET',
41
41
  credentials: 'include',
@@ -43,20 +43,20 @@ function _fetchSiteTraits() {
43
43
  'Content-Type': 'application/json'
44
44
  }
45
45
  });
46
- case 2:
46
+ case 1:
47
47
  response = _context3.sent;
48
48
  if (response.ok) {
49
- _context3.next = 5;
49
+ _context3.next = 2;
50
50
  break;
51
51
  }
52
52
  return _context3.abrupt("return", []);
53
- case 5:
54
- _context3.next = 7;
53
+ case 2:
54
+ _context3.next = 3;
55
55
  return response.json();
56
- case 7:
56
+ case 3:
57
57
  data = _context3.sent;
58
58
  return _context3.abrupt("return", (_data$attributes = data === null || data === void 0 ? void 0 : data.attributes) !== null && _data$attributes !== void 0 ? _data$attributes : []);
59
- case 9:
59
+ case 4:
60
60
  case "end":
61
61
  return _context3.stop();
62
62
  }
@@ -84,32 +84,32 @@ export var PersonalizationService = /*#__PURE__*/function () {
84
84
  var _getProviderPctMap = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cloudId, traitName) {
85
85
  var _this = this;
86
86
  var cacheKey, cachedPromise, promise, retryablePromise;
87
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
87
+ return _regeneratorRuntime.wrap(function (_context2) {
88
88
  while (1) switch (_context2.prev = _context2.next) {
89
89
  case 0:
90
90
  if (cloudId) {
91
- _context2.next = 2;
91
+ _context2.next = 1;
92
92
  break;
93
93
  }
94
94
  return _context2.abrupt("return", undefined);
95
- case 2:
95
+ case 1:
96
96
  cacheKey = scopedCacheKey(cloudId, traitName);
97
97
  cachedPromise = this.cache.get(cacheKey);
98
98
  if (!cachedPromise) {
99
- _context2.next = 6;
99
+ _context2.next = 2;
100
100
  break;
101
101
  }
102
102
  return _context2.abrupt("return", cachedPromise);
103
- case 6:
103
+ case 2:
104
104
  promise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
105
- var traits, trait, mapped;
106
- return _regeneratorRuntime.wrap(function _callee$(_context) {
105
+ var traits, trait, mapped, _t;
106
+ return _regeneratorRuntime.wrap(function (_context) {
107
107
  while (1) switch (_context.prev = _context.next) {
108
108
  case 0:
109
109
  _context.prev = 0;
110
- _context.next = 3;
110
+ _context.next = 1;
111
111
  return fetchSiteTraits(cloudId);
112
- case 3:
112
+ case 1:
113
113
  traits = _context.sent;
114
114
  trait = traits.find(function (t) {
115
115
  return t.name === traitName;
@@ -119,22 +119,22 @@ export var PersonalizationService = /*#__PURE__*/function () {
119
119
  _this.writeStoredProviderPctMap(cloudId, traitName, mapped);
120
120
  }
121
121
  return _context.abrupt("return", mapped);
122
- case 10:
123
- _context.prev = 10;
124
- _context.t0 = _context["catch"](0);
122
+ case 2:
123
+ _context.prev = 2;
124
+ _t = _context["catch"](0);
125
125
  return _context.abrupt("return", undefined);
126
- case 13:
126
+ case 3:
127
127
  case "end":
128
128
  return _context.stop();
129
129
  }
130
- }, _callee, null, [[0, 10]]);
130
+ }, _callee, null, [[0, 2]]);
131
131
  }))();
132
132
  retryablePromise = promise.finally(function () {
133
133
  _this.cache.delete(cacheKey);
134
134
  });
135
135
  this.cache.set(cacheKey, retryablePromise);
136
136
  return _context2.abrupt("return", retryablePromise);
137
- case 10:
137
+ case 3:
138
138
  case "end":
139
139
  return _context2.stop();
140
140
  }