@atlaskit/teams-public 0.53.0 → 0.54.1
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 +20 -0
- package/dist/cjs/controllers/hooks/use-create-containers/index.js +71 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/ui/team-containers/add-container-card/index.js +20 -9
- package/dist/cjs/ui/team-containers/main.js +81 -170
- package/dist/es2019/controllers/hooks/use-create-containers/index.js +68 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/team-containers/add-container-card/index.js +19 -9
- package/dist/es2019/ui/team-containers/main.js +56 -131
- package/dist/esm/controllers/hooks/use-create-containers/index.js +65 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/team-containers/add-container-card/index.js +20 -9
- package/dist/esm/ui/team-containers/main.js +80 -169
- package/dist/types/controllers/hooks/use-create-containers/index.d.ts +24 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/team-containers/add-container-card/index.d.ts +15 -9
- package/dist/types/ui/team-containers/main.d.ts +1 -1
- package/dist/types-ts4.5/controllers/hooks/use-create-containers/index.d.ts +24 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/team-containers/add-container-card/index.d.ts +15 -9
- package/dist/types-ts4.5/ui/team-containers/main.d.ts +1 -1
- package/i18n/package.json +1 -1
- package/loom-avatar/package.json +1 -1
- package/package.json +4 -4
- package/team-containers/package.json +1 -1
- package/dist/cjs/ui/team-containers/add-container-card/add-container-card-with-create/index.compiled.css +0 -15
- package/dist/cjs/ui/team-containers/add-container-card/add-container-card-with-create/index.js +0 -130
- package/dist/cjs/ui/team-containers/add-container-card/add-container-card-with-create/utils.js +0 -95
- package/dist/es2019/ui/team-containers/add-container-card/add-container-card-with-create/index.compiled.css +0 -15
- package/dist/es2019/ui/team-containers/add-container-card/add-container-card-with-create/index.js +0 -107
- package/dist/es2019/ui/team-containers/add-container-card/add-container-card-with-create/utils.js +0 -89
- package/dist/esm/ui/team-containers/add-container-card/add-container-card-with-create/index.compiled.css +0 -15
- package/dist/esm/ui/team-containers/add-container-card/add-container-card-with-create/index.js +0 -121
- package/dist/esm/ui/team-containers/add-container-card/add-container-card-with-create/utils.js +0 -88
- package/dist/types/ui/team-containers/add-container-card/add-container-card-with-create/index.d.ts +0 -30
- package/dist/types/ui/team-containers/add-container-card/add-container-card-with-create/utils.d.ts +0 -49
- package/dist/types-ts4.5/ui/team-containers/add-container-card/add-container-card-with-create/index.d.ts +0 -30
- package/dist/types-ts4.5/ui/team-containers/add-container-card/add-container-card-with-create/utils.d.ts +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.54.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a16cf46ffdef0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16cf46ffdef0) -
|
|
8
|
+
Optimise setting state in create containers store
|
|
9
|
+
|
|
10
|
+
## 0.54.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`a57ad7783aa82`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a57ad7783aa82) -
|
|
15
|
+
Add create container store and update create container UX
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`aa3cc45df6311`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa3cc45df6311) -
|
|
20
|
+
Update failed events to be track (so they can be used in stastig)
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 0.53.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useCreateContainers = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _reactSweetState = require("react-sweet-state");
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
var actions = {
|
|
13
|
+
updateContainerLoading: function updateContainerLoading(product, isLoading) {
|
|
14
|
+
return function (_ref) {
|
|
15
|
+
var setState = _ref.setState,
|
|
16
|
+
getState = _ref.getState;
|
|
17
|
+
var containers = getState();
|
|
18
|
+
var current = containers[product];
|
|
19
|
+
if (current.isLoading === isLoading) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, current), {}, {
|
|
23
|
+
isLoading: isLoading
|
|
24
|
+
}))));
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
updateContainerCreated: function updateContainerCreated(product, isCreated) {
|
|
28
|
+
return function (_ref2) {
|
|
29
|
+
var setState = _ref2.setState,
|
|
30
|
+
getState = _ref2.getState;
|
|
31
|
+
var containers = getState();
|
|
32
|
+
var current = containers[product];
|
|
33
|
+
if (current.isCreated === isCreated) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
var isLoading = isCreated ? false : current.isLoading;
|
|
37
|
+
setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, current), {}, {
|
|
38
|
+
isCreated: isCreated,
|
|
39
|
+
isLoading: isLoading
|
|
40
|
+
}))));
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var initialState = {
|
|
45
|
+
Jira: {
|
|
46
|
+
isLoading: false,
|
|
47
|
+
isCreated: false
|
|
48
|
+
},
|
|
49
|
+
Confluence: {
|
|
50
|
+
isLoading: false,
|
|
51
|
+
isCreated: false
|
|
52
|
+
},
|
|
53
|
+
Loom: {
|
|
54
|
+
isLoading: false,
|
|
55
|
+
isCreated: false
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var store = (0, _reactSweetState.createStore)({
|
|
59
|
+
initialState: initialState,
|
|
60
|
+
actions: actions,
|
|
61
|
+
name: 'CreateContainers'
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Custom hook for accessing and updating the state of container creation (Jira, Confluence, Loom).
|
|
66
|
+
*
|
|
67
|
+
* Provides state and actions for loading and creation status of each container type.
|
|
68
|
+
*
|
|
69
|
+
* @returns {object} State and actions for managing container creation.
|
|
70
|
+
*/
|
|
71
|
+
var useCreateContainers = exports.useCreateContainers = (0, _reactSweetState.createHook)(store);
|
package/dist/cjs/index.js
CHANGED
|
@@ -57,6 +57,12 @@ Object.defineProperty(exports, "useConnectedTeams", {
|
|
|
57
57
|
return _useTeamContainers.useConnectedTeams;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "useCreateContainers", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _useCreateContainers.useCreateContainers;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
60
66
|
Object.defineProperty(exports, "useProductPermissions", {
|
|
61
67
|
enumerable: true,
|
|
62
68
|
get: function get() {
|
|
@@ -92,6 +98,7 @@ var _teamLinkCard = require("./ui/team-containers/team-link-card");
|
|
|
92
98
|
var _containerIcon = require("./common/ui/container-icon");
|
|
93
99
|
var _useTeamContainers = require("./controllers/hooks/use-team-containers");
|
|
94
100
|
var _useTeamWebLinks = require("./controllers/hooks/use-team-web-links");
|
|
101
|
+
var _useCreateContainers = require("./controllers/hooks/use-create-containers");
|
|
95
102
|
var _useTeamLinksAndContainers = require("./controllers/hooks/use-team-links-and-containers");
|
|
96
103
|
var _useProductPermission = require("./controllers/hooks/use-product-permission");
|
|
97
104
|
var _utils = require("./controllers/product-permission/utils");
|
|
@@ -16,6 +16,7 @@ var _new = require("@atlaskit/button/new");
|
|
|
16
16
|
var _add = _interopRequireDefault(require("@atlaskit/icon/core/add"));
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
|
+
var _linkedContainerCardSkeleton = require("../../../common/ui/team-containers-skeleton/linked-container-card-skeleton");
|
|
19
20
|
var _getContainerProperties = require("../../../common/utils/get-container-properties");
|
|
20
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
22
|
var styles = {
|
|
@@ -46,7 +47,9 @@ var AddContainerCardWrapper = function AddContainerCardWrapper(_ref) {
|
|
|
46
47
|
};
|
|
47
48
|
var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref2) {
|
|
48
49
|
var containerType = _ref2.containerType,
|
|
49
|
-
onAddAContainerClick = _ref2.onAddAContainerClick
|
|
50
|
+
onAddAContainerClick = _ref2.onAddAContainerClick,
|
|
51
|
+
_ref2$isLoading = _ref2.isLoading,
|
|
52
|
+
isLoading = _ref2$isLoading === void 0 ? false : _ref2$isLoading;
|
|
50
53
|
var _getContainerProperti = (0, _getContainerProperties.getContainerProperties)({
|
|
51
54
|
containerType: containerType,
|
|
52
55
|
iconSize: (0, _platformFeatureFlags.fg)('enable_medium_size_icons_for_team_link_cards') ? 'medium' : undefined,
|
|
@@ -55,6 +58,11 @@ var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref
|
|
|
55
58
|
description = _getContainerProperti.description,
|
|
56
59
|
icon = _getContainerProperti.icon,
|
|
57
60
|
title = _getContainerProperti.title;
|
|
61
|
+
if (isLoading) {
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_linkedContainerCardSkeleton.LinkedContainerCardSkeleton, {
|
|
63
|
+
containerType: containerType
|
|
64
|
+
});
|
|
65
|
+
}
|
|
58
66
|
return /*#__PURE__*/_react.default.createElement(AddContainerCardWrapper, {
|
|
59
67
|
onClick: onAddAContainerClick
|
|
60
68
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
@@ -90,24 +98,27 @@ var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref
|
|
|
90
98
|
}, description)))));
|
|
91
99
|
};
|
|
92
100
|
var getAddContainerCards = exports.getAddContainerCards = function getAddContainerCards(_ref3) {
|
|
93
|
-
var
|
|
101
|
+
var containers = _ref3.containers,
|
|
94
102
|
_onAddAContainerClick = _ref3.onAddAContainerClick;
|
|
95
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, containers.Jira.canAdd && /*#__PURE__*/_react.default.createElement(AddContainerCard, {
|
|
96
104
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
97
105
|
return _onAddAContainerClick(e, 'Jira');
|
|
98
106
|
},
|
|
99
|
-
containerType: "JiraProject"
|
|
100
|
-
|
|
107
|
+
containerType: "JiraProject",
|
|
108
|
+
isLoading: containers.Jira.isLoading
|
|
109
|
+
}), containers.Confluence.canAdd && /*#__PURE__*/_react.default.createElement(AddContainerCard, {
|
|
101
110
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
102
111
|
return _onAddAContainerClick(e, 'Confluence');
|
|
103
112
|
},
|
|
104
|
-
containerType: "ConfluenceSpace"
|
|
105
|
-
|
|
113
|
+
containerType: "ConfluenceSpace",
|
|
114
|
+
isLoading: containers.Confluence.isLoading
|
|
115
|
+
}), containers.Loom.canAdd && (0, _platformFeatureFlags.fg)('loom_tab_in_container_linker_team_profile_page') && /*#__PURE__*/_react.default.createElement(AddContainerCard, {
|
|
106
116
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
107
117
|
return _onAddAContainerClick(e, 'Loom');
|
|
108
118
|
},
|
|
109
|
-
containerType: "LoomSpace"
|
|
110
|
-
|
|
119
|
+
containerType: "LoomSpace",
|
|
120
|
+
isLoading: containers.Loom.isLoading
|
|
121
|
+
}), containers.WebLink.canAdd && /*#__PURE__*/_react.default.createElement(AddContainerCard, {
|
|
111
122
|
onAddAContainerClick: function onAddAContainerClick(e) {
|
|
112
123
|
return _onAddAContainerClick(e, 'WebLink');
|
|
113
124
|
},
|
|
@@ -7,54 +7,62 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.TeamContainers = exports.MAX_NUMBER_OF_CONTAINERS_TO_SHOW = exports.ICON_COLOR = exports.ICON_BACKGROUND = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
17
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
18
17
|
var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
|
|
19
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _primitives = require("@atlaskit/primitives");
|
|
21
20
|
var _teamsAppInternalProductPermissions = require("@atlaskit/teams-app-internal-product-permissions");
|
|
22
|
-
var _teamsClient = require("@atlaskit/teams-client");
|
|
23
|
-
var _types = require("@atlaskit/teams-client/types");
|
|
24
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
22
|
var _teamContainersSkeleton = require("../../common/ui/team-containers-skeleton");
|
|
26
|
-
var _linkedContainerCardSkeleton = require("../../common/ui/team-containers-skeleton/linked-container-card-skeleton");
|
|
27
23
|
var _analytics = require("../../common/utils/analytics");
|
|
28
24
|
var _controllers = require("../../controllers");
|
|
25
|
+
var _useCreateContainers5 = require("../../controllers/hooks/use-create-containers");
|
|
29
26
|
var _useProductPermission3 = require("../../controllers/hooks/use-product-permission");
|
|
30
27
|
var _useRequestedContainer = require("../../controllers/hooks/use-requested-container");
|
|
31
|
-
var
|
|
28
|
+
var _useTeamContainers3 = require("../../controllers/hooks/use-team-containers");
|
|
32
29
|
var _useTeamLinksAndContainers = require("../../controllers/hooks/use-team-links-and-containers");
|
|
33
30
|
var _addContainerCard = require("./add-container-card");
|
|
34
|
-
var _addContainerCardWithCreate = require("./add-container-card/add-container-card-with-create");
|
|
35
31
|
var _async = require("./disconnect-dialog/async");
|
|
36
32
|
var _noProductAccessEmptyState = require("./no-product-access-empty-state");
|
|
37
33
|
var _teamLinkCard = require("./team-link-card");
|
|
38
|
-
var _utils = require("./utils");
|
|
39
34
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
40
35
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
36
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
42
37
|
var ICON_BACKGROUND = exports.ICON_BACKGROUND = "var(--ds-icon-inverse, ".concat(_colors.N0, ")");
|
|
43
38
|
var ICON_COLOR = exports.ICON_COLOR = "var(--ds-icon-subtle, ".concat(_colors.N90, ")");
|
|
44
39
|
var MAX_NUMBER_OF_CONTAINERS_TO_SHOW = exports.MAX_NUMBER_OF_CONTAINERS_TO_SHOW = 4;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
function useRefreshOnContainerCreated(teamId) {
|
|
41
|
+
var _useCreateContainers = (0, _useCreateContainers5.useCreateContainers)(),
|
|
42
|
+
_useCreateContainers2 = (0, _slicedToArray2.default)(_useCreateContainers, 1),
|
|
43
|
+
containers = _useCreateContainers2[0];
|
|
44
|
+
var _useTeamContainers = (0, _useTeamContainers3.useTeamContainers)(teamId),
|
|
45
|
+
refetchTeamContainers = _useTeamContainers.refetchTeamContainers;
|
|
46
|
+
var _useState = (0, _react.useState)({}),
|
|
47
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
48
|
+
refreshedProducts = _useState2[0],
|
|
49
|
+
setRefreshedProducts = _useState2[1];
|
|
50
|
+
(0, _react.useEffect)(function () {
|
|
51
|
+
var products = Object.keys(containers);
|
|
52
|
+
products.forEach(function (product) {
|
|
53
|
+
var isCreated = containers[product].isCreated;
|
|
54
|
+
if (isCreated && !refreshedProducts[product]) {
|
|
55
|
+
setRefreshedProducts(function (prev) {
|
|
56
|
+
return _objectSpread(_objectSpread({}, prev), {}, (0, _defineProperty2.default)({}, product, true));
|
|
57
|
+
});
|
|
58
|
+
refetchTeamContainers();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}, [containers, refetchTeamContainers, refreshedProducts]);
|
|
62
|
+
}
|
|
55
63
|
var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
56
64
|
var teamId = _ref.teamId,
|
|
57
|
-
|
|
65
|
+
onAddAContainerClick = _ref.onAddAContainerClick,
|
|
58
66
|
onEditContainerClick = _ref.onEditContainerClick,
|
|
59
67
|
_ref$onRequestedConta = _ref.onRequestedContainerTimeout,
|
|
60
68
|
onRequestedContainerTimeout = _ref$onRequestedConta === void 0 ? function () {} : _ref$onRequestedConta,
|
|
@@ -64,13 +72,11 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
64
72
|
filterContainerId = _ref.filterContainerId,
|
|
65
73
|
isDisplayedOnProfileCard = _ref.isDisplayedOnProfileCard,
|
|
66
74
|
_ref$maxNumberOfConta = _ref.maxNumberOfContainersToShow,
|
|
67
|
-
maxNumberOfContainersToShow = _ref$maxNumberOfConta === void 0 ? MAX_NUMBER_OF_CONTAINERS_TO_SHOW : _ref$maxNumberOfConta
|
|
68
|
-
addFlag = _ref.addFlag;
|
|
75
|
+
maxNumberOfContainersToShow = _ref$maxNumberOfConta === void 0 ? MAX_NUMBER_OF_CONTAINERS_TO_SHOW : _ref$maxNumberOfConta;
|
|
69
76
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
70
77
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
71
|
-
var
|
|
72
|
-
unlinkError =
|
|
73
|
-
refetchTeamContainers = _useTeamContainers.refetchTeamContainers;
|
|
78
|
+
var _useTeamContainers2 = (0, _useTeamContainers3.useTeamContainers)(teamId),
|
|
79
|
+
unlinkError = _useTeamContainers2.unlinkError;
|
|
74
80
|
var _useTeamLinksAndConta = (0, _useTeamLinksAndContainers.useTeamLinksAndContainers)(teamId, true),
|
|
75
81
|
teamLinks = _useTeamLinksAndConta.teamLinks,
|
|
76
82
|
removeTeamLink = _useTeamLinksAndConta.removeTeamLink,
|
|
@@ -83,45 +89,39 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
83
89
|
onRequestedContainerTimeout: onRequestedContainerTimeout
|
|
84
90
|
}),
|
|
85
91
|
requestedContainers = _useRequestedContaine.requestedContainers;
|
|
86
|
-
var _useTeamContainersHoo = (0,
|
|
92
|
+
var _useTeamContainersHoo = (0, _useTeamContainers3.useTeamContainersHook)(),
|
|
87
93
|
_useTeamContainersHoo2 = (0, _slicedToArray2.default)(_useTeamContainersHoo, 2),
|
|
88
94
|
_ = _useTeamContainersHoo2[0],
|
|
89
95
|
actions = _useTeamContainersHoo2[1];
|
|
90
|
-
var _useState = (0, _react.useState)(false),
|
|
91
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
92
|
-
showMore = _useState2[0],
|
|
93
|
-
setShowMore = _useState2[1];
|
|
94
96
|
var _useState3 = (0, _react.useState)(false),
|
|
95
97
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var _useState5 = (0, _react.useState)(),
|
|
98
|
+
showMore = _useState4[0],
|
|
99
|
+
setShowMore = _useState4[1];
|
|
100
|
+
var _useState5 = (0, _react.useState)(false),
|
|
99
101
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var _useState7 = (0, _react.useState)(
|
|
102
|
+
isDisconnectDialogOpen = _useState6[0],
|
|
103
|
+
setIsDisconnectDialogOpen = _useState6[1];
|
|
104
|
+
var _useState7 = (0, _react.useState)(),
|
|
103
105
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var _useState9 = (0, _react.useState)(
|
|
106
|
+
selectedContainerDetails = _useState8[0],
|
|
107
|
+
setSelectedContainerDetails = _useState8[1];
|
|
108
|
+
var _useState9 = (0, _react.useState)(teamLinks),
|
|
109
|
+
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
110
|
+
filteredTeamLinks = _useState0[0],
|
|
111
|
+
setFilteredTeamLinks = _useState0[1];
|
|
112
|
+
var _useState1 = (0, _react.useState)({
|
|
107
113
|
Jira: false,
|
|
108
114
|
Confluence: false,
|
|
109
115
|
Loom: false,
|
|
110
116
|
WebLink: false
|
|
111
117
|
}),
|
|
112
|
-
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
113
|
-
showAddContainer = _useState0[0],
|
|
114
|
-
setShowAddContainer = _useState0[1];
|
|
115
|
-
var _useState1 = (0, _react.useState)({
|
|
116
|
-
jira: false,
|
|
117
|
-
confluence: false,
|
|
118
|
-
loom: false
|
|
119
|
-
}),
|
|
120
118
|
_useState10 = (0, _slicedToArray2.default)(_useState1, 2),
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
canAddContainer = _useState10[0],
|
|
120
|
+
setCanAddContainer = _useState10[1];
|
|
121
|
+
var _useCreateContainers3 = (0, _useCreateContainers5.useCreateContainers)(),
|
|
122
|
+
_useCreateContainers4 = (0, _slicedToArray2.default)(_useCreateContainers3, 1),
|
|
123
|
+
containers = _useCreateContainers4[0];
|
|
123
124
|
var _usePeopleAndTeamAnal = (0, _analytics.usePeopleAndTeamAnalytics)(),
|
|
124
|
-
fireOperationalEvent = _usePeopleAndTeamAnal.fireOperationalEvent,
|
|
125
125
|
fireTrackEvent = _usePeopleAndTeamAnal.fireTrackEvent;
|
|
126
126
|
var _useProductPermission = (0, _teamsAppInternalProductPermissions.useProductPermissions)({
|
|
127
127
|
userId: userId,
|
|
@@ -145,20 +145,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
145
145
|
}),
|
|
146
146
|
productPermissionsOld = _useProductPermission2.data,
|
|
147
147
|
productPermissionIsLoadingOld = _useProductPermission2.loading;
|
|
148
|
-
|
|
149
|
-
if (!productPermissions) {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
if ((0, _platformFeatureFlags.fg)('migrate-product-permissions')) {
|
|
153
|
-
return (0, _teamsAppInternalProductPermissions.hasProductPermission)(productPermissions, 'jira', ['CREATE_PROJECT']) ||
|
|
154
|
-
//@todo: fix in PTC-12660
|
|
155
|
-
(0, _teamsAppInternalProductPermissions.hasProductPermission)(productPermissions, 'confluence', ['write']) || (0, _teamsAppInternalProductPermissions.hasProductPermission)(productPermissions, 'loom', ['write']);
|
|
156
|
-
}
|
|
157
|
-
return false;
|
|
158
|
-
}, [productPermissions]);
|
|
159
|
-
var isCreateContainerExperimentEnabled = (0, _react.useMemo)(function () {
|
|
160
|
-
return hasPermissionToCreateContainers && _featureGateJsClient.default.initializeCompleted() && _featureGateJsClient.default.getExperimentValue('teams_app_auto_container_creation', 'isEnabled', false);
|
|
161
|
-
}, [hasPermissionToCreateContainers]);
|
|
148
|
+
useRefreshOnContainerCreated(teamId);
|
|
162
149
|
(0, _react.useEffect)(function () {
|
|
163
150
|
if (isDisplayedOnProfileCard && filterContainerId) {
|
|
164
151
|
setFilteredTeamLinks(teamLinks.filter(function (container) {
|
|
@@ -171,7 +158,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
171
158
|
(0, _react.useEffect)(function () {
|
|
172
159
|
var containersToCheck = filteredTeamLinks;
|
|
173
160
|
if (containersToCheck.length > maxNumberOfContainersToShow || isDisplayedOnProfileCard) {
|
|
174
|
-
|
|
161
|
+
setCanAddContainer({
|
|
175
162
|
Jira: false,
|
|
176
163
|
Confluence: false,
|
|
177
164
|
Loom: false,
|
|
@@ -186,23 +173,23 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
186
173
|
var containerRequested = function containerRequested(type) {
|
|
187
174
|
return requestedContainers.includes(type);
|
|
188
175
|
};
|
|
189
|
-
var showContainer = function showContainer(containerExists, isRequesting, product
|
|
176
|
+
var showContainer = function showContainer(containerExists, isRequesting, product) {
|
|
190
177
|
if (containerExists || isRequesting) {
|
|
191
178
|
return false;
|
|
192
179
|
}
|
|
193
180
|
if ((0, _platformFeatureFlags.fg)('migrate-product-permissions')) {
|
|
194
|
-
return productPermissions && (0, _teamsAppInternalProductPermissions.hasProductPermission)(productPermissions, product,
|
|
181
|
+
return productPermissions && (0, _teamsAppInternalProductPermissions.hasProductPermission)(productPermissions, product, []) || false;
|
|
195
182
|
}
|
|
196
|
-
return productPermissionsOld && (0, _controllers.hasProductPermission)(productPermissionsOld, product,
|
|
183
|
+
return productPermissionsOld && (0, _controllers.hasProductPermission)(productPermissionsOld, product, []) || false;
|
|
197
184
|
};
|
|
198
|
-
|
|
199
|
-
Jira: showContainer(containerExists('JiraProject'), containerRequested('JiraProject'), 'jira'
|
|
200
|
-
Confluence: showContainer(containerExists('ConfluenceSpace'), containerRequested('ConfluenceSpace'), 'confluence'
|
|
201
|
-
Loom: showContainer(containerExists('LoomSpace'), containerRequested('LoomSpace'), 'loom'
|
|
185
|
+
setCanAddContainer({
|
|
186
|
+
Jira: showContainer(containerExists('JiraProject'), containerRequested('JiraProject'), 'jira'),
|
|
187
|
+
Confluence: showContainer(containerExists('ConfluenceSpace'), containerRequested('ConfluenceSpace'), 'confluence'),
|
|
188
|
+
Loom: showContainer(containerExists('LoomSpace'), containerRequested('LoomSpace'), 'loom'),
|
|
202
189
|
WebLink: !containerExists('WebLink')
|
|
203
190
|
});
|
|
204
191
|
}
|
|
205
|
-
}, [isDisplayedOnProfileCard, productPermissions, productPermissionsOld, filteredTeamLinks, maxNumberOfContainersToShow, requestedContainers
|
|
192
|
+
}, [isDisplayedOnProfileCard, productPermissions, productPermissionsOld, filteredTeamLinks, maxNumberOfContainersToShow, requestedContainers]);
|
|
206
193
|
var handleShowMore = function handleShowMore() {
|
|
207
194
|
setShowMore(!showMore);
|
|
208
195
|
};
|
|
@@ -247,12 +234,12 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
247
234
|
case 8:
|
|
248
235
|
setIsDisconnectDialogOpen(false);
|
|
249
236
|
if (unlinkError) {
|
|
250
|
-
|
|
237
|
+
fireTrackEvent(createAnalyticsEvent, {
|
|
251
238
|
action: _analytics.AnalyticsAction.FAILED,
|
|
252
239
|
actionSubject: 'teamContainerUnlinked'
|
|
253
240
|
});
|
|
254
241
|
} else {
|
|
255
|
-
|
|
242
|
+
fireTrackEvent(createAnalyticsEvent, {
|
|
256
243
|
action: _analytics.AnalyticsAction.SUCCEEDED,
|
|
257
244
|
actionSubject: 'teamContainerUnlinked',
|
|
258
245
|
attributes: {
|
|
@@ -273,87 +260,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
273
260
|
return function (_x) {
|
|
274
261
|
return _ref2.apply(this, arguments);
|
|
275
262
|
};
|
|
276
|
-
}(), [actions, createAnalyticsEvent,
|
|
277
|
-
var handleCreateContainer = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
278
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(containerType) {
|
|
279
|
-
var result;
|
|
280
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
281
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
282
|
-
case 0:
|
|
283
|
-
setContainersBeingCreated(_objectSpread(_objectSpread({}, containersBeingCreated), {}, (0, _defineProperty2.default)({}, containerType.toLowerCase(), true)));
|
|
284
|
-
_context2.prev = 1;
|
|
285
|
-
_context2.next = 4;
|
|
286
|
-
return _teamsClient.teamsClient.createTeamContainers({
|
|
287
|
-
teamId: teamId,
|
|
288
|
-
containers: [{
|
|
289
|
-
type: containerTypeMap[containerType],
|
|
290
|
-
containerSiteId: cloudId
|
|
291
|
-
}]
|
|
292
|
-
});
|
|
293
|
-
case 4:
|
|
294
|
-
result = _context2.sent;
|
|
295
|
-
if (result.containersNotCreated.length === 0) {
|
|
296
|
-
fireOperationalEvent(createAnalyticsEvent, {
|
|
297
|
-
action: _analytics.AnalyticsAction.SUCCEEDED,
|
|
298
|
-
actionSubject: 'teamContainerCreate',
|
|
299
|
-
attributes: {
|
|
300
|
-
containerType: containerType,
|
|
301
|
-
teamId: teamId
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
refetchTeamContainers();
|
|
305
|
-
} else {
|
|
306
|
-
fireOperationalEvent(createAnalyticsEvent, {
|
|
307
|
-
action: _analytics.AnalyticsAction.FAILED,
|
|
308
|
-
actionSubject: 'teamContainerCreate',
|
|
309
|
-
attributes: {
|
|
310
|
-
containerType: containerType,
|
|
311
|
-
teamId: teamId
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
addFlag === null || addFlag === void 0 || addFlag((0, _utils.getCreateContainerTryAgainFlag)({
|
|
315
|
-
tryAgainAction: function tryAgainAction() {
|
|
316
|
-
handleCreateContainer(containerType);
|
|
317
|
-
},
|
|
318
|
-
containerType: containerTypeToTextMap[containerType]
|
|
319
|
-
}));
|
|
320
|
-
}
|
|
321
|
-
setContainersBeingCreated(_objectSpread(_objectSpread({}, containersBeingCreated), {}, (0, _defineProperty2.default)({}, containerType.toLowerCase(), false)));
|
|
322
|
-
_context2.next = 13;
|
|
323
|
-
break;
|
|
324
|
-
case 9:
|
|
325
|
-
_context2.prev = 9;
|
|
326
|
-
_context2.t0 = _context2["catch"](1);
|
|
327
|
-
fireOperationalEvent(createAnalyticsEvent, {
|
|
328
|
-
action: _analytics.AnalyticsAction.FAILED,
|
|
329
|
-
actionSubject: 'teamContainerCreate',
|
|
330
|
-
attributes: {
|
|
331
|
-
containerType: containerType,
|
|
332
|
-
teamId: teamId
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
if (_context2.t0 instanceof _teamsClient.HttpError) {
|
|
336
|
-
if (_context2.t0.status === 500) {
|
|
337
|
-
addFlag === null || addFlag === void 0 || addFlag((0, _utils.getCreateContainerTryAgainFlag)({
|
|
338
|
-
tryAgainAction: function tryAgainAction() {
|
|
339
|
-
handleCreateContainer(containerType);
|
|
340
|
-
},
|
|
341
|
-
containerType: containerTypeToTextMap[containerType]
|
|
342
|
-
}));
|
|
343
|
-
} else {
|
|
344
|
-
addFlag === null || addFlag === void 0 || addFlag((0, _utils.getCreateContainerContactSupportFlag)());
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
case 13:
|
|
348
|
-
case "end":
|
|
349
|
-
return _context2.stop();
|
|
350
|
-
}
|
|
351
|
-
}, _callee2, null, [[1, 9]]);
|
|
352
|
-
}));
|
|
353
|
-
return function (_x2) {
|
|
354
|
-
return _ref3.apply(this, arguments);
|
|
355
|
-
};
|
|
356
|
-
}(), [containersBeingCreated, teamId, cloudId, fireOperationalEvent, createAnalyticsEvent, refetchTeamContainers, addFlag]);
|
|
263
|
+
}(), [actions, createAnalyticsEvent, fireTrackEvent, filteredTeamLinks, removeTeamLink, teamId, unlinkError]);
|
|
357
264
|
var TeamContainersSkeletonComponent = (components === null || components === void 0 ? void 0 : components.TeamContainersSkeleton) || _teamContainersSkeleton.TeamContainersSkeleton;
|
|
358
265
|
var hasNoPermissions = (0, _react.useMemo)(function () {
|
|
359
266
|
if ((0, _platformFeatureFlags.fg)('migrate-product-permissions')) {
|
|
@@ -373,6 +280,21 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
373
280
|
}
|
|
374
281
|
return productPermissionIsLoadingOld;
|
|
375
282
|
}, [linksLoading, productPermissionIsLoading, productPermissionIsLoadingOld]);
|
|
283
|
+
var availableContainers = (0, _react.useMemo)(function () {
|
|
284
|
+
var getAvailableContainer = function getAvailableContainer(productKey, requestedType) {
|
|
285
|
+
var _containers;
|
|
286
|
+
return {
|
|
287
|
+
canAdd: canAddContainer === null || canAddContainer === void 0 ? void 0 : canAddContainer[productKey],
|
|
288
|
+
isLoading: (containers === null || containers === void 0 || (_containers = containers[productKey]) === null || _containers === void 0 ? void 0 : _containers.isLoading) || (requestedContainers === null || requestedContainers === void 0 ? void 0 : requestedContainers.includes(requestedType))
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
return {
|
|
292
|
+
Jira: getAvailableContainer('Jira', 'JiraProject'),
|
|
293
|
+
Confluence: getAvailableContainer('Confluence', 'ConfluenceSpace'),
|
|
294
|
+
Loom: getAvailableContainer('Loom', 'LoomSpace'),
|
|
295
|
+
WebLink: getAvailableContainer('WebLink', 'WebLink')
|
|
296
|
+
};
|
|
297
|
+
}, [canAddContainer, containers, requestedContainers]);
|
|
376
298
|
if (isLoading) {
|
|
377
299
|
return /*#__PURE__*/_react.default.createElement(TeamContainersSkeletonComponent, {
|
|
378
300
|
numberOfContainers: maxNumberOfContainersToShow
|
|
@@ -386,12 +308,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
386
308
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Grid, {
|
|
387
309
|
templateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
|
|
388
310
|
gap: isDisplayedOnProfileCard ? 'space.0' : 'space.100'
|
|
389
|
-
},
|
|
390
|
-
return /*#__PURE__*/_react.default.createElement(_linkedContainerCardSkeleton.LinkedContainerCardSkeleton, {
|
|
391
|
-
key: containerType,
|
|
392
|
-
containerType: containerType
|
|
393
|
-
});
|
|
394
|
-
}), filteredTeamLinks.slice(0, maxNumberOfContainersToShow).map(function (container) {
|
|
311
|
+
}, filteredTeamLinks.slice(0, maxNumberOfContainersToShow).map(function (container) {
|
|
395
312
|
return /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
|
|
396
313
|
key: container.id,
|
|
397
314
|
containerType: container.type,
|
|
@@ -413,15 +330,9 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
413
330
|
return handleEditContainerClick(container);
|
|
414
331
|
}
|
|
415
332
|
});
|
|
416
|
-
}),
|
|
417
|
-
|
|
418
|
-
onAddAContainerClick:
|
|
419
|
-
_onAddAContainerClick(e, containerType);
|
|
420
|
-
},
|
|
421
|
-
containersLoading: containersBeingCreated
|
|
422
|
-
}) : (0, _addContainerCard.getAddContainerCards)({
|
|
423
|
-
showAddContainer: showAddContainer,
|
|
424
|
-
onAddAContainerClick: _onAddAContainerClick
|
|
333
|
+
}), (0, _addContainerCard.getAddContainerCards)({
|
|
334
|
+
containers: availableContainers,
|
|
335
|
+
onAddAContainerClick: onAddAContainerClick
|
|
425
336
|
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(function (container) {
|
|
426
337
|
return /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
|
|
427
338
|
key: container.id,
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createHook, createStore } from 'react-sweet-state';
|
|
2
|
+
const actions = {
|
|
3
|
+
updateContainerLoading: (product, isLoading) => ({
|
|
4
|
+
setState,
|
|
5
|
+
getState
|
|
6
|
+
}) => {
|
|
7
|
+
const containers = getState();
|
|
8
|
+
const current = containers[product];
|
|
9
|
+
if (current.isLoading === isLoading) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
setState({
|
|
13
|
+
...containers,
|
|
14
|
+
[product]: {
|
|
15
|
+
...current,
|
|
16
|
+
isLoading
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
updateContainerCreated: (product, isCreated) => ({
|
|
21
|
+
setState,
|
|
22
|
+
getState
|
|
23
|
+
}) => {
|
|
24
|
+
const containers = getState();
|
|
25
|
+
const current = containers[product];
|
|
26
|
+
if (current.isCreated === isCreated) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const isLoading = isCreated ? false : current.isLoading;
|
|
30
|
+
setState({
|
|
31
|
+
...containers,
|
|
32
|
+
[product]: {
|
|
33
|
+
...current,
|
|
34
|
+
isCreated,
|
|
35
|
+
isLoading
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const initialState = {
|
|
41
|
+
Jira: {
|
|
42
|
+
isLoading: false,
|
|
43
|
+
isCreated: false
|
|
44
|
+
},
|
|
45
|
+
Confluence: {
|
|
46
|
+
isLoading: false,
|
|
47
|
+
isCreated: false
|
|
48
|
+
},
|
|
49
|
+
Loom: {
|
|
50
|
+
isLoading: false,
|
|
51
|
+
isCreated: false
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const store = createStore({
|
|
55
|
+
initialState,
|
|
56
|
+
actions,
|
|
57
|
+
name: 'CreateContainers'
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Custom hook for accessing and updating the state of container creation (Jira, Confluence, Loom).
|
|
62
|
+
*
|
|
63
|
+
* Provides state and actions for loading and creation status of each container type.
|
|
64
|
+
*
|
|
65
|
+
* @returns {object} State and actions for managing container creation.
|
|
66
|
+
*/
|
|
67
|
+
const useCreateContainers = createHook(store);
|
|
68
|
+
export { useCreateContainers };
|
package/dist/es2019/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { TeamLinkCard } from './ui/team-containers/team-link-card';
|
|
|
3
3
|
export { ContainerIcon } from './common/ui/container-icon';
|
|
4
4
|
export { useTeamContainers, useConnectedTeams } from './controllers/hooks/use-team-containers';
|
|
5
5
|
export { useTeamWebLinks, useTeamWebLinksActions } from './controllers/hooks/use-team-web-links';
|
|
6
|
+
export { useCreateContainers } from './controllers/hooks/use-create-containers';
|
|
6
7
|
export { useTeamLinksAndContainers } from './controllers/hooks/use-team-links-and-containers';
|
|
7
8
|
export { useProductPermissions } from './controllers/hooks/use-product-permission';
|
|
8
9
|
export { hasProductPermission } from './controllers/product-permission/utils';
|