@atlaskit/smart-user-picker 9.2.0 → 9.2.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 +7 -0
- package/dist/cjs/service/teams-client.js +4 -2
- package/dist/cjs/service/users-transformer.js +2 -1
- package/dist/es2019/service/teams-client.js +4 -1
- package/dist/es2019/service/users-transformer.js +2 -1
- package/dist/esm/service/teams-client.js +4 -2
- package/dist/esm/service/users-transformer.js +2 -1
- package/dist/types/service/teams-client.d.ts +2 -0
- package/dist/types-ts4.5/service/teams-client.d.ts +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlassian/smart-user-picker
|
|
2
2
|
|
|
3
|
+
## 9.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7eb1025a50079`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7eb1025a50079) -
|
|
8
|
+
Added Archive Lozenge when a team state is DISBANDED
|
|
9
|
+
|
|
3
10
|
## 9.2.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -11,12 +11,14 @@ var _constants = require("./constants");
|
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
13
13
|
var transformTeam = function transformTeam(team, id) {
|
|
14
|
-
return {
|
|
14
|
+
return _objectSpread({
|
|
15
15
|
id: id,
|
|
16
16
|
name: team.displayName,
|
|
17
17
|
type: 'team',
|
|
18
18
|
avatarUrl: team.smallAvatarImageUrl
|
|
19
|
-
}
|
|
19
|
+
}, team.state && {
|
|
20
|
+
state: team.state
|
|
21
|
+
});
|
|
20
22
|
};
|
|
21
23
|
var hydrateTeamFromLegion = function hydrateTeamFromLegion(request) {
|
|
22
24
|
var url = _config.config.getTeamsUrl(request.id, request.baseUrl, request.siteId);
|
|
@@ -60,7 +60,8 @@ var transformUser = function transformUser(item, intl) {
|
|
|
60
60
|
avatarUrl: team.largeAvatarImageUrl || team.smallAvatarImageUrl,
|
|
61
61
|
tooltip: team.displayName,
|
|
62
62
|
verified: team.verified,
|
|
63
|
-
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name
|
|
63
|
+
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name,
|
|
64
|
+
state: team.state
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
if (type === _types.EntityType.GROUP) {
|
|
@@ -5,7 +5,10 @@ const transformTeam = (team, id) => {
|
|
|
5
5
|
id,
|
|
6
6
|
name: team.displayName,
|
|
7
7
|
type: 'team',
|
|
8
|
-
avatarUrl: team.smallAvatarImageUrl
|
|
8
|
+
avatarUrl: team.smallAvatarImageUrl,
|
|
9
|
+
...(team.state && {
|
|
10
|
+
state: team.state
|
|
11
|
+
}) // State to determine if the team is active/disbanded
|
|
9
12
|
};
|
|
10
13
|
};
|
|
11
14
|
const hydrateTeamFromLegion = request => {
|
|
@@ -54,7 +54,8 @@ const transformUser = (item, intl) => {
|
|
|
54
54
|
avatarUrl: team.largeAvatarImageUrl || team.smallAvatarImageUrl,
|
|
55
55
|
tooltip: team.displayName,
|
|
56
56
|
verified: team.verified,
|
|
57
|
-
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name
|
|
57
|
+
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name,
|
|
58
|
+
state: team.state
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
if (type === EntityType.GROUP) {
|
|
@@ -4,12 +4,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { config } from '../config';
|
|
5
5
|
import { UNKNOWN_TEAM } from './constants';
|
|
6
6
|
var transformTeam = function transformTeam(team, id) {
|
|
7
|
-
return {
|
|
7
|
+
return _objectSpread({
|
|
8
8
|
id: id,
|
|
9
9
|
name: team.displayName,
|
|
10
10
|
type: 'team',
|
|
11
11
|
avatarUrl: team.smallAvatarImageUrl
|
|
12
|
-
}
|
|
12
|
+
}, team.state && {
|
|
13
|
+
state: team.state
|
|
14
|
+
});
|
|
13
15
|
};
|
|
14
16
|
var hydrateTeamFromLegion = function hydrateTeamFromLegion(request) {
|
|
15
17
|
var url = config.getTeamsUrl(request.id, request.baseUrl, request.siteId);
|
|
@@ -54,7 +54,8 @@ var transformUser = function transformUser(item, intl) {
|
|
|
54
54
|
avatarUrl: team.largeAvatarImageUrl || team.smallAvatarImageUrl,
|
|
55
55
|
tooltip: team.displayName,
|
|
56
56
|
verified: team.verified,
|
|
57
|
-
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name
|
|
57
|
+
teamTypeName: (_team$type = team.type) === null || _team$type === void 0 ? void 0 : _team$type.name,
|
|
58
|
+
state: team.state
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
if (type === EntityType.GROUP) {
|
|
@@ -4,10 +4,12 @@ type LegionRequest = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
siteId?: string;
|
|
6
6
|
};
|
|
7
|
+
export type LegionTeamState = 'ACTIVE' | 'DISBANDED' | 'PURGED';
|
|
7
8
|
export type LegionResponse = {
|
|
8
9
|
id: string;
|
|
9
10
|
displayName: string;
|
|
10
11
|
smallAvatarImageUrl: string;
|
|
12
|
+
state?: LegionTeamState;
|
|
11
13
|
};
|
|
12
14
|
declare const hydrateTeamFromLegion: (request: LegionRequest) => Promise<Team>;
|
|
13
15
|
export default hydrateTeamFromLegion;
|
|
@@ -4,10 +4,12 @@ type LegionRequest = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
siteId?: string;
|
|
6
6
|
};
|
|
7
|
+
export type LegionTeamState = 'ACTIVE' | 'DISBANDED' | 'PURGED';
|
|
7
8
|
export type LegionResponse = {
|
|
8
9
|
id: string;
|
|
9
10
|
displayName: string;
|
|
10
11
|
smallAvatarImageUrl: string;
|
|
12
|
+
state?: LegionTeamState;
|
|
11
13
|
};
|
|
12
14
|
declare const hydrateTeamFromLegion: (request: LegionRequest) => Promise<Team>;
|
|
13
15
|
export default hydrateTeamFromLegion;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-user-picker",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.7.0",
|
|
38
|
-
"@atlaskit/analytics-next": "^11.
|
|
38
|
+
"@atlaskit/analytics-next": "^11.2.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/ufo": "^0.4.0",
|
|
41
|
-
"@atlaskit/user-picker": "^11.
|
|
41
|
+
"@atlaskit/user-picker": "^11.25.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
44
|
"memoize-one": "^6.0.0",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"react-dom": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/select": "^21.
|
|
53
|
+
"@atlaskit/select": "^21.8.0",
|
|
54
54
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
55
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
55
|
+
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
56
56
|
"@testing-library/dom": "^10.1.0",
|
|
57
57
|
"@testing-library/react": "^16.3.0",
|
|
58
58
|
"@testing-library/user-event": "^14.4.3",
|