@atlaskit/smart-user-picker 9.2.0 → 9.2.2
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 +17 -0
- package/dist/cjs/components/MessagesIntlProvider.js +2 -1
- package/dist/cjs/service/teams-client.js +4 -2
- package/dist/cjs/service/users-transformer.js +2 -1
- package/dist/es2019/components/MessagesIntlProvider.js +2 -1
- package/dist/es2019/service/teams-client.js +4 -1
- package/dist/es2019/service/users-transformer.js +2 -1
- package/dist/esm/components/MessagesIntlProvider.js +2 -1
- package/dist/esm/service/teams-client.js +4 -2
- package/dist/esm/service/users-transformer.js +2 -1
- package/dist/types/components/MessagesIntlProvider.d.ts +3 -3
- package/dist/types/components/SmartUserPicker.d.ts +4 -2
- package/dist/types/service/teams-client.d.ts +2 -0
- package/dist/types-ts4.5/components/MessagesIntlProvider.d.ts +3 -3
- package/dist/types-ts4.5/components/SmartUserPicker.d.ts +4 -2
- package/dist/types-ts4.5/service/teams-client.d.ts +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlassian/smart-user-picker
|
|
2
2
|
|
|
3
|
+
## 9.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2c91b4048c838`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2c91b4048c838) -
|
|
8
|
+
Bump i18n packages
|
|
9
|
+
- [`ddd049a745d38`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ddd049a745d38) -
|
|
10
|
+
Internal change to how legacy colors are applied. No visual changes.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 9.2.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`7eb1025a50079`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7eb1025a50079) -
|
|
18
|
+
Added Archive Lozenge when a team state is DISBANDED
|
|
19
|
+
|
|
3
20
|
## 9.2.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -49,4 +49,5 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
|
49
49
|
messages: mergedMessages
|
|
50
50
|
}, children);
|
|
51
51
|
};
|
|
52
|
-
var
|
|
52
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(MessagesIntlProvider);
|
|
53
|
+
var _default = exports.default = _default_1;
|
|
@@ -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) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import { type IntlShape, type WithIntlProps } from 'react-intl-next';
|
|
3
3
|
export type MessagesIntlProviderProps = PropsWithChildren<{
|
|
4
4
|
intl: IntlShape;
|
|
5
5
|
}>;
|
|
6
|
-
declare const
|
|
6
|
+
declare const _default_1: React.FC<WithIntlProps<MessagesIntlProviderProps>> & {
|
|
7
7
|
WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
|
|
8
8
|
};
|
|
9
|
-
export default
|
|
9
|
+
export default _default_1;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type MemoizedFn } from 'memoize-one';
|
|
2
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
4
|
import { type UFOExperience } from '@atlaskit/ufo';
|
|
4
5
|
import { type OptionData } from '@atlaskit/user-picker';
|
|
5
6
|
import { type Props, type State, type FilterOptions } from '../types';
|
|
7
|
+
import type { DebouncedFunc } from 'lodash';
|
|
6
8
|
export declare class SmartUserPickerWithoutAnalytics extends React.Component<Props & WrappedComponentProps, State> {
|
|
7
9
|
state: State;
|
|
8
10
|
private lastEmailSearchFoundMatches;
|
|
@@ -30,8 +32,8 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
|
|
|
30
32
|
startOptionsShownUfoExperience: () => void;
|
|
31
33
|
private fireEvent;
|
|
32
34
|
filterOptions: (users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[];
|
|
33
|
-
memoizedFilterOptions:
|
|
34
|
-
getUsers:
|
|
35
|
+
memoizedFilterOptions: MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
|
|
36
|
+
getUsers: DebouncedFunc<() => Promise<void>>;
|
|
35
37
|
onInputChange: (newQuery?: string, sessionId?: string) => void;
|
|
36
38
|
filterUsers: () => OptionData[];
|
|
37
39
|
onFocus: (sessionId?: string) => void;
|
|
@@ -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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import { type IntlShape, type WithIntlProps } from 'react-intl-next';
|
|
3
3
|
export type MessagesIntlProviderProps = PropsWithChildren<{
|
|
4
4
|
intl: IntlShape;
|
|
5
5
|
}>;
|
|
6
|
-
declare const
|
|
6
|
+
declare const _default_1: React.FC<WithIntlProps<MessagesIntlProviderProps>> & {
|
|
7
7
|
WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
|
|
8
8
|
};
|
|
9
|
-
export default
|
|
9
|
+
export default _default_1;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type MemoizedFn } from 'memoize-one';
|
|
2
3
|
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
4
|
import { type UFOExperience } from '@atlaskit/ufo';
|
|
4
5
|
import { type OptionData } from '@atlaskit/user-picker';
|
|
5
6
|
import { type Props, type State, type FilterOptions } from '../types';
|
|
7
|
+
import type { DebouncedFunc } from 'lodash';
|
|
6
8
|
export declare class SmartUserPickerWithoutAnalytics extends React.Component<Props & WrappedComponentProps, State> {
|
|
7
9
|
state: State;
|
|
8
10
|
private lastEmailSearchFoundMatches;
|
|
@@ -30,8 +32,8 @@ export declare class SmartUserPickerWithoutAnalytics extends React.Component<Pro
|
|
|
30
32
|
startOptionsShownUfoExperience: () => void;
|
|
31
33
|
private fireEvent;
|
|
32
34
|
filterOptions: (users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[];
|
|
33
|
-
memoizedFilterOptions:
|
|
34
|
-
getUsers:
|
|
35
|
+
memoizedFilterOptions: MemoizedFn<(users: OptionData[], query: string, propFilterOptions?: FilterOptions) => OptionData[]>;
|
|
36
|
+
getUsers: DebouncedFunc<() => Promise<void>>;
|
|
35
37
|
onInputChange: (newQuery?: string, sessionId?: string) => void;
|
|
36
38
|
filterUsers: () => OptionData[];
|
|
37
39
|
onFocus: (sessionId?: string) => void;
|
|
@@ -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.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.
|
|
38
|
-
"@atlaskit/analytics-next": "^11.
|
|
37
|
+
"@atlaskit/afm-i18n-platform-smart-experiences-smart-user-picker": "2.88.0",
|
|
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,7 +50,7 @@
|
|
|
50
50
|
"react-dom": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/select": "^21.
|
|
53
|
+
"@atlaskit/select": "^21.10.0",
|
|
54
54
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
55
55
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
56
56
|
"@testing-library/dom": "^10.1.0",
|