@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.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/common/utils/get-container-properties.js +5 -5
- package/dist/cjs/controllers/hooks/use-product-permission/index.js +1 -1
- package/dist/cjs/controllers/hooks/use-team-containers/index.js +81 -81
- package/dist/cjs/controllers/hooks/use-team-containers/multi-team.js +91 -91
- package/dist/cjs/controllers/hooks/use-team-links-and-containers/index.js +25 -25
- package/dist/cjs/controllers/hooks/use-team-web-links/index.js +65 -65
- package/dist/cjs/controllers/hooks/use-team-web-links/multi-team.js +73 -73
- package/dist/cjs/controllers/product-permission/main.js +19 -19
- package/dist/cjs/next/ui/team-containers/team-link-card/index.js +1 -23
- package/dist/cjs/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
- package/dist/cjs/ui/team-containers/disconnect-dialog/index.js +7 -7
- package/dist/cjs/ui/team-containers/main.js +9 -9
- package/dist/cjs/ui/team-containers/no-product-access-empty-state/index.js +1 -1
- package/dist/es2019/common/utils/get-container-properties.js +5 -5
- package/dist/es2019/next/ui/team-containers/team-link-card/index.js +2 -24
- package/dist/es2019/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
- package/dist/es2019/ui/team-containers/disconnect-dialog/index.js +4 -4
- package/dist/es2019/ui/team-containers/no-product-access-empty-state/index.js +1 -1
- package/dist/esm/common/utils/get-container-properties.js +5 -5
- package/dist/esm/controllers/hooks/use-product-permission/index.js +1 -1
- package/dist/esm/controllers/hooks/use-team-containers/index.js +81 -81
- package/dist/esm/controllers/hooks/use-team-containers/multi-team.js +91 -91
- package/dist/esm/controllers/hooks/use-team-links-and-containers/index.js +25 -25
- package/dist/esm/controllers/hooks/use-team-web-links/index.js +65 -65
- package/dist/esm/controllers/hooks/use-team-web-links/multi-team.js +73 -73
- package/dist/esm/controllers/product-permission/main.js +19 -19
- package/dist/esm/next/ui/team-containers/team-link-card/index.js +2 -24
- package/dist/esm/ui/team-containers/add-container-card/add-container-card-button/index.js +4 -4
- package/dist/esm/ui/team-containers/disconnect-dialog/index.js +7 -7
- package/dist/esm/ui/team-containers/main.js +9 -9
- package/dist/esm/ui/team-containers/no-product-access-empty-state/index.js +1 -1
- package/package.json +12 -14
|
@@ -27,7 +27,7 @@ const styles = {
|
|
|
27
27
|
export const messages = defineMessages({
|
|
28
28
|
addConfluenceContainerTitle: {
|
|
29
29
|
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space-title',
|
|
30
|
-
defaultMessage: 'Add space',
|
|
30
|
+
defaultMessage: 'Add Confluence space',
|
|
31
31
|
description: 'Title of the card to add a Confluence space to a team'
|
|
32
32
|
},
|
|
33
33
|
confluenceContainerDescription: {
|
|
@@ -37,18 +37,18 @@ export const messages = defineMessages({
|
|
|
37
37
|
},
|
|
38
38
|
addLoomSpace: {
|
|
39
39
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space',
|
|
40
|
-
defaultMessage: 'Add Loom
|
|
40
|
+
defaultMessage: 'Add Loom space',
|
|
41
41
|
description: 'Title of the card to add a Loom space to a team'
|
|
42
42
|
},
|
|
43
43
|
addJiraProject: {
|
|
44
44
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project',
|
|
45
|
-
defaultMessage: 'Add Jira
|
|
46
|
-
description: 'Title of the card to add a Jira
|
|
45
|
+
defaultMessage: 'Add Jira space',
|
|
46
|
+
description: 'Title of the card to add a Jira space to a team'
|
|
47
47
|
},
|
|
48
48
|
jiraProjectDescription: {
|
|
49
49
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-description',
|
|
50
50
|
defaultMessage: 'Jira',
|
|
51
|
-
description: 'Description of the card to add a Jira
|
|
51
|
+
description: 'Description of the card to add a Jira space to a team'
|
|
52
52
|
},
|
|
53
53
|
loomSpaceDescription: {
|
|
54
54
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import { Anchor, Box, Flex, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import { Box, Flex, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
7
6
|
import { useAnalyticsEvents } from '@atlaskit/teams-app-internal-analytics';
|
|
8
7
|
import { TeamsAnchor } from '@atlaskit/teams-app-internal-navigation';
|
|
9
8
|
import { ContainerIcon } from '../../../../common/ui/container-icon';
|
|
@@ -99,7 +98,7 @@ export const TeamLinkCard = ({
|
|
|
99
98
|
title: title,
|
|
100
99
|
containerIcon: containerIcon,
|
|
101
100
|
size: "small"
|
|
102
|
-
}),
|
|
101
|
+
}), /*#__PURE__*/React.createElement(TeamsAnchor, {
|
|
103
102
|
xcss: styles.anchor,
|
|
104
103
|
href: link || '#',
|
|
105
104
|
onClick: handleLinkClick,
|
|
@@ -121,27 +120,6 @@ export const TeamLinkCard = ({
|
|
|
121
120
|
}, containerTypeText), containerTypeText && description && /*#__PURE__*/React.createElement(Separator, null), description && /*#__PURE__*/React.createElement(Text, {
|
|
122
121
|
size: "small",
|
|
123
122
|
color: "color.text.subtle"
|
|
124
|
-
}, description))))) : /*#__PURE__*/React.createElement(Anchor, {
|
|
125
|
-
xcss: styles.anchor,
|
|
126
|
-
href: link || '#',
|
|
127
|
-
onClick: handleLinkClick,
|
|
128
|
-
testId: "team-link-card-linkable-content"
|
|
129
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
130
|
-
space: "space.025"
|
|
131
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
132
|
-
maxLines: 1,
|
|
133
|
-
color: "color.text"
|
|
134
|
-
}, title), /*#__PURE__*/React.createElement(Flex, {
|
|
135
|
-
gap: "space.050",
|
|
136
|
-
alignItems: "center"
|
|
137
|
-
}, /*#__PURE__*/React.createElement(Inline, {
|
|
138
|
-
space: "space.050"
|
|
139
|
-
}, containerTypeText && /*#__PURE__*/React.createElement(Text, {
|
|
140
|
-
size: "small",
|
|
141
|
-
color: "color.text.subtle"
|
|
142
|
-
}, containerTypeText), containerTypeText && description && /*#__PURE__*/React.createElement(Separator, null), description && /*#__PURE__*/React.createElement(Text, {
|
|
143
|
-
size: "small",
|
|
144
|
-
color: "color.text.subtle"
|
|
145
123
|
}, description))))), !isReadOnly && /*#__PURE__*/React.createElement(TeamLinkCardActions, {
|
|
146
124
|
containerType: containerType,
|
|
147
125
|
title: title,
|
package/dist/es2019/ui/team-containers/add-container-card/add-container-card-button/index.js
CHANGED
|
@@ -72,13 +72,13 @@ const messages = defineMessages({
|
|
|
72
72
|
},
|
|
73
73
|
addJiraProjectTitle: {
|
|
74
74
|
id: 'ptc-directory.team-profile-page.team-containers.create.add-jira-project-title',
|
|
75
|
-
defaultMessage: 'Jira
|
|
76
|
-
description: 'Title of the card to add a Jira
|
|
75
|
+
defaultMessage: 'Jira space',
|
|
76
|
+
description: 'Title of the card to add a Jira space to a team'
|
|
77
77
|
},
|
|
78
78
|
jiraProjectDescription: {
|
|
79
79
|
id: 'ptc-directory.team-profile-page.team-containers.create.add-jira-project-description',
|
|
80
|
-
defaultMessage: 'Plan out
|
|
81
|
-
description: 'Description of the card to add a Jira
|
|
80
|
+
defaultMessage: 'Plan out tasks',
|
|
81
|
+
description: 'Description of the card to add a Jira space to a team'
|
|
82
82
|
},
|
|
83
83
|
addWebLinkTitle: {
|
|
84
84
|
id: 'ptc-directory.team-profile-page.team-containers.create.add-web-link-title',
|
|
@@ -14,7 +14,7 @@ export const messages = defineMessages({
|
|
|
14
14
|
disconnectDialogDescription: {
|
|
15
15
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.description',
|
|
16
16
|
defaultMessage: `This team will no longer be connected to the {containerName} {containerType, select,
|
|
17
|
-
JiraProject {Jira
|
|
17
|
+
JiraProject {Jira space}
|
|
18
18
|
ConfluenceSpace {Confluence space}
|
|
19
19
|
LoomSpace {Loom space}
|
|
20
20
|
other {link}
|
|
@@ -24,12 +24,12 @@ export const messages = defineMessages({
|
|
|
24
24
|
disconnectDialogDisclaimer: {
|
|
25
25
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.disclaimer',
|
|
26
26
|
defaultMessage: `Disconnecting the team from the {containerType, select,
|
|
27
|
-
JiraProject {
|
|
27
|
+
JiraProject {space}
|
|
28
28
|
ConfluenceSpace {space}
|
|
29
29
|
LoomSpace {space}
|
|
30
30
|
other {link}
|
|
31
31
|
} will not affect any work connected to the team within the {containerType, select,
|
|
32
|
-
JiraProject {
|
|
32
|
+
JiraProject {space}
|
|
33
33
|
ConfluenceSpace {space}
|
|
34
34
|
LoomSpace {space}
|
|
35
35
|
other {link}
|
|
@@ -40,7 +40,7 @@ export const messages = defineMessages({
|
|
|
40
40
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.disclaimer',
|
|
41
41
|
// eslint-disable-next-line @atlassian/i18n/no-complex-selectors
|
|
42
42
|
defaultMessage: `{containerType, select,
|
|
43
|
-
JiraProject {Disconnecting the team from the
|
|
43
|
+
JiraProject {Disconnecting the team from the space might affect work connected to the team within the space.}
|
|
44
44
|
ConfluenceSpace {Disconnecting the team from the space will not affect any work connected to the team within the space.}
|
|
45
45
|
LoomSpace {Disconnecting the team from the space will not affect any work connected to the team within the space.}
|
|
46
46
|
other {Disconnecting the team from the link will not affect any work connected to the team within the link.}
|
|
@@ -31,7 +31,7 @@ const messages = defineMessages({
|
|
|
31
31
|
},
|
|
32
32
|
teamContainerEmptyStateDescription: {
|
|
33
33
|
id: 'ptc.team-profile-page.team-containers.empty-state.description',
|
|
34
|
-
defaultMessage: 'Your team can link their Jira
|
|
34
|
+
defaultMessage: 'Your team can link their Jira spaces, Confluence spaces here to show where they work',
|
|
35
35
|
description: 'Empty state description when user has no product access'
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -30,7 +30,7 @@ var styles = {
|
|
|
30
30
|
export var messages = defineMessages({
|
|
31
31
|
addConfluenceContainerTitle: {
|
|
32
32
|
id: 'ptc-directory.team-profile-page.team-containers.add-confluence-space-title',
|
|
33
|
-
defaultMessage: 'Add space',
|
|
33
|
+
defaultMessage: 'Add Confluence space',
|
|
34
34
|
description: 'Title of the card to add a Confluence space to a team'
|
|
35
35
|
},
|
|
36
36
|
confluenceContainerDescription: {
|
|
@@ -40,18 +40,18 @@ export var messages = defineMessages({
|
|
|
40
40
|
},
|
|
41
41
|
addLoomSpace: {
|
|
42
42
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space',
|
|
43
|
-
defaultMessage: 'Add Loom
|
|
43
|
+
defaultMessage: 'Add Loom space',
|
|
44
44
|
description: 'Title of the card to add a Loom space to a team'
|
|
45
45
|
},
|
|
46
46
|
addJiraProject: {
|
|
47
47
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project',
|
|
48
|
-
defaultMessage: 'Add Jira
|
|
49
|
-
description: 'Title of the card to add a Jira
|
|
48
|
+
defaultMessage: 'Add Jira space',
|
|
49
|
+
description: 'Title of the card to add a Jira space to a team'
|
|
50
50
|
},
|
|
51
51
|
jiraProjectDescription: {
|
|
52
52
|
id: 'ptc-directory.team-profile-page.team-containers.add-jira-project-description',
|
|
53
53
|
defaultMessage: 'Jira',
|
|
54
|
-
description: 'Description of the card to add a Jira
|
|
54
|
+
description: 'Description of the card to add a Jira space to a team'
|
|
55
55
|
},
|
|
56
56
|
loomSpaceDescription: {
|
|
57
57
|
id: 'ptc-directory.team-profile-page.team-containers.add-loom-space-description',
|
|
@@ -19,7 +19,7 @@ export var useProductPermissions = function useProductPermissions(_ref) {
|
|
|
19
19
|
state = _useProductPermission2[0],
|
|
20
20
|
getPermissions = _useProductPermission2[1].getPermissions;
|
|
21
21
|
var fetchData = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22
|
-
return _regeneratorRuntime.wrap(function
|
|
22
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
23
23
|
while (1) switch (_context.prev = _context.next) {
|
|
24
24
|
case 0:
|
|
25
25
|
getPermissions({
|
|
@@ -38,18 +38,18 @@ var actions = {
|
|
|
38
38
|
fetchTeamContainers: function fetchTeamContainers(teamId, fireAnalytics) {
|
|
39
39
|
return /*#__PURE__*/function () {
|
|
40
40
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
41
|
-
var setState, getState, _getState, currentTeamId, containers;
|
|
42
|
-
return _regeneratorRuntime.wrap(function
|
|
41
|
+
var setState, getState, _getState, currentTeamId, containers, _t;
|
|
42
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
43
43
|
while (1) switch (_context.prev = _context.next) {
|
|
44
44
|
case 0:
|
|
45
45
|
setState = _ref.setState, getState = _ref.getState;
|
|
46
46
|
_getState = getState(), currentTeamId = _getState.teamId;
|
|
47
47
|
if (!(currentTeamId === teamId)) {
|
|
48
|
-
_context.next =
|
|
48
|
+
_context.next = 1;
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
51
|
return _context.abrupt("return");
|
|
52
|
-
case
|
|
52
|
+
case 1:
|
|
53
53
|
setState({
|
|
54
54
|
loading: true,
|
|
55
55
|
error: null,
|
|
@@ -57,10 +57,10 @@ var actions = {
|
|
|
57
57
|
teamId: teamId,
|
|
58
58
|
hasLoaded: false
|
|
59
59
|
});
|
|
60
|
-
_context.prev =
|
|
61
|
-
_context.next =
|
|
60
|
+
_context.prev = 2;
|
|
61
|
+
_context.next = 3;
|
|
62
62
|
return teamsClient.getTeamContainers(teamId);
|
|
63
|
-
case
|
|
63
|
+
case 3:
|
|
64
64
|
containers = _context.sent;
|
|
65
65
|
fireAnalytics('operational.fetchTeamContainers.succeeded', {
|
|
66
66
|
teamId: teamId
|
|
@@ -71,29 +71,29 @@ var actions = {
|
|
|
71
71
|
error: null,
|
|
72
72
|
hasLoaded: true
|
|
73
73
|
});
|
|
74
|
-
_context.next =
|
|
74
|
+
_context.next = 5;
|
|
75
75
|
break;
|
|
76
|
-
case
|
|
77
|
-
_context.prev =
|
|
78
|
-
|
|
76
|
+
case 4:
|
|
77
|
+
_context.prev = 4;
|
|
78
|
+
_t = _context["catch"](2);
|
|
79
79
|
fireAnalytics('operational.fetchTeamContainers.failed', {
|
|
80
80
|
teamId: teamId,
|
|
81
81
|
error: {
|
|
82
|
-
message:
|
|
83
|
-
stack:
|
|
82
|
+
message: _t.message || JSON.stringify(_t),
|
|
83
|
+
stack: _t.stack
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
setState({
|
|
87
87
|
teamContainers: [],
|
|
88
|
-
error:
|
|
88
|
+
error: _t,
|
|
89
89
|
loading: false,
|
|
90
90
|
hasLoaded: true
|
|
91
91
|
});
|
|
92
|
-
case
|
|
92
|
+
case 5:
|
|
93
93
|
case "end":
|
|
94
94
|
return _context.stop();
|
|
95
95
|
}
|
|
96
|
-
}, _callee, null, [[
|
|
96
|
+
}, _callee, null, [[2, 4]]);
|
|
97
97
|
}));
|
|
98
98
|
return function (_x) {
|
|
99
99
|
return _ref2.apply(this, arguments);
|
|
@@ -103,22 +103,22 @@ var actions = {
|
|
|
103
103
|
refetchTeamContainers: function refetchTeamContainers(fireAnalytics) {
|
|
104
104
|
return /*#__PURE__*/function () {
|
|
105
105
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
106
|
-
var setState, getState, _getState2, teamId, containers;
|
|
107
|
-
return _regeneratorRuntime.wrap(function
|
|
106
|
+
var setState, getState, _getState2, teamId, containers, _t2;
|
|
107
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
108
108
|
while (1) switch (_context2.prev = _context2.next) {
|
|
109
109
|
case 0:
|
|
110
110
|
setState = _ref3.setState, getState = _ref3.getState;
|
|
111
111
|
_getState2 = getState(), teamId = _getState2.teamId;
|
|
112
112
|
if (teamId) {
|
|
113
|
-
_context2.next =
|
|
113
|
+
_context2.next = 1;
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
return _context2.abrupt("return");
|
|
117
|
-
case
|
|
118
|
-
_context2.prev =
|
|
119
|
-
_context2.next =
|
|
117
|
+
case 1:
|
|
118
|
+
_context2.prev = 1;
|
|
119
|
+
_context2.next = 2;
|
|
120
120
|
return teamsClient.getTeamContainers(teamId);
|
|
121
|
-
case
|
|
121
|
+
case 2:
|
|
122
122
|
containers = _context2.sent;
|
|
123
123
|
fireAnalytics('operational.refetchTeamContainers.succeeded', {
|
|
124
124
|
teamId: teamId
|
|
@@ -132,29 +132,29 @@ var actions = {
|
|
|
132
132
|
hasLoaded: true
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
_context2.next =
|
|
135
|
+
_context2.next = 4;
|
|
136
136
|
break;
|
|
137
|
-
case
|
|
138
|
-
_context2.prev =
|
|
139
|
-
|
|
137
|
+
case 3:
|
|
138
|
+
_context2.prev = 3;
|
|
139
|
+
_t2 = _context2["catch"](1);
|
|
140
140
|
fireAnalytics('operational.refetchTeamContainers.failed', {
|
|
141
141
|
teamId: teamId,
|
|
142
142
|
error: {
|
|
143
|
-
message:
|
|
144
|
-
stack:
|
|
143
|
+
message: _t2.message || JSON.stringify(_t2),
|
|
144
|
+
stack: _t2.stack
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
setState({
|
|
148
148
|
teamContainers: getState().teamContainers,
|
|
149
|
-
error:
|
|
149
|
+
error: _t2,
|
|
150
150
|
loading: false,
|
|
151
151
|
hasLoaded: true
|
|
152
152
|
});
|
|
153
|
-
case
|
|
153
|
+
case 4:
|
|
154
154
|
case "end":
|
|
155
155
|
return _context2.stop();
|
|
156
156
|
}
|
|
157
|
-
}, _callee2, null, [[
|
|
157
|
+
}, _callee2, null, [[1, 3]]);
|
|
158
158
|
}));
|
|
159
159
|
return function (_x2) {
|
|
160
160
|
return _ref4.apply(this, arguments);
|
|
@@ -164,28 +164,28 @@ var actions = {
|
|
|
164
164
|
fetchNumberOfConnectedTeams: function fetchNumberOfConnectedTeams(containerId, fireAnalytics) {
|
|
165
165
|
return /*#__PURE__*/function () {
|
|
166
166
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
167
|
-
var setState, getState, _getState3, currentContainerId, numberOfTeams;
|
|
168
|
-
return _regeneratorRuntime.wrap(function
|
|
167
|
+
var setState, getState, _getState3, currentContainerId, numberOfTeams, _t3;
|
|
168
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
169
169
|
while (1) switch (_context3.prev = _context3.next) {
|
|
170
170
|
case 0:
|
|
171
171
|
setState = _ref5.setState, getState = _ref5.getState;
|
|
172
172
|
_getState3 = getState(), currentContainerId = _getState3.connectedTeams.containerId;
|
|
173
173
|
if (!(currentContainerId === containerId)) {
|
|
174
|
-
_context3.next =
|
|
174
|
+
_context3.next = 1;
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
177
|
return _context3.abrupt("return");
|
|
178
|
-
case
|
|
178
|
+
case 1:
|
|
179
179
|
setState({
|
|
180
180
|
connectedTeams: _objectSpread(_objectSpread({}, initialConnectedTeamsState), {}, {
|
|
181
181
|
containerId: containerId,
|
|
182
182
|
numberOfTeams: undefined
|
|
183
183
|
})
|
|
184
184
|
});
|
|
185
|
-
_context3.prev =
|
|
186
|
-
_context3.next =
|
|
185
|
+
_context3.prev = 2;
|
|
186
|
+
_context3.next = 3;
|
|
187
187
|
return teamsClient.getNumberOfConnectedTeams(containerId);
|
|
188
|
-
case
|
|
188
|
+
case 3:
|
|
189
189
|
numberOfTeams = _context3.sent;
|
|
190
190
|
fireAnalytics('operational.fetchNumberOfConnectedTeams.succeeded', {
|
|
191
191
|
numberOfTeams: numberOfTeams,
|
|
@@ -197,30 +197,30 @@ var actions = {
|
|
|
197
197
|
numberOfTeams: numberOfTeams
|
|
198
198
|
})
|
|
199
199
|
});
|
|
200
|
-
_context3.next =
|
|
200
|
+
_context3.next = 5;
|
|
201
201
|
break;
|
|
202
|
-
case
|
|
203
|
-
_context3.prev =
|
|
204
|
-
|
|
202
|
+
case 4:
|
|
203
|
+
_context3.prev = 4;
|
|
204
|
+
_t3 = _context3["catch"](2);
|
|
205
205
|
fireAnalytics('operational.fetchNumberOfConnectedTeams.failed', {
|
|
206
206
|
numberOfTeams: initialConnectedTeamsState.numberOfTeams || null,
|
|
207
207
|
containerId: containerId,
|
|
208
208
|
error: {
|
|
209
|
-
message:
|
|
210
|
-
stack:
|
|
209
|
+
message: _t3.message || JSON.stringify(_t3),
|
|
210
|
+
stack: _t3.stack
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
213
|
setState({
|
|
214
214
|
connectedTeams: _objectSpread(_objectSpread({}, initialConnectedTeamsState), {}, {
|
|
215
215
|
containerId: containerId,
|
|
216
|
-
error:
|
|
216
|
+
error: _t3
|
|
217
217
|
})
|
|
218
218
|
});
|
|
219
|
-
case
|
|
219
|
+
case 5:
|
|
220
220
|
case "end":
|
|
221
221
|
return _context3.stop();
|
|
222
222
|
}
|
|
223
|
-
}, _callee3, null, [[
|
|
223
|
+
}, _callee3, null, [[2, 4]]);
|
|
224
224
|
}));
|
|
225
225
|
return function (_x3) {
|
|
226
226
|
return _ref6.apply(this, arguments);
|
|
@@ -230,18 +230,18 @@ var actions = {
|
|
|
230
230
|
fetchConnectedTeams: function fetchConnectedTeams(containerId, fireAnalytics) {
|
|
231
231
|
return /*#__PURE__*/function () {
|
|
232
232
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref7) {
|
|
233
|
-
var setState, getState, _getState4, _getState4$connectedT, currentContainerId, numberOfTeams, hasLoaded, teams;
|
|
234
|
-
return _regeneratorRuntime.wrap(function
|
|
233
|
+
var setState, getState, _getState4, _getState4$connectedT, currentContainerId, numberOfTeams, hasLoaded, teams, _t4;
|
|
234
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
235
235
|
while (1) switch (_context4.prev = _context4.next) {
|
|
236
236
|
case 0:
|
|
237
237
|
setState = _ref7.setState, getState = _ref7.getState;
|
|
238
238
|
_getState4 = getState(), _getState4$connectedT = _getState4.connectedTeams, currentContainerId = _getState4$connectedT.containerId, numberOfTeams = _getState4$connectedT.numberOfTeams, hasLoaded = _getState4$connectedT.hasLoaded;
|
|
239
239
|
if (!(currentContainerId === containerId && hasLoaded)) {
|
|
240
|
-
_context4.next =
|
|
240
|
+
_context4.next = 1;
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
243
|
return _context4.abrupt("return");
|
|
244
|
-
case
|
|
244
|
+
case 1:
|
|
245
245
|
setState({
|
|
246
246
|
connectedTeams: {
|
|
247
247
|
containerId: containerId,
|
|
@@ -252,10 +252,10 @@ var actions = {
|
|
|
252
252
|
numberOfTeams: numberOfTeams
|
|
253
253
|
}
|
|
254
254
|
});
|
|
255
|
-
_context4.prev =
|
|
256
|
-
_context4.next =
|
|
255
|
+
_context4.prev = 2;
|
|
256
|
+
_context4.next = 3;
|
|
257
257
|
return teamsClient.getConnectedTeams(containerId);
|
|
258
|
-
case
|
|
258
|
+
case 3:
|
|
259
259
|
teams = _context4.sent;
|
|
260
260
|
fireAnalytics('operational.fetchConnectedTeams.succeeded', {
|
|
261
261
|
numberOfTeams: numberOfTeams || null,
|
|
@@ -271,17 +271,17 @@ var actions = {
|
|
|
271
271
|
numberOfTeams: numberOfTeams
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
_context4.next =
|
|
274
|
+
_context4.next = 5;
|
|
275
275
|
break;
|
|
276
|
-
case
|
|
277
|
-
_context4.prev =
|
|
278
|
-
|
|
276
|
+
case 4:
|
|
277
|
+
_context4.prev = 4;
|
|
278
|
+
_t4 = _context4["catch"](2);
|
|
279
279
|
fireAnalytics('operational.fetchConnectedTeams.failed', {
|
|
280
280
|
numberOfTeams: numberOfTeams || null,
|
|
281
281
|
containerId: containerId,
|
|
282
282
|
error: {
|
|
283
|
-
message:
|
|
284
|
-
stack:
|
|
283
|
+
message: _t4.message || JSON.stringify(_t4),
|
|
284
|
+
stack: _t4.stack
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
287
|
setState({
|
|
@@ -290,15 +290,15 @@ var actions = {
|
|
|
290
290
|
isLoading: false,
|
|
291
291
|
hasLoaded: false,
|
|
292
292
|
teams: [],
|
|
293
|
-
error:
|
|
293
|
+
error: _t4,
|
|
294
294
|
numberOfTeams: numberOfTeams
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
|
-
case
|
|
297
|
+
case 5:
|
|
298
298
|
case "end":
|
|
299
299
|
return _context4.stop();
|
|
300
300
|
}
|
|
301
|
-
}, _callee4, null, [[
|
|
301
|
+
}, _callee4, null, [[2, 4]]);
|
|
302
302
|
}));
|
|
303
303
|
return function (_x4) {
|
|
304
304
|
return _ref8.apply(this, arguments);
|
|
@@ -308,18 +308,18 @@ var actions = {
|
|
|
308
308
|
unlinkTeamContainers: function unlinkTeamContainers(teamId, containerId) {
|
|
309
309
|
return /*#__PURE__*/function () {
|
|
310
310
|
var _ref0 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref9) {
|
|
311
|
-
var setState, getState, mutationResult, _getState5, teamContainers, connectedTeams, newContainers;
|
|
312
|
-
return _regeneratorRuntime.wrap(function
|
|
311
|
+
var setState, getState, mutationResult, _getState5, teamContainers, connectedTeams, newContainers, _t5;
|
|
312
|
+
return _regeneratorRuntime.wrap(function (_context5) {
|
|
313
313
|
while (1) switch (_context5.prev = _context5.next) {
|
|
314
314
|
case 0:
|
|
315
315
|
setState = _ref9.setState, getState = _ref9.getState;
|
|
316
316
|
setState({
|
|
317
317
|
unlinkError: null
|
|
318
318
|
});
|
|
319
|
-
_context5.prev =
|
|
320
|
-
_context5.next =
|
|
319
|
+
_context5.prev = 1;
|
|
320
|
+
_context5.next = 2;
|
|
321
321
|
return teamsClient.unlinkTeamContainer(teamId, containerId);
|
|
322
|
-
case
|
|
322
|
+
case 2:
|
|
323
323
|
mutationResult = _context5.sent;
|
|
324
324
|
if (mutationResult.deleteTeamConnectedToContainer.errors.length) {
|
|
325
325
|
// Just handle 1 error at a time should be suffcient as we disconenct only 1 container at a time
|
|
@@ -342,19 +342,19 @@ var actions = {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
_context5.next =
|
|
345
|
+
_context5.next = 4;
|
|
346
346
|
break;
|
|
347
|
-
case
|
|
348
|
-
_context5.prev =
|
|
349
|
-
|
|
347
|
+
case 3:
|
|
348
|
+
_context5.prev = 3;
|
|
349
|
+
_t5 = _context5["catch"](1);
|
|
350
350
|
setState({
|
|
351
|
-
unlinkError:
|
|
351
|
+
unlinkError: _t5
|
|
352
352
|
});
|
|
353
|
-
case
|
|
353
|
+
case 4:
|
|
354
354
|
case "end":
|
|
355
355
|
return _context5.stop();
|
|
356
356
|
}
|
|
357
|
-
}, _callee5, null, [[
|
|
357
|
+
}, _callee5, null, [[1, 3]]);
|
|
358
358
|
}));
|
|
359
359
|
return function (_x5) {
|
|
360
360
|
return _ref0.apply(this, arguments);
|
|
@@ -365,7 +365,7 @@ var actions = {
|
|
|
365
365
|
return /*#__PURE__*/function () {
|
|
366
366
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref1) {
|
|
367
367
|
var setState, getState, _getState6, teamContainers, connectedTeams, containerExists;
|
|
368
|
-
return _regeneratorRuntime.wrap(function
|
|
368
|
+
return _regeneratorRuntime.wrap(function (_context6) {
|
|
369
369
|
while (1) switch (_context6.prev = _context6.next) {
|
|
370
370
|
case 0:
|
|
371
371
|
setState = _ref1.setState, getState = _ref1.getState;
|
|
@@ -374,11 +374,11 @@ var actions = {
|
|
|
374
374
|
return container.id === teamContainer.id;
|
|
375
375
|
});
|
|
376
376
|
if (!containerExists) {
|
|
377
|
-
_context6.next =
|
|
377
|
+
_context6.next = 1;
|
|
378
378
|
break;
|
|
379
379
|
}
|
|
380
380
|
return _context6.abrupt("return");
|
|
381
|
-
case
|
|
381
|
+
case 1:
|
|
382
382
|
if (connectedTeams.containerId === teamContainer.id) {
|
|
383
383
|
setState({
|
|
384
384
|
teamContainers: [].concat(_toConsumableArray(teamContainers), [teamContainer]),
|
|
@@ -389,7 +389,7 @@ var actions = {
|
|
|
389
389
|
teamContainers: [].concat(_toConsumableArray(teamContainers), [teamContainer])
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
case
|
|
392
|
+
case 2:
|
|
393
393
|
case "end":
|
|
394
394
|
return _context6.stop();
|
|
395
395
|
}
|
|
@@ -423,7 +423,7 @@ export var useTeamContainers = function useTeamContainers(teamId) {
|
|
|
423
423
|
}
|
|
424
424
|
}, [teamId, actions, enable, fireEvent, useMultiTeam]);
|
|
425
425
|
var refetchTeamContainers = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
426
|
-
return _regeneratorRuntime.wrap(function
|
|
426
|
+
return _regeneratorRuntime.wrap(function (_context7) {
|
|
427
427
|
while (1) switch (_context7.prev = _context7.next) {
|
|
428
428
|
case 0:
|
|
429
429
|
return _context7.abrupt("return", actions.refetchTeamContainers(fireEvent));
|