@atlaskit/user-picker 11.20.4 → 11.21.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 +13 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/TeamOption/main.js +17 -10
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/i18n.js +6 -6
- package/dist/cjs/components/styles.js +2 -3
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/TeamOption/main.js +18 -11
- package/dist/es2019/components/UserPicker.js +1 -1
- package/dist/es2019/components/i18n.js +6 -6
- package/dist/es2019/components/styles.js +2 -3
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/TeamOption/main.js +17 -10
- package/dist/esm/components/UserPicker.js +1 -1
- package/dist/esm/components/i18n.js +6 -6
- package/dist/esm/components/styles.js +2 -3
- package/dist/types/types.d.ts +2 -0
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 11.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.21.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`9889f45fc6eca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9889f45fc6eca) -
|
|
14
|
+
fix optionData.data type for user type
|
|
15
|
+
|
|
3
16
|
## 11.20.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -13,7 +13,7 @@ var _utils = require("./components/utils");
|
|
|
13
13
|
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; }
|
|
14
14
|
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/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
15
|
var packageName = "@atlaskit/user-picker";
|
|
16
|
-
var packageVersion = "
|
|
16
|
+
var packageVersion = "0.0.0-development";
|
|
17
17
|
var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
18
18
|
var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
19
19
|
var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -61,8 +61,11 @@ var TeamOption = exports.TeamOption = /*#__PURE__*/function (_React$PureComponen
|
|
|
61
61
|
memberCount = _this$props2$team.memberCount,
|
|
62
62
|
includesYou = _this$props2$team.includesYou,
|
|
63
63
|
verified = _this$props2$team.verified,
|
|
64
|
+
teamTypeName = _this$props2$team.teamTypeName,
|
|
64
65
|
includeTeamsUpdates = _this$props2.includeTeamsUpdates;
|
|
65
66
|
var isVerified = includeTeamsUpdates && verified;
|
|
67
|
+
var hasTeamTypeName = Boolean(teamTypeName);
|
|
68
|
+
var verifiedIcon = isVerified ? _this.renderVerifiedIcon() : null;
|
|
66
69
|
|
|
67
70
|
// if Member count is missing, do not show the byline, regardless of the availability of includesYou
|
|
68
71
|
if (memberCount === null || typeof memberCount === 'undefined') {
|
|
@@ -70,16 +73,18 @@ var TeamOption = exports.TeamOption = /*#__PURE__*/function (_React$PureComponen
|
|
|
70
73
|
} else {
|
|
71
74
|
if (includesYou === true) {
|
|
72
75
|
if (memberCount > 50) {
|
|
73
|
-
return _this.getBylineComponent(isSelected,
|
|
76
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.officialPlus50MembersWithYou, {
|
|
74
77
|
values: {
|
|
75
|
-
verifiedIcon:
|
|
78
|
+
verifiedIcon: verifiedIcon,
|
|
79
|
+
teamTypeName: teamTypeName
|
|
76
80
|
}
|
|
77
81
|
})) : (0, _react.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.plus50MembersWithYou));
|
|
78
82
|
} else {
|
|
79
|
-
return _this.getBylineComponent(isSelected,
|
|
83
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.officialMemberCountWithYou, {
|
|
80
84
|
values: {
|
|
81
|
-
verifiedIcon:
|
|
82
|
-
count: memberCount
|
|
85
|
+
verifiedIcon: verifiedIcon,
|
|
86
|
+
count: memberCount,
|
|
87
|
+
teamTypeName: teamTypeName
|
|
83
88
|
}
|
|
84
89
|
})) : (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.memberCountWithYou, {
|
|
85
90
|
values: {
|
|
@@ -89,16 +94,18 @@ var TeamOption = exports.TeamOption = /*#__PURE__*/function (_React$PureComponen
|
|
|
89
94
|
}
|
|
90
95
|
} else {
|
|
91
96
|
if (memberCount > 50) {
|
|
92
|
-
return _this.getBylineComponent(isSelected,
|
|
97
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.officialPlus50MembersWithoutYou, {
|
|
93
98
|
values: {
|
|
94
|
-
verifiedIcon:
|
|
99
|
+
verifiedIcon: verifiedIcon,
|
|
100
|
+
teamTypeName: teamTypeName
|
|
95
101
|
}
|
|
96
102
|
})) : (0, _react.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.plus50MembersWithoutYou));
|
|
97
103
|
} else {
|
|
98
|
-
return _this.getBylineComponent(isSelected,
|
|
104
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.officialMemberCountWithoutYou, {
|
|
99
105
|
values: {
|
|
100
|
-
verifiedIcon:
|
|
101
|
-
count: memberCount
|
|
106
|
+
verifiedIcon: verifiedIcon,
|
|
107
|
+
count: memberCount,
|
|
108
|
+
teamTypeName: teamTypeName
|
|
102
109
|
}
|
|
103
110
|
})) : (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.memberCountWithoutYou, {
|
|
104
111
|
values: {
|
|
@@ -108,7 +108,7 @@ var UserPickerWithoutAnalytics = exports.UserPickerWithoutAnalytics = /*#__PURE_
|
|
|
108
108
|
SelectComponent: SelectComponent
|
|
109
109
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
110
110
|
,
|
|
111
|
-
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh'), false,
|
|
111
|
+
styles: (0, _styles.getStyles)(width, isMulti, this.props.appearance === 'compact', this.props.styles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh'), false, this.props.height),
|
|
112
112
|
components: (0, _components.getComponents)(isMulti, anchor, showClearIndicator, (_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.components ? this.props.components : {}),
|
|
113
113
|
pickerProps: pickerProps
|
|
114
114
|
})))));
|
|
@@ -38,17 +38,17 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
38
38
|
},
|
|
39
39
|
officialTeamByline: {
|
|
40
40
|
id: 'fabric.elements.user-picker.team.byline.official',
|
|
41
|
-
defaultMessage: '
|
|
42
|
-
description: 'Byline for official team'
|
|
41
|
+
defaultMessage: '{teamTypeName} {verifiedIcon}',
|
|
42
|
+
description: 'Byline for official/verified team with dynamic team type name'
|
|
43
43
|
},
|
|
44
44
|
officialMemberCountWithoutYou: {
|
|
45
45
|
id: 'fabric.elements.user-picker.team.member.count.official',
|
|
46
|
-
defaultMessage: '
|
|
46
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}',
|
|
47
47
|
description: 'Byline to show the number of members in the team when the current user is not a member of the team'
|
|
48
48
|
},
|
|
49
49
|
officialMemberCountWithYou: {
|
|
50
50
|
id: 'fabric.elements.user-picker.team.member.count.official.including.you',
|
|
51
|
-
defaultMessage: '
|
|
51
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}, including you',
|
|
52
52
|
description: 'Byline to show the number of members in the team when the current user is also a member of the team'
|
|
53
53
|
},
|
|
54
54
|
memberCountWithoutYou: {
|
|
@@ -63,12 +63,12 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
63
63
|
},
|
|
64
64
|
officialPlus50MembersWithoutYou: {
|
|
65
65
|
id: 'fabric.elements.user-picker.team.member.50plus.official',
|
|
66
|
-
defaultMessage: '
|
|
66
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members',
|
|
67
67
|
description: 'Byline to show the number of members in the team when the number exceeds 50'
|
|
68
68
|
},
|
|
69
69
|
officialPlus50MembersWithYou: {
|
|
70
70
|
id: 'fabric.elements.user-picker.team.member.50plus.official.including.you',
|
|
71
|
-
defaultMessage: '
|
|
71
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members, including you',
|
|
72
72
|
description: 'Byline to show the number of members in the team when the number exceeds 50 and also includes the current user'
|
|
73
73
|
},
|
|
74
74
|
plus50MembersWithoutYou: {
|
|
@@ -10,7 +10,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
12
12
|
var _select = require("@atlaskit/select");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _excluded = ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
|
|
15
14
|
_excluded2 = ["paddingTop", "paddingBottom", "position"];
|
|
16
15
|
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; }
|
|
@@ -46,9 +45,9 @@ var getStyles = exports.getStyles = (0, _memoizeOne.default)(function (width, is
|
|
|
46
45
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? "var(--ds-background-danger, ".concat(_colors.R50, ")") : state.isFocused ? css[':hover'] ? "var(--ds-background-input, ".concat(css[':hover'].backgroundColor, ")") : "var(--ds-background-input, ".concat(_colors.N0, ")") : state.isDisabled ? "var(--ds-background-disabled, ".concat(_colors.N10, ")") : "var(--ds-background-input-hovered, ".concat(_colors.N30, ")")
|
|
47
46
|
}),
|
|
48
47
|
padding: 0,
|
|
49
|
-
minHeight: height
|
|
48
|
+
minHeight: height || isCompact ? 'none' : 44,
|
|
50
49
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
51
|
-
height: height
|
|
50
|
+
height: height ? height : isCompact || isMulti ? '100%' : 44,
|
|
52
51
|
maxWidth: '100%'
|
|
53
52
|
});
|
|
54
53
|
},
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -4,7 +4,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { isCustom, isExternalUser } from './components/utils';
|
|
6
6
|
const packageName = "@atlaskit/user-picker";
|
|
7
|
-
const packageVersion = "
|
|
7
|
+
const packageVersion = "0.0.0-development";
|
|
8
8
|
const UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
9
9
|
const UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
10
10
|
const UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -45,11 +45,14 @@ export class TeamOption extends React.PureComponent {
|
|
|
45
45
|
team: {
|
|
46
46
|
memberCount,
|
|
47
47
|
includesYou,
|
|
48
|
-
verified
|
|
48
|
+
verified,
|
|
49
|
+
teamTypeName
|
|
49
50
|
},
|
|
50
51
|
includeTeamsUpdates
|
|
51
52
|
} = this.props;
|
|
52
53
|
const isVerified = includeTeamsUpdates && verified;
|
|
54
|
+
const hasTeamTypeName = Boolean(teamTypeName);
|
|
55
|
+
const verifiedIcon = isVerified ? this.renderVerifiedIcon() : null;
|
|
53
56
|
|
|
54
57
|
// if Member count is missing, do not show the byline, regardless of the availability of includesYou
|
|
55
58
|
if (memberCount === null || typeof memberCount === 'undefined') {
|
|
@@ -57,16 +60,18 @@ export class TeamOption extends React.PureComponent {
|
|
|
57
60
|
} else {
|
|
58
61
|
if (includesYou === true) {
|
|
59
62
|
if (memberCount > 50) {
|
|
60
|
-
return this.getBylineComponent(isSelected,
|
|
63
|
+
return this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialPlus50MembersWithYou, {
|
|
61
64
|
values: {
|
|
62
|
-
verifiedIcon
|
|
65
|
+
verifiedIcon,
|
|
66
|
+
teamTypeName
|
|
63
67
|
}
|
|
64
68
|
})) : jsx(FormattedMessage, messages.plus50MembersWithYou));
|
|
65
69
|
} else {
|
|
66
|
-
return this.getBylineComponent(isSelected,
|
|
70
|
+
return this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialMemberCountWithYou, {
|
|
67
71
|
values: {
|
|
68
|
-
verifiedIcon
|
|
69
|
-
count: memberCount
|
|
72
|
+
verifiedIcon,
|
|
73
|
+
count: memberCount,
|
|
74
|
+
teamTypeName
|
|
70
75
|
}
|
|
71
76
|
})) : jsx(FormattedMessage, _extends({}, messages.memberCountWithYou, {
|
|
72
77
|
values: {
|
|
@@ -76,16 +81,18 @@ export class TeamOption extends React.PureComponent {
|
|
|
76
81
|
}
|
|
77
82
|
} else {
|
|
78
83
|
if (memberCount > 50) {
|
|
79
|
-
return this.getBylineComponent(isSelected,
|
|
84
|
+
return this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialPlus50MembersWithoutYou, {
|
|
80
85
|
values: {
|
|
81
|
-
verifiedIcon
|
|
86
|
+
verifiedIcon,
|
|
87
|
+
teamTypeName
|
|
82
88
|
}
|
|
83
89
|
})) : jsx(FormattedMessage, messages.plus50MembersWithoutYou));
|
|
84
90
|
} else {
|
|
85
|
-
return this.getBylineComponent(isSelected,
|
|
91
|
+
return this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialMemberCountWithoutYou, {
|
|
86
92
|
values: {
|
|
87
|
-
verifiedIcon
|
|
88
|
-
count: memberCount
|
|
93
|
+
verifiedIcon,
|
|
94
|
+
count: memberCount,
|
|
95
|
+
teamTypeName
|
|
89
96
|
}
|
|
90
97
|
})) : jsx(FormattedMessage, _extends({}, messages.memberCountWithoutYou, {
|
|
91
98
|
values: {
|
|
@@ -85,7 +85,7 @@ export class UserPickerWithoutAnalytics extends React.Component {
|
|
|
85
85
|
SelectComponent: SelectComponent
|
|
86
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
87
87
|
,
|
|
88
|
-
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, fg('platform-component-visual-refresh'), false,
|
|
88
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, fg('platform-component-visual-refresh'), false, this.props.height),
|
|
89
89
|
components: getComponents(isMulti, anchor, showClearIndicator, (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.components ? this.props.components : {}),
|
|
90
90
|
pickerProps: pickerProps
|
|
91
91
|
})))));
|
|
@@ -32,17 +32,17 @@ export const messages = defineMessages({
|
|
|
32
32
|
},
|
|
33
33
|
officialTeamByline: {
|
|
34
34
|
id: 'fabric.elements.user-picker.team.byline.official',
|
|
35
|
-
defaultMessage: '
|
|
36
|
-
description: 'Byline for official team'
|
|
35
|
+
defaultMessage: '{teamTypeName} {verifiedIcon}',
|
|
36
|
+
description: 'Byline for official/verified team with dynamic team type name'
|
|
37
37
|
},
|
|
38
38
|
officialMemberCountWithoutYou: {
|
|
39
39
|
id: 'fabric.elements.user-picker.team.member.count.official',
|
|
40
|
-
defaultMessage: '
|
|
40
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}',
|
|
41
41
|
description: 'Byline to show the number of members in the team when the current user is not a member of the team'
|
|
42
42
|
},
|
|
43
43
|
officialMemberCountWithYou: {
|
|
44
44
|
id: 'fabric.elements.user-picker.team.member.count.official.including.you',
|
|
45
|
-
defaultMessage: '
|
|
45
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}, including you',
|
|
46
46
|
description: 'Byline to show the number of members in the team when the current user is also a member of the team'
|
|
47
47
|
},
|
|
48
48
|
memberCountWithoutYou: {
|
|
@@ -57,12 +57,12 @@ export const messages = defineMessages({
|
|
|
57
57
|
},
|
|
58
58
|
officialPlus50MembersWithoutYou: {
|
|
59
59
|
id: 'fabric.elements.user-picker.team.member.50plus.official',
|
|
60
|
-
defaultMessage: '
|
|
60
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members',
|
|
61
61
|
description: 'Byline to show the number of members in the team when the number exceeds 50'
|
|
62
62
|
},
|
|
63
63
|
officialPlus50MembersWithYou: {
|
|
64
64
|
id: 'fabric.elements.user-picker.team.member.50plus.official.including.you',
|
|
65
|
-
defaultMessage: '
|
|
65
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members, including you',
|
|
66
66
|
description: 'Byline to show the number of members in the team when the number exceeds 50 and also includes the current user'
|
|
67
67
|
},
|
|
68
68
|
plus50MembersWithoutYou: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
|
|
2
2
|
import memoizeOne from 'memoize-one';
|
|
3
3
|
import { mergeStyles } from '@atlaskit/select';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
export const BORDER_PADDING = "var(--ds-space-075, 6px)";
|
|
6
5
|
export const AVATAR_PADDING = 6;
|
|
7
6
|
export const INDICATOR_WIDTH = 39;
|
|
@@ -33,9 +32,9 @@ export const getStyles = memoizeOne((width, isMulti, isCompact, overrideStyles,
|
|
|
33
32
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? `var(--ds-background-danger, ${R50})` : state.isFocused ? css[':hover'] ? `var(--ds-background-input, ${css[':hover'].backgroundColor})` : `var(--ds-background-input, ${N0})` : state.isDisabled ? `var(--ds-background-disabled, ${N10})` : `var(--ds-background-input-hovered, ${N30})`
|
|
34
33
|
},
|
|
35
34
|
padding: 0,
|
|
36
|
-
minHeight: height
|
|
35
|
+
minHeight: height || isCompact ? 'none' : 44,
|
|
37
36
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
38
|
-
height: height
|
|
37
|
+
height: height ? height : isCompact || isMulti ? '100%' : 44,
|
|
39
38
|
maxWidth: '100%'
|
|
40
39
|
};
|
|
41
40
|
},
|
package/dist/esm/analytics.js
CHANGED
|
@@ -7,7 +7,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
8
|
import { isCustom, isExternalUser } from './components/utils';
|
|
9
9
|
var packageName = "@atlaskit/user-picker";
|
|
10
|
-
var packageVersion = "
|
|
10
|
+
var packageVersion = "0.0.0-development";
|
|
11
11
|
var UUID_REGEXP_TEAMS_GROUPS = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
12
12
|
var UUID_REGEXP_OLD_AAID = /^[a-fA-F0-9]{1,8}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
13
13
|
var UUID_REGEXP_NEW_AAID = /^[a-fA-F0-9]{24,24}$/;
|
|
@@ -56,8 +56,11 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
56
56
|
memberCount = _this$props2$team.memberCount,
|
|
57
57
|
includesYou = _this$props2$team.includesYou,
|
|
58
58
|
verified = _this$props2$team.verified,
|
|
59
|
+
teamTypeName = _this$props2$team.teamTypeName,
|
|
59
60
|
includeTeamsUpdates = _this$props2.includeTeamsUpdates;
|
|
60
61
|
var isVerified = includeTeamsUpdates && verified;
|
|
62
|
+
var hasTeamTypeName = Boolean(teamTypeName);
|
|
63
|
+
var verifiedIcon = isVerified ? _this.renderVerifiedIcon() : null;
|
|
61
64
|
|
|
62
65
|
// if Member count is missing, do not show the byline, regardless of the availability of includesYou
|
|
63
66
|
if (memberCount === null || typeof memberCount === 'undefined') {
|
|
@@ -65,16 +68,18 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
65
68
|
} else {
|
|
66
69
|
if (includesYou === true) {
|
|
67
70
|
if (memberCount > 50) {
|
|
68
|
-
return _this.getBylineComponent(isSelected,
|
|
71
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialPlus50MembersWithYou, {
|
|
69
72
|
values: {
|
|
70
|
-
verifiedIcon:
|
|
73
|
+
verifiedIcon: verifiedIcon,
|
|
74
|
+
teamTypeName: teamTypeName
|
|
71
75
|
}
|
|
72
76
|
})) : jsx(FormattedMessage, messages.plus50MembersWithYou));
|
|
73
77
|
} else {
|
|
74
|
-
return _this.getBylineComponent(isSelected,
|
|
78
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialMemberCountWithYou, {
|
|
75
79
|
values: {
|
|
76
|
-
verifiedIcon:
|
|
77
|
-
count: memberCount
|
|
80
|
+
verifiedIcon: verifiedIcon,
|
|
81
|
+
count: memberCount,
|
|
82
|
+
teamTypeName: teamTypeName
|
|
78
83
|
}
|
|
79
84
|
})) : jsx(FormattedMessage, _extends({}, messages.memberCountWithYou, {
|
|
80
85
|
values: {
|
|
@@ -84,16 +89,18 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
84
89
|
}
|
|
85
90
|
} else {
|
|
86
91
|
if (memberCount > 50) {
|
|
87
|
-
return _this.getBylineComponent(isSelected,
|
|
92
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialPlus50MembersWithoutYou, {
|
|
88
93
|
values: {
|
|
89
|
-
verifiedIcon:
|
|
94
|
+
verifiedIcon: verifiedIcon,
|
|
95
|
+
teamTypeName: teamTypeName
|
|
90
96
|
}
|
|
91
97
|
})) : jsx(FormattedMessage, messages.plus50MembersWithoutYou));
|
|
92
98
|
} else {
|
|
93
|
-
return _this.getBylineComponent(isSelected,
|
|
99
|
+
return _this.getBylineComponent(isSelected, hasTeamTypeName ? jsx(FormattedMessage, _extends({}, messages.officialMemberCountWithoutYou, {
|
|
94
100
|
values: {
|
|
95
|
-
verifiedIcon:
|
|
96
|
-
count: memberCount
|
|
101
|
+
verifiedIcon: verifiedIcon,
|
|
102
|
+
count: memberCount,
|
|
103
|
+
teamTypeName: teamTypeName
|
|
97
104
|
}
|
|
98
105
|
})) : jsx(FormattedMessage, _extends({}, messages.memberCountWithoutYou, {
|
|
99
106
|
values: {
|
|
@@ -100,7 +100,7 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
100
100
|
SelectComponent: SelectComponent
|
|
101
101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
102
102
|
,
|
|
103
|
-
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, fg('platform-component-visual-refresh'), false,
|
|
103
|
+
styles: getStyles(width, isMulti, this.props.appearance === 'compact', this.props.styles, fg('platform-component-visual-refresh'), false, this.props.height),
|
|
104
104
|
components: getComponents(isMulti, anchor, showClearIndicator, (_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.components ? this.props.components : {}),
|
|
105
105
|
pickerProps: pickerProps
|
|
106
106
|
})))));
|
|
@@ -32,17 +32,17 @@ export var messages = defineMessages({
|
|
|
32
32
|
},
|
|
33
33
|
officialTeamByline: {
|
|
34
34
|
id: 'fabric.elements.user-picker.team.byline.official',
|
|
35
|
-
defaultMessage: '
|
|
36
|
-
description: 'Byline for official team'
|
|
35
|
+
defaultMessage: '{teamTypeName} {verifiedIcon}',
|
|
36
|
+
description: 'Byline for official/verified team with dynamic team type name'
|
|
37
37
|
},
|
|
38
38
|
officialMemberCountWithoutYou: {
|
|
39
39
|
id: 'fabric.elements.user-picker.team.member.count.official',
|
|
40
|
-
defaultMessage: '
|
|
40
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}',
|
|
41
41
|
description: 'Byline to show the number of members in the team when the current user is not a member of the team'
|
|
42
42
|
},
|
|
43
43
|
officialMemberCountWithYou: {
|
|
44
44
|
id: 'fabric.elements.user-picker.team.member.count.official.including.you',
|
|
45
|
-
defaultMessage: '
|
|
45
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • {count} {count, plural, one {member} other {members}}, including you',
|
|
46
46
|
description: 'Byline to show the number of members in the team when the current user is also a member of the team'
|
|
47
47
|
},
|
|
48
48
|
memberCountWithoutYou: {
|
|
@@ -57,12 +57,12 @@ export var messages = defineMessages({
|
|
|
57
57
|
},
|
|
58
58
|
officialPlus50MembersWithoutYou: {
|
|
59
59
|
id: 'fabric.elements.user-picker.team.member.50plus.official',
|
|
60
|
-
defaultMessage: '
|
|
60
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members',
|
|
61
61
|
description: 'Byline to show the number of members in the team when the number exceeds 50'
|
|
62
62
|
},
|
|
63
63
|
officialPlus50MembersWithYou: {
|
|
64
64
|
id: 'fabric.elements.user-picker.team.member.50plus.official.including.you',
|
|
65
|
-
defaultMessage: '
|
|
65
|
+
defaultMessage: '{teamTypeName} {verifiedIcon} • 50+ members, including you',
|
|
66
66
|
description: 'Byline to show the number of members in the team when the number exceeds 50 and also includes the current user'
|
|
67
67
|
},
|
|
68
68
|
plus50MembersWithoutYou: {
|
|
@@ -7,7 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { B100, N0, N10, N20, N30, N100, R50, R400, N90 } from '@atlaskit/theme/colors';
|
|
8
8
|
import memoizeOne from 'memoize-one';
|
|
9
9
|
import { mergeStyles } from '@atlaskit/select';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
export var BORDER_PADDING = "var(--ds-space-075, 6px)";
|
|
12
11
|
export var AVATAR_PADDING = 6;
|
|
13
12
|
export var INDICATOR_WIDTH = 39;
|
|
@@ -39,9 +38,9 @@ export var getStyles = memoizeOne(function (width, isMulti, isCompact, overrideS
|
|
|
39
38
|
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? "var(--ds-background-danger, ".concat(R50, ")") : state.isFocused ? css[':hover'] ? "var(--ds-background-input, ".concat(css[':hover'].backgroundColor, ")") : "var(--ds-background-input, ".concat(N0, ")") : state.isDisabled ? "var(--ds-background-disabled, ".concat(N10, ")") : "var(--ds-background-input-hovered, ".concat(N30, ")")
|
|
40
39
|
}),
|
|
41
40
|
padding: 0,
|
|
42
|
-
minHeight: height
|
|
41
|
+
minHeight: height || isCompact ? 'none' : 44,
|
|
43
42
|
/* IE 11 needs to set height explicitly to be vertical align when being in not compact mode */
|
|
44
|
-
height: height
|
|
43
|
+
height: height ? height : isCompact || isMulti ? '100%' : 44,
|
|
45
44
|
maxWidth: '100%'
|
|
46
45
|
});
|
|
47
46
|
},
|
package/dist/types/types.d.ts
CHANGED
|
@@ -270,6 +270,7 @@ export interface CustomHighlight {
|
|
|
270
270
|
export interface OptionData {
|
|
271
271
|
appType?: string | null;
|
|
272
272
|
avatarUrl?: any;
|
|
273
|
+
data?: any;
|
|
273
274
|
fixed?: boolean;
|
|
274
275
|
icon?: ReactNode;
|
|
275
276
|
iconColor?: string;
|
|
@@ -327,6 +328,7 @@ export interface Team extends OptionData {
|
|
|
327
328
|
includeTeamsUpdates?: boolean;
|
|
328
329
|
memberCount?: number;
|
|
329
330
|
members?: TeamMember[];
|
|
331
|
+
teamTypeName?: string;
|
|
330
332
|
type: 'team';
|
|
331
333
|
verified?: boolean;
|
|
332
334
|
}
|
|
@@ -273,6 +273,7 @@ export interface CustomHighlight {
|
|
|
273
273
|
export interface OptionData {
|
|
274
274
|
appType?: string | null;
|
|
275
275
|
avatarUrl?: any;
|
|
276
|
+
data?: any;
|
|
276
277
|
fixed?: boolean;
|
|
277
278
|
icon?: ReactNode;
|
|
278
279
|
iconColor?: string;
|
|
@@ -330,6 +331,7 @@ export interface Team extends OptionData {
|
|
|
330
331
|
includeTeamsUpdates?: boolean;
|
|
331
332
|
memberCount?: number;
|
|
332
333
|
members?: TeamMember[];
|
|
334
|
+
teamTypeName?: string;
|
|
333
335
|
type: 'team';
|
|
334
336
|
verified?: boolean;
|
|
335
337
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.21.1",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"@atlaskit/people-teams-ui-public": "^3.7.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/popper": "^7.1.0",
|
|
55
|
-
"@atlaskit/primitives": "^
|
|
55
|
+
"@atlaskit/primitives": "^18.0.0",
|
|
56
56
|
"@atlaskit/select": "^21.7.0",
|
|
57
57
|
"@atlaskit/spinner": "^19.0.0",
|
|
58
58
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tokens": "^
|
|
60
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.14.0",
|
|
62
62
|
"@atlaskit/ufo": "^0.4.0",
|
|
63
63
|
"@babel/runtime": "^7.0.0",
|
|
@@ -110,9 +110,6 @@
|
|
|
110
110
|
"platform_user_picker_firefox_tab_fix": {
|
|
111
111
|
"type": "boolean"
|
|
112
112
|
},
|
|
113
|
-
"jifjam_bulk_operations": {
|
|
114
|
-
"type": "boolean"
|
|
115
|
-
},
|
|
116
113
|
"twcg-444-invite-usd-improvements-m2-gate": {
|
|
117
114
|
"type": "boolean"
|
|
118
115
|
},
|