@atlaskit/user-picker 10.12.3 → 10.12.4
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 +6 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/AddOptionAvatar.js +2 -4
- package/dist/cjs/components/AvatarItemOption.js +11 -11
- package/dist/cjs/components/BaseUserPicker.js +6 -3
- package/dist/cjs/components/CustomOption/main.js +8 -9
- package/dist/cjs/components/EmailOption/main.js +6 -7
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +7 -7
- package/dist/cjs/components/ExternalUserOption/InfoIcon.js +2 -4
- package/dist/cjs/components/ExternalUserOption/SourcesTooltipContent.js +12 -14
- package/dist/cjs/components/ExternalUserOption/main.js +10 -10
- package/dist/cjs/components/GroupOption/main.js +8 -8
- package/dist/cjs/components/Menu.js +2 -2
- package/dist/cjs/components/MultiValue.js +9 -9
- package/dist/cjs/components/PopupControl.js +4 -4
- package/dist/cjs/components/SingleValue.js +3 -4
- package/dist/cjs/components/SingleValueContainer.js +3 -3
- package/dist/cjs/components/TeamOption/main.js +13 -14
- package/dist/cjs/components/UserOption.js +11 -12
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/AddOptionAvatar.js +3 -4
- package/dist/es2019/components/AvatarItemOption.js +11 -12
- package/dist/es2019/components/BaseUserPicker.js +6 -3
- package/dist/es2019/components/CustomOption/main.js +5 -7
- package/dist/es2019/components/EmailOption/main.js +5 -7
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +7 -9
- package/dist/es2019/components/ExternalUserOption/InfoIcon.js +3 -4
- package/dist/es2019/components/ExternalUserOption/SourcesTooltipContent.js +13 -14
- package/dist/es2019/components/ExternalUserOption/main.js +10 -11
- package/dist/es2019/components/GroupOption/main.js +8 -9
- package/dist/es2019/components/Menu.js +2 -3
- package/dist/es2019/components/MultiValue.js +8 -9
- package/dist/es2019/components/PopupControl.js +4 -5
- package/dist/es2019/components/SingleValue.js +4 -5
- package/dist/es2019/components/SingleValueContainer.js +3 -4
- package/dist/es2019/components/TeamOption/main.js +10 -12
- package/dist/es2019/components/UserOption.js +8 -10
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/AddOptionAvatar.js +3 -4
- package/dist/esm/components/AvatarItemOption.js +11 -12
- package/dist/esm/components/BaseUserPicker.js +6 -3
- package/dist/esm/components/CustomOption/main.js +5 -7
- package/dist/esm/components/EmailOption/main.js +5 -7
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +7 -9
- package/dist/esm/components/ExternalUserOption/InfoIcon.js +3 -4
- package/dist/esm/components/ExternalUserOption/SourcesTooltipContent.js +13 -14
- package/dist/esm/components/ExternalUserOption/main.js +10 -11
- package/dist/esm/components/GroupOption/main.js +8 -9
- package/dist/esm/components/Menu.js +2 -3
- package/dist/esm/components/MultiValue.js +9 -10
- package/dist/esm/components/PopupControl.js +4 -5
- package/dist/esm/components/SingleValue.js +4 -5
- package/dist/esm/components/SingleValueContainer.js +3 -4
- package/dist/esm/components/TeamOption/main.js +10 -12
- package/dist/esm/components/UserOption.js +8 -10
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +0 -450
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { AtlassianIcon, ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
|
|
6
5
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
7
6
|
import { SlackIcon } from '../assets/slack';
|
|
@@ -21,37 +20,37 @@ export var sourceWrapper = css({
|
|
|
21
20
|
});
|
|
22
21
|
var SUPPORTED_SOURCES = [{
|
|
23
22
|
sourceType: 'jira',
|
|
24
|
-
icon:
|
|
23
|
+
icon: /*#__PURE__*/React.createElement(JiraIcon, {
|
|
25
24
|
size: 'xsmall'
|
|
26
25
|
}),
|
|
27
26
|
label: messages.jiraSource
|
|
28
27
|
}, {
|
|
29
28
|
sourceType: 'confluence',
|
|
30
|
-
icon:
|
|
29
|
+
icon: /*#__PURE__*/React.createElement(ConfluenceIcon, {
|
|
31
30
|
size: 'xsmall'
|
|
32
31
|
}),
|
|
33
32
|
label: messages.confluenceSource
|
|
34
33
|
}, {
|
|
35
34
|
sourceType: 'other-atlassian',
|
|
36
|
-
icon:
|
|
35
|
+
icon: /*#__PURE__*/React.createElement(AtlassianIcon, {
|
|
37
36
|
size: 'xsmall'
|
|
38
37
|
}),
|
|
39
38
|
label: messages.otherAtlassianSource
|
|
40
39
|
}, {
|
|
41
40
|
sourceType: 'slack',
|
|
42
|
-
icon:
|
|
41
|
+
icon: /*#__PURE__*/React.createElement(SlackIcon, null),
|
|
43
42
|
label: messages.slackProvider
|
|
44
43
|
}, {
|
|
45
44
|
sourceType: 'google',
|
|
46
|
-
icon:
|
|
45
|
+
icon: /*#__PURE__*/React.createElement(GoogleIcon, null),
|
|
47
46
|
label: messages.googleProvider
|
|
48
47
|
}, {
|
|
49
48
|
sourceType: 'microsoft',
|
|
50
|
-
icon:
|
|
49
|
+
icon: /*#__PURE__*/React.createElement(MicrosoftIcon, null),
|
|
51
50
|
label: messages.microsoftProvider
|
|
52
51
|
}, {
|
|
53
52
|
sourceType: 'github',
|
|
54
|
-
icon:
|
|
53
|
+
icon: /*#__PURE__*/React.createElement(GitHubIcon, null),
|
|
55
54
|
label: messages.gitHubProvider
|
|
56
55
|
}];
|
|
57
56
|
export var SourcesTooltipContent = function SourcesTooltipContent(_ref) {
|
|
@@ -62,20 +61,20 @@ export var SourcesTooltipContent = function SourcesTooltipContent(_ref) {
|
|
|
62
61
|
return sources.includes(supportedSource.sourceType);
|
|
63
62
|
});
|
|
64
63
|
}, [sources]);
|
|
65
|
-
return
|
|
64
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !sourcesLoading && sources.length === 0 ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, messages.externalUserSourcesError)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, messages.externalUserSourcesHeading)), /*#__PURE__*/React.createElement("div", {
|
|
66
65
|
css: sourcesTooltipContainer
|
|
67
|
-
}, sourcesLoading &&
|
|
66
|
+
}, sourcesLoading && /*#__PURE__*/React.createElement(Spinner, {
|
|
68
67
|
size: "small",
|
|
69
68
|
appearance: "invert"
|
|
70
69
|
}), !sourcesLoading && sourcesToRender.map(function (_ref2) {
|
|
71
70
|
var sourceType = _ref2.sourceType,
|
|
72
71
|
icon = _ref2.icon,
|
|
73
72
|
label = _ref2.label;
|
|
74
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
75
74
|
css: sourceWrapper,
|
|
76
75
|
key: sourceType
|
|
77
|
-
},
|
|
76
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
78
77
|
css: imageContainer
|
|
79
|
-
}, icon),
|
|
78
|
+
}, icon), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, label)));
|
|
80
79
|
}))));
|
|
81
80
|
};
|
|
@@ -8,9 +8,8 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
/** @jsx jsx */
|
|
12
11
|
import React from 'react';
|
|
13
|
-
import { css
|
|
12
|
+
import { css } from '@emotion/react';
|
|
14
13
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
15
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -44,7 +43,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
44
43
|
_this = _super.call.apply(_super, [this].concat(_args));
|
|
45
44
|
_defineProperty(_assertThisInitialized(_this), "getPrimaryText", function () {
|
|
46
45
|
var name = _this.props.user.name;
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
48
47
|
key: "name",
|
|
49
48
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
|
|
50
49
|
}, name);
|
|
@@ -59,9 +58,9 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
59
58
|
emailUser = _email$split2[0],
|
|
60
59
|
emailDomain = _email$split2[1];
|
|
61
60
|
var emailDomainWithAt = "@".concat(emailDomain);
|
|
62
|
-
return
|
|
61
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
63
62
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
|
|
64
|
-
}, emailUser,
|
|
63
|
+
}, emailUser, /*#__PURE__*/React.createElement("span", {
|
|
65
64
|
css: emailDomainWrapper
|
|
66
65
|
}, emailDomainWithAt));
|
|
67
66
|
});
|
|
@@ -71,7 +70,7 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
71
70
|
avatarUrl = _this$props$user.avatarUrl,
|
|
72
71
|
name = _this$props$user.name,
|
|
73
72
|
status = _this$props.status;
|
|
74
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
75
74
|
appearance: "big",
|
|
76
75
|
src: avatarUrl,
|
|
77
76
|
presence: status,
|
|
@@ -92,18 +91,18 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
91
|
_this.fireEvent(userInfoEvent, user.sources, user.id);
|
|
93
92
|
});
|
|
94
93
|
_defineProperty(_assertThisInitialized(_this), "getSourcesInfoTooltip", function () {
|
|
95
|
-
return _this.props.user.isExternal ?
|
|
94
|
+
return _this.props.user.isExternal ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
96
95
|
content: _this.formattedTooltipContent(),
|
|
97
96
|
position: 'right-start',
|
|
98
97
|
onShow: _this.onShow
|
|
99
|
-
},
|
|
98
|
+
}, /*#__PURE__*/React.createElement(InfoIcon, null)) : undefined;
|
|
100
99
|
});
|
|
101
100
|
return _this;
|
|
102
101
|
}
|
|
103
102
|
_createClass(ExternalUserOptionImpl, [{
|
|
104
103
|
key: "render",
|
|
105
104
|
value: function render() {
|
|
106
|
-
return
|
|
105
|
+
return /*#__PURE__*/React.createElement(ExternalAvatarItemOption, {
|
|
107
106
|
avatar: this.renderAvatar(),
|
|
108
107
|
isDisabled: this.props.user.isDisabled,
|
|
109
108
|
primaryText: this.getPrimaryText(),
|
|
@@ -118,12 +117,12 @@ var ExternalUserOptionImpl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
118
117
|
id = _this$props$user2.id,
|
|
119
118
|
requiresSourceHydration = _this$props$user2.requiresSourceHydration,
|
|
120
119
|
sources = _this$props$user2.sources;
|
|
121
|
-
return
|
|
120
|
+
return /*#__PURE__*/React.createElement(ExternalUserSourcesContainer, {
|
|
122
121
|
accountId: id,
|
|
123
122
|
shouldFetchSources: Boolean(requiresSourceHydration),
|
|
124
123
|
initialSources: sources
|
|
125
124
|
}, function (sourceData) {
|
|
126
|
-
return
|
|
125
|
+
return /*#__PURE__*/React.createElement(SourcesTooltipContent, sourceData);
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
128
|
}]);
|
|
@@ -7,10 +7,9 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
/** @jsx jsx */
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
13
|
-
import { css
|
|
12
|
+
import { css } from '@emotion/react';
|
|
14
13
|
import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
15
14
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
16
15
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
@@ -40,27 +39,27 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
40
39
|
_this$props$group = _this$props.group,
|
|
41
40
|
name = _this$props$group.name,
|
|
42
41
|
highlight = _this$props$group.highlight;
|
|
43
|
-
return [
|
|
42
|
+
return [/*#__PURE__*/React.createElement("span", {
|
|
44
43
|
key: "name",
|
|
45
44
|
css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
|
|
46
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(HighlightText, {
|
|
47
46
|
highlights: highlight && highlight.name
|
|
48
47
|
}, name))];
|
|
49
48
|
});
|
|
50
49
|
_defineProperty(_assertThisInitialized(_this), "renderAvatar", function () {
|
|
51
|
-
return
|
|
50
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
52
51
|
css: groupOptionIconWrapper
|
|
53
|
-
},
|
|
52
|
+
}, /*#__PURE__*/React.createElement(PeopleIcon, {
|
|
54
53
|
label: "group-icon",
|
|
55
54
|
size: "medium"
|
|
56
55
|
}));
|
|
57
56
|
});
|
|
58
57
|
_defineProperty(_assertThisInitialized(_this), "renderByline", function () {
|
|
59
58
|
var isSelected = _this.props.isSelected;
|
|
60
|
-
return
|
|
59
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
61
60
|
css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
|
|
62
61
|
"data-testid": "user-picker-group-secondary-text"
|
|
63
|
-
},
|
|
62
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.groupByline));
|
|
64
63
|
});
|
|
65
64
|
_defineProperty(_assertThisInitialized(_this), "getLozengeProps", function () {
|
|
66
65
|
return typeof _this.props.group.lozenge === 'string' ? {
|
|
@@ -72,7 +71,7 @@ export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72
71
|
_createClass(GroupOption, [{
|
|
73
72
|
key: "render",
|
|
74
73
|
value: function render() {
|
|
75
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement(AvatarItemOption, {
|
|
76
75
|
avatar: this.renderAvatar(),
|
|
77
76
|
isDisabled: this.props.group.isDisabled,
|
|
78
77
|
lozenge: this.getLozengeProps(),
|
|
@@ -5,10 +5,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
8
|
-
/** @jsx jsx */
|
|
9
8
|
import React from 'react';
|
|
10
9
|
import { components } from '@atlaskit/select';
|
|
11
|
-
import { css
|
|
10
|
+
import { css } from '@emotion/react';
|
|
12
11
|
var getFooterStyle = function getFooterStyle() {
|
|
13
12
|
return css({
|
|
14
13
|
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-200, 16px)")
|
|
@@ -24,7 +23,7 @@ export var Menu = /*#__PURE__*/function (_React$Component) {
|
|
|
24
23
|
_createClass(Menu, [{
|
|
25
24
|
key: "render",
|
|
26
25
|
value: function render() {
|
|
27
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(components.Menu, this.props, this.props.selectProps.header, this.props.children, this.props.selectProps.footer && /*#__PURE__*/React.createElement("div", {
|
|
28
27
|
css: getFooterStyle()
|
|
29
28
|
}, this.props.selectProps.footer));
|
|
30
29
|
}
|
|
@@ -10,11 +10,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
var _excluded = ["children", "innerProps"];
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
-
/** @jsx jsx */
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import { FormattedMessage } from 'react-intl-next';
|
|
16
15
|
import { components } from '@atlaskit/select';
|
|
17
|
-
import { css
|
|
16
|
+
import { css } from '@emotion/react';
|
|
18
17
|
import { AddOptionAvatar } from './AddOptionAvatar';
|
|
19
18
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
20
19
|
import { messages } from './i18n';
|
|
@@ -53,25 +52,25 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
53
52
|
label = _this$props$data.label,
|
|
54
53
|
selectProps = _this$props.selectProps;
|
|
55
54
|
if (isEmail(data)) {
|
|
56
|
-
return selectProps.emailLabel ?
|
|
55
|
+
return selectProps.emailLabel ? /*#__PURE__*/React.createElement(AddOptionAvatar, {
|
|
57
56
|
isLozenge: true,
|
|
58
57
|
label: selectProps.emailLabel
|
|
59
|
-
}) :
|
|
60
|
-
return
|
|
58
|
+
}) : /*#__PURE__*/React.createElement(FormattedMessage, messages.addEmail, function (label) {
|
|
59
|
+
return /*#__PURE__*/React.createElement(AddOptionAvatar, {
|
|
61
60
|
isLozenge: true,
|
|
62
61
|
label: label
|
|
63
62
|
});
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
if (isGroup(data)) {
|
|
67
|
-
return
|
|
66
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
68
67
|
css: groupTagContainer
|
|
69
|
-
},
|
|
68
|
+
}, /*#__PURE__*/React.createElement(PeopleIcon, {
|
|
70
69
|
label: "group-icon",
|
|
71
70
|
size: "small"
|
|
72
71
|
}));
|
|
73
72
|
}
|
|
74
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
75
74
|
appearance: "multi",
|
|
76
75
|
src: getAvatarUrl(data),
|
|
77
76
|
name: label
|
|
@@ -114,12 +113,12 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
114
113
|
children = _this$props3.children,
|
|
115
114
|
innerProps = _this$props3.innerProps,
|
|
116
115
|
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
117
|
-
return
|
|
116
|
+
return /*#__PURE__*/React.createElement(components.MultiValue, _extends({}, rest, {
|
|
118
117
|
innerProps: {
|
|
119
118
|
ref: this.containerRef
|
|
120
119
|
},
|
|
121
120
|
cropWithEllipsis: false
|
|
122
|
-
}), this.getElemBefore(), " ",
|
|
121
|
+
}), this.getElemBefore(), " ", /*#__PURE__*/React.createElement("div", {
|
|
123
122
|
css: nameWrapper
|
|
124
123
|
}, children));
|
|
125
124
|
}
|
|
@@ -5,12 +5,11 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
8
|
-
/** @jsx jsx */
|
|
9
8
|
import React from 'react';
|
|
10
9
|
import { themed } from '@atlaskit/theme/components';
|
|
11
10
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
12
11
|
import { components } from '@atlaskit/select';
|
|
13
|
-
import { css
|
|
12
|
+
import { css } from '@emotion/react';
|
|
14
13
|
import { N200, DN90 } from '@atlaskit/theme/colors';
|
|
15
14
|
var spacing = gridSize();
|
|
16
15
|
var fontSize = 12;
|
|
@@ -50,11 +49,11 @@ export var PopupControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
50
49
|
key: "render",
|
|
51
50
|
value: function render() {
|
|
52
51
|
var popupTitle = this.props.selectProps.popupTitle;
|
|
53
|
-
return
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
53
|
css: controlWrapper
|
|
55
|
-
},
|
|
54
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
55
|
css: getLabelStyle()
|
|
57
|
-
}, popupTitle),
|
|
56
|
+
}, popupTitle), /*#__PURE__*/React.createElement(components.Control, this.props));
|
|
58
57
|
}
|
|
59
58
|
}]);
|
|
60
59
|
return PopupControl;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["ref"];
|
|
4
|
-
/** @jsx jsx */
|
|
5
4
|
import { AvatarItem } from '@atlaskit/avatar';
|
|
6
|
-
import { css
|
|
5
|
+
import { css } from '@emotion/react';
|
|
7
6
|
import { components } from '@atlaskit/select';
|
|
8
7
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
9
8
|
import { getAvatarUrl } from './utils';
|
|
@@ -29,9 +28,9 @@ export var SingleValue = function SingleValue(props) {
|
|
|
29
28
|
_props$selectProps = props.selectProps,
|
|
30
29
|
appearance = _props$selectProps.appearance,
|
|
31
30
|
isFocused = _props$selectProps.isFocused;
|
|
32
|
-
return !isFocused ?
|
|
31
|
+
return !isFocused ? /*#__PURE__*/React.createElement(components.SingleValue, props, /*#__PURE__*/React.createElement(AvatarItem, {
|
|
33
32
|
backgroundColor: "transparent",
|
|
34
|
-
avatar:
|
|
33
|
+
avatar: /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
35
34
|
src: getAvatarUrl(data),
|
|
36
35
|
appearance: appearance,
|
|
37
36
|
name: label
|
|
@@ -40,7 +39,7 @@ export var SingleValue = function SingleValue(props) {
|
|
|
40
39
|
}, function (_ref) {
|
|
41
40
|
var ref = _ref.ref,
|
|
42
41
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
-
return
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
44
43
|
css: avatarItemComponent
|
|
45
44
|
}, props));
|
|
46
45
|
})) : null;
|
|
@@ -9,9 +9,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
9
|
var _excluded = ["children"];
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
/** @jsx jsx */
|
|
13
12
|
import React from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import { components } from '@atlaskit/select';
|
|
16
15
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
17
16
|
import { BORDER_PADDING } from './styles';
|
|
@@ -42,7 +41,7 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
42
41
|
inputValue = _this$props$selectPro.inputValue,
|
|
43
42
|
value = _this$props$selectPro.value;
|
|
44
43
|
if (isFocused || !hasValue) {
|
|
45
|
-
return
|
|
44
|
+
return /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
46
45
|
appearance: appearance,
|
|
47
46
|
src: showUserAvatar(inputValue, value) ? value.data.avatarUrl : undefined
|
|
48
47
|
});
|
|
@@ -57,7 +56,7 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
57
56
|
var _this$props2 = this.props,
|
|
58
57
|
children = _this$props2.children,
|
|
59
58
|
valueContainerProps = _objectWithoutProperties(_this$props2, _excluded);
|
|
60
|
-
return
|
|
59
|
+
return /*#__PURE__*/React.createElement(components.ValueContainer, valueContainerProps, /*#__PURE__*/React.createElement("div", {
|
|
61
60
|
css: placeholderIconContainer
|
|
62
61
|
}, this.renderAvatar()), children);
|
|
63
62
|
}
|
|
@@ -8,9 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
/** @jsx jsx */
|
|
12
11
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
13
|
-
import { jsx } from '@emotion/react';
|
|
14
12
|
import React from 'react';
|
|
15
13
|
import { FormattedMessage } from 'react-intl-next';
|
|
16
14
|
import { AvatarItemOption, textWrapper } from '../AvatarItemOption';
|
|
@@ -31,10 +29,10 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
31
29
|
var _this$props$team = _this.props.team,
|
|
32
30
|
name = _this$props$team.name,
|
|
33
31
|
highlight = _this$props$team.highlight;
|
|
34
|
-
return [
|
|
32
|
+
return [/*#__PURE__*/React.createElement("span", {
|
|
35
33
|
key: "name",
|
|
36
34
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
|
|
37
|
-
},
|
|
35
|
+
}, /*#__PURE__*/React.createElement(HighlightText, {
|
|
38
36
|
highlights: highlight && highlight.name
|
|
39
37
|
}, name))];
|
|
40
38
|
});
|
|
@@ -51,9 +49,9 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51
49
|
} else {
|
|
52
50
|
if (includesYou === true) {
|
|
53
51
|
if (memberCount > 50) {
|
|
54
|
-
return _this.getBylineComponent(isSelected,
|
|
52
|
+
return _this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, messages.plus50MembersWithYou));
|
|
55
53
|
} else {
|
|
56
|
-
return _this.getBylineComponent(isSelected,
|
|
54
|
+
return _this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.memberCountWithYou, {
|
|
57
55
|
values: {
|
|
58
56
|
count: memberCount
|
|
59
57
|
}
|
|
@@ -61,9 +59,9 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
61
59
|
}
|
|
62
60
|
} else {
|
|
63
61
|
if (memberCount > 50) {
|
|
64
|
-
return _this.getBylineComponent(isSelected,
|
|
62
|
+
return _this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, messages.plus50MembersWithoutYou));
|
|
65
63
|
} else {
|
|
66
|
-
return _this.getBylineComponent(isSelected,
|
|
64
|
+
return _this.getBylineComponent(isSelected, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.memberCountWithoutYou, {
|
|
67
65
|
values: {
|
|
68
66
|
count: memberCount
|
|
69
67
|
}
|
|
@@ -73,7 +71,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
73
71
|
}
|
|
74
72
|
});
|
|
75
73
|
_defineProperty(_assertThisInitialized(_this), "getBylineComponent", function (isSelected, message) {
|
|
76
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
77
75
|
css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
|
|
78
76
|
"data-testid": "user-picker-team-secondary-text"
|
|
79
77
|
}, message);
|
|
@@ -82,7 +80,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
82
80
|
var _this$props$team3 = _this.props.team,
|
|
83
81
|
avatarUrl = _this$props$team3.avatarUrl,
|
|
84
82
|
name = _this$props$team3.name;
|
|
85
|
-
return
|
|
83
|
+
return /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
86
84
|
appearance: "big",
|
|
87
85
|
src: avatarUrl,
|
|
88
86
|
name: name
|
|
@@ -98,7 +96,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
98
96
|
if (!((_this$props$team4 = _this.props.team) !== null && _this$props$team4 !== void 0 && _this$props$team4.byline)) {
|
|
99
97
|
return undefined;
|
|
100
98
|
}
|
|
101
|
-
return
|
|
99
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
102
100
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
|
|
103
101
|
}, _this.props.team.byline);
|
|
104
102
|
});
|
|
@@ -107,7 +105,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
107
105
|
_createClass(TeamOption, [{
|
|
108
106
|
key: "render",
|
|
109
107
|
value: function render() {
|
|
110
|
-
return
|
|
108
|
+
return /*#__PURE__*/React.createElement(AvatarItemOption, {
|
|
111
109
|
avatar: this.renderAvatar(),
|
|
112
110
|
isDisabled: this.props.team.isDisabled,
|
|
113
111
|
lozenge: this.getLozengeProps(),
|
|
@@ -7,9 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
/** @jsx jsx */
|
|
11
10
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import React from 'react';
|
|
14
12
|
import { AvatarItemOption, textWrapper } from './AvatarItemOption';
|
|
15
13
|
import { HighlightText } from './HighlightText';
|
|
@@ -30,25 +28,25 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
30
28
|
name = _this$props$user.name,
|
|
31
29
|
publicName = _this$props$user.publicName,
|
|
32
30
|
highlight = _this$props$user.highlight;
|
|
33
|
-
var result = [
|
|
31
|
+
var result = [/*#__PURE__*/React.createElement("span", {
|
|
34
32
|
key: "name",
|
|
35
33
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text, ".concat(N800, ")"))
|
|
36
|
-
},
|
|
34
|
+
}, /*#__PURE__*/React.createElement(HighlightText, {
|
|
37
35
|
highlights: highlight && highlight.name
|
|
38
36
|
}, name))];
|
|
39
37
|
if (hasValue(publicName) && name.trim() !== publicName.trim()) {
|
|
40
|
-
result.push(
|
|
38
|
+
result.push( /*#__PURE__*/React.createElement(React.Fragment, {
|
|
41
39
|
key: "publicName"
|
|
42
|
-
}, ' ',
|
|
40
|
+
}, ' ', /*#__PURE__*/React.createElement("span", {
|
|
43
41
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
|
|
44
|
-
}, "(",
|
|
42
|
+
}, "(", /*#__PURE__*/React.createElement(HighlightText, {
|
|
45
43
|
highlights: highlight && highlight.publicName
|
|
46
44
|
}, publicName), ")")));
|
|
47
45
|
}
|
|
48
46
|
return result;
|
|
49
47
|
});
|
|
50
48
|
_defineProperty(_assertThisInitialized(_this), "renderSecondaryText", function () {
|
|
51
|
-
return _this.props.user.byline ?
|
|
49
|
+
return _this.props.user.byline ? /*#__PURE__*/React.createElement("span", {
|
|
52
50
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
|
|
53
51
|
}, _this.props.user.byline) : undefined;
|
|
54
52
|
});
|
|
@@ -58,7 +56,7 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
58
56
|
avatarUrl = _this$props$user2.avatarUrl,
|
|
59
57
|
name = _this$props$user2.name,
|
|
60
58
|
status = _this$props.status;
|
|
61
|
-
return
|
|
59
|
+
return /*#__PURE__*/React.createElement(SizeableAvatar, {
|
|
62
60
|
appearance: "big",
|
|
63
61
|
src: avatarUrl,
|
|
64
62
|
presence: status,
|
|
@@ -75,7 +73,7 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
75
73
|
_createClass(UserOption, [{
|
|
76
74
|
key: "render",
|
|
77
75
|
value: function render() {
|
|
78
|
-
return
|
|
76
|
+
return /*#__PURE__*/React.createElement(AvatarItemOption, {
|
|
79
77
|
avatar: this.renderAvatar(),
|
|
80
78
|
lozenge: this.getLozengeProps(),
|
|
81
79
|
isDisabled: this.props.user.isDisabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "10.12.
|
|
3
|
+
"version": "10.12.4",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@atlaskit/avatar": "^21.4.0",
|
|
39
39
|
"@atlaskit/icon": "^22.0.0",
|
|
40
40
|
"@atlaskit/logo": "^13.14.0",
|
|
41
|
-
"@atlaskit/lozenge": "^11.
|
|
41
|
+
"@atlaskit/lozenge": "^11.5.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
43
43
|
"@atlaskit/popper": "^5.5.0",
|
|
44
44
|
"@atlaskit/select": "^17.0.0",
|
|
45
45
|
"@atlaskit/spinner": "^16.0.0",
|
|
46
46
|
"@atlaskit/theme": "^12.6.0",
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
48
48
|
"@atlaskit/tooltip": "^18.0.0",
|
|
49
49
|
"@atlaskit/ufo": "^0.2.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|