@atlaskit/teams-public 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/common/utils/get-container-properties.js +5 -5
  3. package/dist/cjs/controllers/hooks/use-product-permission/index.js +1 -1
  4. package/dist/cjs/controllers/hooks/use-team-containers/index.js +81 -81
  5. package/dist/cjs/controllers/hooks/use-team-containers/multi-team.js +91 -91
  6. package/dist/cjs/controllers/hooks/use-team-links-and-containers/index.js +25 -25
  7. package/dist/cjs/controllers/hooks/use-team-web-links/index.js +65 -65
  8. package/dist/cjs/controllers/hooks/use-team-web-links/multi-team.js +73 -73
  9. package/dist/cjs/controllers/product-permission/main.js +19 -19
  10. package/dist/cjs/next/ui/team-containers/team-link-card/index.js +1 -23
  11. package/dist/cjs/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
  12. package/dist/cjs/ui/team-containers/disconnect-dialog/index.js +7 -7
  13. package/dist/cjs/ui/team-containers/main.js +9 -9
  14. package/dist/cjs/ui/team-containers/no-product-access-empty-state/index.js +1 -1
  15. package/dist/es2019/common/utils/get-container-properties.js +5 -5
  16. package/dist/es2019/next/ui/team-containers/team-link-card/index.js +2 -24
  17. package/dist/es2019/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
  18. package/dist/es2019/ui/team-containers/disconnect-dialog/index.js +4 -4
  19. package/dist/es2019/ui/team-containers/no-product-access-empty-state/index.js +1 -1
  20. package/dist/esm/common/utils/get-container-properties.js +5 -5
  21. package/dist/esm/controllers/hooks/use-product-permission/index.js +1 -1
  22. package/dist/esm/controllers/hooks/use-team-containers/index.js +81 -81
  23. package/dist/esm/controllers/hooks/use-team-containers/multi-team.js +91 -91
  24. package/dist/esm/controllers/hooks/use-team-links-and-containers/index.js +25 -25
  25. package/dist/esm/controllers/hooks/use-team-web-links/index.js +65 -65
  26. package/dist/esm/controllers/hooks/use-team-web-links/multi-team.js +73 -73
  27. package/dist/esm/controllers/product-permission/main.js +19 -19
  28. package/dist/esm/next/ui/team-containers/team-link-card/index.js +2 -24
  29. package/dist/esm/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
  30. package/dist/esm/ui/team-containers/disconnect-dialog/index.js +7 -7
  31. package/dist/esm/ui/team-containers/main.js +9 -9
  32. package/dist/esm/ui/team-containers/no-product-access-empty-state/index.js +1 -1
  33. package/package.json +12 -14
@@ -71,25 +71,25 @@ var actions = {
71
71
  fetchTeamContainers: function fetchTeamContainers(teamId, fireAnalytics, fireAnalyticsNext) {
72
72
  return /*#__PURE__*/function () {
73
73
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
74
- var setState, getState, _getState, teams, currentTeamState, containers, currentState, _currentTeamState, _currentState;
75
- return _regenerator.default.wrap(function _callee$(_context) {
74
+ var setState, getState, _getState, teams, currentTeamState, containers, currentState, _currentTeamState, _currentState, _t;
75
+ return _regenerator.default.wrap(function (_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
78
78
  setState = _ref.setState, getState = _ref.getState;
79
79
  _getState = getState(), teams = _getState.teams;
80
80
  currentTeamState = teams[teamId]; // Only skip if already loaded and not currently loading (prevents duplicate fetches)
81
81
  if (!(currentTeamState !== null && currentTeamState !== void 0 && currentTeamState.hasLoaded && !currentTeamState.loading)) {
82
- _context.next = 5;
82
+ _context.next = 1;
83
83
  break;
84
84
  }
85
85
  return _context.abrupt("return");
86
- case 5:
86
+ case 1:
87
87
  if (!(currentTeamState !== null && currentTeamState !== void 0 && currentTeamState.loading)) {
88
- _context.next = 7;
88
+ _context.next = 2;
89
89
  break;
90
90
  }
91
91
  return _context.abrupt("return");
92
- case 7:
92
+ case 2:
93
93
  setState({
94
94
  teams: _objectSpread(_objectSpread({}, teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, getInitialTeamState()), {}, {
95
95
  teamContainers: [],
@@ -98,10 +98,10 @@ var actions = {
98
98
  hasLoaded: false
99
99
  })))
100
100
  });
101
- _context.prev = 8;
102
- _context.next = 11;
101
+ _context.prev = 3;
102
+ _context.next = 4;
103
103
  return _teamsClient.teamsClient.getTeamContainers(teamId);
104
- case 11:
104
+ case 4:
105
105
  containers = _context.sent;
106
106
  fireAnalyticsNext('operational.fetchTeamContainers.succeeded', {
107
107
  teamId: teamId
@@ -111,11 +111,11 @@ var actions = {
111
111
  currentState = getState();
112
112
  _currentTeamState = currentState.teams[teamId];
113
113
  if (!(!_currentTeamState || _currentTeamState.loading === false)) {
114
- _context.next = 17;
114
+ _context.next = 5;
115
115
  break;
116
116
  }
117
117
  return _context.abrupt("return");
118
- case 17:
118
+ case 5:
119
119
  // Only update if we're still loading (prevents race conditions when teamId changes)
120
120
  if (_currentTeamState.loading) {
121
121
  setState({
@@ -128,38 +128,38 @@ var actions = {
128
128
  })))
129
129
  });
130
130
  }
131
- _context.next = 27;
131
+ _context.next = 8;
132
132
  break;
133
- case 20:
134
- _context.prev = 20;
135
- _context.t0 = _context["catch"](8);
133
+ case 6:
134
+ _context.prev = 6;
135
+ _t = _context["catch"](3);
136
136
  fireAnalyticsNext('operational.fetchTeamContainers.failed', {
137
137
  teamId: teamId,
138
- error: getErrorDetails(_context.t0)
138
+ error: getErrorDetails(_t)
139
139
  });
140
140
 
141
141
  // Get fresh state after async operation
142
142
  _currentState = getState();
143
143
  if (_currentState.teams[teamId]) {
144
- _context.next = 26;
144
+ _context.next = 7;
145
145
  break;
146
146
  }
147
147
  return _context.abrupt("return");
148
- case 26:
148
+ case 7:
149
149
  setState({
150
150
  teams: _objectSpread(_objectSpread({}, _currentState.teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, _currentState.teams[teamId]), {}, {
151
151
  teamContainers: [],
152
- error: normalizeError(_context.t0),
152
+ error: normalizeError(_t),
153
153
  loading: false,
154
154
  hasLoaded: true,
155
155
  teamId: teamId
156
156
  })))
157
157
  });
158
- case 27:
158
+ case 8:
159
159
  case "end":
160
160
  return _context.stop();
161
161
  }
162
- }, _callee, null, [[8, 20]]);
162
+ }, _callee, null, [[3, 6]]);
163
163
  }));
164
164
  return function (_x) {
165
165
  return _ref2.apply(this, arguments);
@@ -169,23 +169,23 @@ var actions = {
169
169
  refetchTeamContainers: function refetchTeamContainers(teamId, fireAnalytics, fireAnalyticsNext) {
170
170
  return /*#__PURE__*/function () {
171
171
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref3) {
172
- var setState, getState, _getState2, teams, currentTeamState, containers;
173
- return _regenerator.default.wrap(function _callee2$(_context2) {
172
+ var setState, getState, _getState2, teams, currentTeamState, containers, _t2;
173
+ return _regenerator.default.wrap(function (_context2) {
174
174
  while (1) switch (_context2.prev = _context2.next) {
175
175
  case 0:
176
176
  setState = _ref3.setState, getState = _ref3.getState;
177
177
  _getState2 = getState(), teams = _getState2.teams;
178
178
  currentTeamState = teams[teamId];
179
179
  if (currentTeamState) {
180
- _context2.next = 5;
180
+ _context2.next = 1;
181
181
  break;
182
182
  }
183
183
  return _context2.abrupt("return");
184
- case 5:
185
- _context2.prev = 5;
186
- _context2.next = 8;
184
+ case 1:
185
+ _context2.prev = 1;
186
+ _context2.next = 2;
187
187
  return _teamsClient.teamsClient.getTeamContainers(teamId);
188
- case 8:
188
+ case 2:
189
189
  containers = _context2.sent;
190
190
  fireAnalyticsNext('operational.refetchTeamContainers.succeeded', {
191
191
  teamId: teamId
@@ -201,28 +201,28 @@ var actions = {
201
201
  })))
202
202
  });
203
203
  }
204
- _context2.next = 17;
204
+ _context2.next = 4;
205
205
  break;
206
- case 13:
207
- _context2.prev = 13;
208
- _context2.t0 = _context2["catch"](5);
206
+ case 3:
207
+ _context2.prev = 3;
208
+ _t2 = _context2["catch"](1);
209
209
  fireAnalyticsNext('operational.refetchTeamContainers.failed', {
210
210
  teamId: teamId,
211
- error: getErrorDetails(_context2.t0)
211
+ error: getErrorDetails(_t2)
212
212
  });
213
213
  setState({
214
214
  teams: _objectSpread(_objectSpread({}, teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, currentTeamState), {}, {
215
- error: normalizeError(_context2.t0),
215
+ error: normalizeError(_t2),
216
216
  loading: false,
217
217
  hasLoaded: true,
218
218
  teamId: teamId
219
219
  })))
220
220
  });
221
- case 17:
221
+ case 4:
222
222
  case "end":
223
223
  return _context2.stop();
224
224
  }
225
- }, _callee2, null, [[5, 13]]);
225
+ }, _callee2, null, [[1, 3]]);
226
226
  }));
227
227
  return function (_x2) {
228
228
  return _ref4.apply(this, arguments);
@@ -232,26 +232,26 @@ var actions = {
232
232
  fetchNumberOfConnectedTeams: function fetchNumberOfConnectedTeams(teamId, containerId, fireAnalytics, fireAnalyticsNext) {
233
233
  return /*#__PURE__*/function () {
234
234
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref5) {
235
- var setState, getState, _getState3, teams, currentTeamState, currentContainerId, numberOfTeams, currentState, updatedTeamState, _currentState2, _updatedTeamState;
236
- return _regenerator.default.wrap(function _callee3$(_context3) {
235
+ var setState, getState, _getState3, teams, currentTeamState, currentContainerId, numberOfTeams, currentState, updatedTeamState, _currentState2, _updatedTeamState, _t3;
236
+ return _regenerator.default.wrap(function (_context3) {
237
237
  while (1) switch (_context3.prev = _context3.next) {
238
238
  case 0:
239
239
  setState = _ref5.setState, getState = _ref5.getState;
240
240
  _getState3 = getState(), teams = _getState3.teams;
241
241
  currentTeamState = teams[teamId];
242
242
  if (currentTeamState) {
243
- _context3.next = 5;
243
+ _context3.next = 1;
244
244
  break;
245
245
  }
246
246
  return _context3.abrupt("return");
247
- case 5:
247
+ case 1:
248
248
  currentContainerId = currentTeamState.connectedTeams.containerId;
249
249
  if (!(currentContainerId === containerId)) {
250
- _context3.next = 8;
250
+ _context3.next = 2;
251
251
  break;
252
252
  }
253
253
  return _context3.abrupt("return");
254
- case 8:
254
+ case 2:
255
255
  setState({
256
256
  teams: _objectSpread(_objectSpread({}, teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, currentTeamState), {}, {
257
257
  connectedTeams: _objectSpread(_objectSpread({}, initialConnectedTeamsState), {}, {
@@ -260,10 +260,10 @@ var actions = {
260
260
  })
261
261
  })))
262
262
  });
263
- _context3.prev = 9;
264
- _context3.next = 12;
263
+ _context3.prev = 3;
264
+ _context3.next = 4;
265
265
  return _teamsClient.teamsClient.getNumberOfConnectedTeams(containerId);
266
- case 12:
266
+ case 4:
267
267
  numberOfTeams = _context3.sent;
268
268
  fireAnalyticsNext('operational.fetchNumberOfConnectedTeams.succeeded', {
269
269
  numberOfTeams: numberOfTeams,
@@ -282,15 +282,15 @@ var actions = {
282
282
  })))
283
283
  });
284
284
  }
285
- _context3.next = 25;
285
+ _context3.next = 6;
286
286
  break;
287
- case 19:
288
- _context3.prev = 19;
289
- _context3.t0 = _context3["catch"](9);
287
+ case 5:
288
+ _context3.prev = 5;
289
+ _t3 = _context3["catch"](3);
290
290
  fireAnalyticsNext('operational.fetchNumberOfConnectedTeams.failed', {
291
291
  numberOfTeams: initialConnectedTeamsState.numberOfTeams || null,
292
292
  containerId: containerId,
293
- error: getErrorDetails(_context3.t0)
293
+ error: getErrorDetails(_t3)
294
294
  });
295
295
  _currentState2 = getState();
296
296
  _updatedTeamState = _currentState2.teams[teamId];
@@ -299,16 +299,16 @@ var actions = {
299
299
  teams: _objectSpread(_objectSpread({}, _currentState2.teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, _updatedTeamState), {}, {
300
300
  connectedTeams: _objectSpread(_objectSpread({}, initialConnectedTeamsState), {}, {
301
301
  containerId: containerId,
302
- error: normalizeError(_context3.t0)
302
+ error: normalizeError(_t3)
303
303
  })
304
304
  })))
305
305
  });
306
306
  }
307
- case 25:
307
+ case 6:
308
308
  case "end":
309
309
  return _context3.stop();
310
310
  }
311
- }, _callee3, null, [[9, 19]]);
311
+ }, _callee3, null, [[3, 5]]);
312
312
  }));
313
313
  return function (_x3) {
314
314
  return _ref6.apply(this, arguments);
@@ -318,26 +318,26 @@ var actions = {
318
318
  fetchConnectedTeams: function fetchConnectedTeams(teamId, containerId, fireAnalytics, fireAnalyticsNext) {
319
319
  return /*#__PURE__*/function () {
320
320
  var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref7) {
321
- var setState, getState, _getState4, teams, currentTeamState, _currentTeamState$con, currentContainerId, numberOfTeams, hasLoaded, teamsResult, currentState, updatedTeamState, _currentState3, _updatedTeamState2;
322
- return _regenerator.default.wrap(function _callee4$(_context4) {
321
+ var setState, getState, _getState4, teams, currentTeamState, _currentTeamState$con, currentContainerId, numberOfTeams, hasLoaded, teamsResult, currentState, updatedTeamState, _currentState3, _updatedTeamState2, _t4;
322
+ return _regenerator.default.wrap(function (_context4) {
323
323
  while (1) switch (_context4.prev = _context4.next) {
324
324
  case 0:
325
325
  setState = _ref7.setState, getState = _ref7.getState;
326
326
  _getState4 = getState(), teams = _getState4.teams;
327
327
  currentTeamState = teams[teamId];
328
328
  if (currentTeamState) {
329
- _context4.next = 5;
329
+ _context4.next = 1;
330
330
  break;
331
331
  }
332
332
  return _context4.abrupt("return");
333
- case 5:
333
+ case 1:
334
334
  _currentTeamState$con = currentTeamState.connectedTeams, currentContainerId = _currentTeamState$con.containerId, numberOfTeams = _currentTeamState$con.numberOfTeams, hasLoaded = _currentTeamState$con.hasLoaded;
335
335
  if (!(currentContainerId === containerId && hasLoaded)) {
336
- _context4.next = 8;
336
+ _context4.next = 2;
337
337
  break;
338
338
  }
339
339
  return _context4.abrupt("return");
340
- case 8:
340
+ case 2:
341
341
  setState({
342
342
  teams: _objectSpread(_objectSpread({}, teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, currentTeamState), {}, {
343
343
  connectedTeams: {
@@ -350,10 +350,10 @@ var actions = {
350
350
  }
351
351
  })))
352
352
  });
353
- _context4.prev = 9;
354
- _context4.next = 12;
353
+ _context4.prev = 3;
354
+ _context4.next = 4;
355
355
  return _teamsClient.teamsClient.getConnectedTeams(containerId);
356
- case 12:
356
+ case 4:
357
357
  teamsResult = _context4.sent;
358
358
  fireAnalyticsNext('operational.fetchConnectedTeams.succeeded', {
359
359
  numberOfTeams: numberOfTeams || null,
@@ -375,15 +375,15 @@ var actions = {
375
375
  })))
376
376
  });
377
377
  }
378
- _context4.next = 25;
378
+ _context4.next = 6;
379
379
  break;
380
- case 19:
381
- _context4.prev = 19;
382
- _context4.t0 = _context4["catch"](9);
380
+ case 5:
381
+ _context4.prev = 5;
382
+ _t4 = _context4["catch"](3);
383
383
  fireAnalyticsNext('operational.fetchConnectedTeams.failed', {
384
384
  numberOfTeams: numberOfTeams || null,
385
385
  containerId: containerId,
386
- error: getErrorDetails(_context4.t0)
386
+ error: getErrorDetails(_t4)
387
387
  });
388
388
  _currentState3 = getState();
389
389
  _updatedTeamState2 = _currentState3.teams[teamId];
@@ -395,17 +395,17 @@ var actions = {
395
395
  isLoading: false,
396
396
  hasLoaded: false,
397
397
  teams: [],
398
- error: normalizeError(_context4.t0),
398
+ error: normalizeError(_t4),
399
399
  numberOfTeams: numberOfTeams
400
400
  }
401
401
  })))
402
402
  });
403
403
  }
404
- case 25:
404
+ case 6:
405
405
  case "end":
406
406
  return _context4.stop();
407
407
  }
408
- }, _callee4, null, [[9, 19]]);
408
+ }, _callee4, null, [[3, 5]]);
409
409
  }));
410
410
  return function (_x4) {
411
411
  return _ref8.apply(this, arguments);
@@ -415,8 +415,8 @@ var actions = {
415
415
  unlinkTeamContainers: function unlinkTeamContainers(teamId, containerId) {
416
416
  return /*#__PURE__*/function () {
417
417
  var _ref0 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref9) {
418
- var setState, getState, _getState5, teams, currentTeamState, mutationResult, currentState, updatedTeamState, newContainers, shouldResetConnectedTeams, _currentState4, _updatedTeamState3;
419
- return _regenerator.default.wrap(function _callee5$(_context5) {
418
+ var setState, getState, _getState5, teams, currentTeamState, mutationResult, currentState, updatedTeamState, newContainers, shouldResetConnectedTeams, _currentState4, _updatedTeamState3, _t5;
419
+ return _regenerator.default.wrap(function (_context5) {
420
420
  while (1) switch (_context5.prev = _context5.next) {
421
421
  case 0:
422
422
  setState = _ref9.setState, getState = _ref9.getState;
@@ -429,19 +429,19 @@ var actions = {
429
429
  })))
430
430
  });
431
431
  }
432
- _context5.prev = 4;
433
- _context5.next = 7;
432
+ _context5.prev = 1;
433
+ _context5.next = 2;
434
434
  return _teamsClient.teamsClient.unlinkTeamContainer(teamId, containerId);
435
- case 7:
435
+ case 2:
436
436
  mutationResult = _context5.sent;
437
437
  currentState = getState();
438
438
  updatedTeamState = currentState.teams[teamId];
439
439
  if (updatedTeamState) {
440
- _context5.next = 12;
440
+ _context5.next = 3;
441
441
  break;
442
442
  }
443
443
  return _context5.abrupt("return");
444
- case 12:
444
+ case 3:
445
445
  if (mutationResult.deleteTeamConnectedToContainer.errors.length) {
446
446
  // Just handle 1 error at a time should be sufficient as we disconnect only 1 container at a time
447
447
  setState({
@@ -464,25 +464,25 @@ var actions = {
464
464
  })))
465
465
  });
466
466
  }
467
- _context5.next = 20;
467
+ _context5.next = 5;
468
468
  break;
469
- case 15:
470
- _context5.prev = 15;
471
- _context5.t0 = _context5["catch"](4);
469
+ case 4:
470
+ _context5.prev = 4;
471
+ _t5 = _context5["catch"](1);
472
472
  _currentState4 = getState();
473
473
  _updatedTeamState3 = _currentState4.teams[teamId];
474
474
  if (_updatedTeamState3) {
475
475
  setState({
476
476
  teams: _objectSpread(_objectSpread({}, _currentState4.teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread({}, _updatedTeamState3), {}, {
477
- unlinkError: normalizeError(_context5.t0)
477
+ unlinkError: normalizeError(_t5)
478
478
  })))
479
479
  });
480
480
  }
481
- case 20:
481
+ case 5:
482
482
  case "end":
483
483
  return _context5.stop();
484
484
  }
485
- }, _callee5, null, [[4, 15]]);
485
+ }, _callee5, null, [[1, 4]]);
486
486
  }));
487
487
  return function (_x5) {
488
488
  return _ref0.apply(this, arguments);
@@ -493,27 +493,27 @@ var actions = {
493
493
  return /*#__PURE__*/function () {
494
494
  var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref1) {
495
495
  var setState, getState, _getState6, teams, currentTeamState, containerExists, shouldResetConnectedTeams;
496
- return _regenerator.default.wrap(function _callee6$(_context6) {
496
+ return _regenerator.default.wrap(function (_context6) {
497
497
  while (1) switch (_context6.prev = _context6.next) {
498
498
  case 0:
499
499
  setState = _ref1.setState, getState = _ref1.getState;
500
500
  _getState6 = getState(), teams = _getState6.teams;
501
501
  currentTeamState = teams[teamId];
502
502
  if (currentTeamState) {
503
- _context6.next = 5;
503
+ _context6.next = 1;
504
504
  break;
505
505
  }
506
506
  return _context6.abrupt("return");
507
- case 5:
507
+ case 1:
508
508
  containerExists = currentTeamState.teamContainers.some(function (container) {
509
509
  return container.id === teamContainer.id;
510
510
  });
511
511
  if (!containerExists) {
512
- _context6.next = 8;
512
+ _context6.next = 2;
513
513
  break;
514
514
  }
515
515
  return _context6.abrupt("return");
516
- case 8:
516
+ case 2:
517
517
  shouldResetConnectedTeams = currentTeamState.connectedTeams.containerId === teamContainer.id;
518
518
  setState({
519
519
  teams: _objectSpread(_objectSpread({}, teams), {}, (0, _defineProperty2.default)({}, teamId, _objectSpread(_objectSpread(_objectSpread({}, currentTeamState), {}, {
@@ -524,7 +524,7 @@ var actions = {
524
524
  teamId: teamId
525
525
  })))
526
526
  });
527
- case 10:
527
+ case 3:
528
528
  case "end":
529
529
  return _context6.stop();
530
530
  }
@@ -578,7 +578,7 @@ var useTeamContainers = exports.useTeamContainers = function useTeamContainers(t
578
578
  // eslint-disable-next-line react-hooks/exhaustive-deps
579
579
  }, [teamId, enable]);
580
580
  var refetchTeamContainers = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
581
- return _regenerator.default.wrap(function _callee7$(_context7) {
581
+ return _regenerator.default.wrap(function (_context7) {
582
582
  while (1) switch (_context7.prev = _context7.next) {
583
583
  case 0:
584
584
  return _context7.abrupt("return", actions.refetchTeamContainers(teamId, fireOperationalAnalytics, fireEvent));
@@ -56,31 +56,31 @@ var useTeamLinksAndContainers = exports.useTeamLinksAndContainers = function use
56
56
  var addTeamLink = (0, _react.useCallback)( /*#__PURE__*/function () {
57
57
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(containerOrWebLink) {
58
58
  var webLink;
59
- return _regenerator.default.wrap(function _callee$(_context) {
59
+ return _regenerator.default.wrap(function (_context) {
60
60
  while (1) switch (_context.prev = _context.next) {
61
61
  case 0:
62
62
  if (!(0, _teamWebLinkConverters.isNewTeamWebLink)(containerOrWebLink)) {
63
- _context.next = 6;
63
+ _context.next = 2;
64
64
  break;
65
65
  }
66
- _context.next = 3;
66
+ _context.next = 1;
67
67
  return createTeamWebLink(teamId, containerOrWebLink);
68
- case 3:
68
+ case 1:
69
69
  return _context.abrupt("return", _context.sent);
70
- case 6:
70
+ case 2:
71
71
  if (!(containerOrWebLink.type === 'WebLink')) {
72
- _context.next = 13;
72
+ _context.next = 4;
73
73
  break;
74
74
  }
75
75
  webLink = (0, _teamWebLinkConverters.containerToNewWebLink)(containerOrWebLink);
76
- _context.next = 10;
76
+ _context.next = 3;
77
77
  return createTeamWebLink(teamId, webLink);
78
- case 10:
78
+ case 3:
79
79
  return _context.abrupt("return", _context.sent);
80
- case 13:
80
+ case 4:
81
81
  addTeamContainer(containerOrWebLink);
82
82
  return _context.abrupt("return", Promise.resolve(containerOrWebLink));
83
- case 15:
83
+ case 5:
84
84
  case "end":
85
85
  return _context.stop();
86
86
  }
@@ -93,29 +93,29 @@ var useTeamLinksAndContainers = exports.useTeamLinksAndContainers = function use
93
93
  var updateTeamLinkById = (0, _react.useCallback)( /*#__PURE__*/function () {
94
94
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(linkId, updatedFields) {
95
95
  var container, currentWebLink, updatedWebLink;
96
- return _regenerator.default.wrap(function _callee2$(_context2) {
96
+ return _regenerator.default.wrap(function (_context2) {
97
97
  while (1) switch (_context2.prev = _context2.next) {
98
98
  case 0:
99
99
  container = allContainers.find(function (link) {
100
100
  return link.id === linkId;
101
101
  });
102
102
  if (container) {
103
- _context2.next = 3;
103
+ _context2.next = 1;
104
104
  break;
105
105
  }
106
106
  return _context2.abrupt("return");
107
- case 3:
107
+ case 1:
108
108
  if (!(container.type === 'WebLink')) {
109
- _context2.next = 9;
109
+ _context2.next = 3;
110
110
  break;
111
111
  }
112
112
  currentWebLink = (0, _teamWebLinkConverters.containerToNewWebLink)(container);
113
113
  updatedWebLink = _objectSpread(_objectSpread({}, currentWebLink), updatedFields);
114
- _context2.next = 8;
114
+ _context2.next = 2;
115
115
  return updateTeamWebLink(teamId, linkId, updatedWebLink);
116
- case 8:
116
+ case 2:
117
117
  return _context2.abrupt("return", _context2.sent);
118
- case 9:
118
+ case 3:
119
119
  case "end":
120
120
  return _context2.stop();
121
121
  }
@@ -127,22 +127,22 @@ var useTeamLinksAndContainers = exports.useTeamLinksAndContainers = function use
127
127
  }(), [teamId, allContainers, updateTeamWebLink]);
128
128
  var removeTeamLink = (0, _react.useCallback)( /*#__PURE__*/function () {
129
129
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(container) {
130
- return _regenerator.default.wrap(function _callee3$(_context3) {
130
+ return _regenerator.default.wrap(function (_context3) {
131
131
  while (1) switch (_context3.prev = _context3.next) {
132
132
  case 0:
133
133
  if (!(container.type === 'WebLink')) {
134
- _context3.next = 5;
134
+ _context3.next = 2;
135
135
  break;
136
136
  }
137
- _context3.next = 3;
137
+ _context3.next = 1;
138
138
  return removeWebLink(teamId, container.id);
139
- case 3:
140
- _context3.next = 7;
139
+ case 1:
140
+ _context3.next = 3;
141
141
  break;
142
- case 5:
143
- _context3.next = 7;
142
+ case 2:
143
+ _context3.next = 3;
144
144
  return unlinkTeamContainers(container.id);
145
- case 7:
145
+ case 3:
146
146
  case "end":
147
147
  return _context3.stop();
148
148
  }