@atlaskit/user-picker 10.27.6 → 10.27.8
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/analytics.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +35 -38
- package/dist/cjs/components/ClearIndicator.js +6 -9
- package/dist/cjs/components/CustomOption/main.js +10 -13
- package/dist/cjs/components/EmailOption/main.js +9 -12
- package/dist/cjs/components/ExternalUserOption/main.js +12 -15
- package/dist/cjs/components/GroupOption/main.js +9 -12
- package/dist/cjs/components/HighlightText.js +5 -7
- package/dist/cjs/components/Input.js +6 -9
- package/dist/cjs/components/Menu.js +5 -7
- package/dist/cjs/components/MultiValue.js +7 -10
- package/dist/cjs/components/MultiValueContainer.js +11 -14
- package/dist/cjs/components/PopupControl.js +6 -8
- package/dist/cjs/components/PopupInput.js +7 -10
- package/dist/cjs/components/PopupUserPicker.js +7 -10
- package/dist/cjs/components/SingleValueContainer.js +8 -11
- package/dist/cjs/components/SizeableAvatar.js +5 -7
- package/dist/cjs/components/TeamOption/main.js +11 -14
- package/dist/cjs/components/UserOption.js +9 -12
- package/dist/cjs/components/UserPicker.js +5 -7
- package/dist/cjs/util/ufoExperiences.js +5 -7
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/ExternalUserOption/main.js +1 -1
- package/dist/es2019/components/PopupControl.js +1 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/BaseUserPicker.js +35 -38
- package/dist/esm/components/ClearIndicator.js +6 -9
- package/dist/esm/components/CustomOption/main.js +10 -13
- package/dist/esm/components/EmailOption/main.js +9 -12
- package/dist/esm/components/ExternalUserOption/main.js +12 -15
- package/dist/esm/components/GroupOption/main.js +9 -12
- package/dist/esm/components/HighlightText.js +5 -7
- package/dist/esm/components/Input.js +6 -9
- package/dist/esm/components/Menu.js +5 -7
- package/dist/esm/components/MultiValue.js +7 -10
- package/dist/esm/components/MultiValueContainer.js +11 -14
- package/dist/esm/components/PopupControl.js +6 -8
- package/dist/esm/components/PopupInput.js +7 -10
- package/dist/esm/components/PopupUserPicker.js +7 -10
- package/dist/esm/components/SingleValueContainer.js +8 -11
- package/dist/esm/components/SizeableAvatar.js +5 -7
- package/dist/esm/components/TeamOption/main.js +11 -14
- package/dist/esm/components/UserOption.js +9 -12
- package/dist/esm/components/UserPicker.js +5 -7
- package/dist/esm/util/ufoExperiences.js +5 -7
- package/package.json +2 -2
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import { Input } from './Input';
|
|
13
12
|
export var PopupInput = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(PopupInput, _React$Component);
|
|
15
|
-
var _super = _createSuper(PopupInput);
|
|
16
13
|
function PopupInput() {
|
|
17
14
|
var _this;
|
|
18
15
|
_classCallCheck(this, PopupInput);
|
|
19
16
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
17
|
args[_key] = arguments[_key];
|
|
21
18
|
}
|
|
22
|
-
_this =
|
|
23
|
-
_defineProperty(
|
|
24
|
-
_defineProperty(
|
|
19
|
+
_this = _callSuper(this, PopupInput, [].concat(args));
|
|
20
|
+
_defineProperty(_this, "ref", null);
|
|
21
|
+
_defineProperty(_this, "handleInnerRef", function (ref) {
|
|
25
22
|
_this.ref = ref;
|
|
26
23
|
if (_this.props.innerRef) {
|
|
27
24
|
_this.props.innerRef(ref);
|
|
@@ -29,7 +26,8 @@ export var PopupInput = /*#__PURE__*/function (_React$Component) {
|
|
|
29
26
|
});
|
|
30
27
|
return _this;
|
|
31
28
|
}
|
|
32
|
-
|
|
29
|
+
_inherits(PopupInput, _React$Component);
|
|
30
|
+
return _createClass(PopupInput, [{
|
|
33
31
|
key: "componentDidMount",
|
|
34
32
|
value: function componentDidMount() {
|
|
35
33
|
if (this.ref) {
|
|
@@ -45,5 +43,4 @@ export var PopupInput = /*#__PURE__*/function (_React$Component) {
|
|
|
45
43
|
}));
|
|
46
44
|
}
|
|
47
45
|
}]);
|
|
48
|
-
return PopupInput;
|
|
49
46
|
}(React.Component);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
11
|
import { PopupSelect } from '@atlaskit/select';
|
|
@@ -16,19 +15,17 @@ import { getPopupStyles } from './styles';
|
|
|
16
15
|
import { getPopupProps } from './popup';
|
|
17
16
|
import { BaseUserPickerWithoutAnalytics } from './BaseUserPicker';
|
|
18
17
|
export var PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(PopupUserPickerWithoutAnalytics, _React$Component);
|
|
20
|
-
var _super = _createSuper(PopupUserPickerWithoutAnalytics);
|
|
21
18
|
function PopupUserPickerWithoutAnalytics() {
|
|
22
19
|
var _this;
|
|
23
20
|
_classCallCheck(this, PopupUserPickerWithoutAnalytics);
|
|
24
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
22
|
args[_key] = arguments[_key];
|
|
26
23
|
}
|
|
27
|
-
_this =
|
|
28
|
-
_defineProperty(
|
|
24
|
+
_this = _callSuper(this, PopupUserPickerWithoutAnalytics, [].concat(args));
|
|
25
|
+
_defineProperty(_this, "state", {
|
|
29
26
|
flipped: false
|
|
30
27
|
});
|
|
31
|
-
_defineProperty(
|
|
28
|
+
_defineProperty(_this, "handleFlipStyle", function (data) {
|
|
32
29
|
var flipped = data.flipped,
|
|
33
30
|
transform = data.styles.transform,
|
|
34
31
|
height = data.popper.height;
|
|
@@ -43,7 +40,8 @@ export var PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
|
|
|
43
40
|
});
|
|
44
41
|
return _this;
|
|
45
42
|
}
|
|
46
|
-
|
|
43
|
+
_inherits(PopupUserPickerWithoutAnalytics, _React$Component);
|
|
44
|
+
return _createClass(PopupUserPickerWithoutAnalytics, [{
|
|
47
45
|
key: "render",
|
|
48
46
|
value: function render() {
|
|
49
47
|
var _this$props = this.props,
|
|
@@ -67,7 +65,6 @@ export var PopupUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compo
|
|
|
67
65
|
}));
|
|
68
66
|
}
|
|
69
67
|
}]);
|
|
70
|
-
return PopupUserPickerWithoutAnalytics;
|
|
71
68
|
}(React.Component);
|
|
72
69
|
_defineProperty(PopupUserPickerWithoutAnalytics, "defaultProps", {
|
|
73
70
|
boundariesElement: 'viewport',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
8
|
var _excluded = ["children"];
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
/**
|
|
13
12
|
* @jsxRuntime classic
|
|
@@ -30,16 +29,14 @@ var showUserAvatar = function showUserAvatar(inputValue, value) {
|
|
|
30
29
|
return value && value.data && inputValue === value.label;
|
|
31
30
|
};
|
|
32
31
|
export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
33
|
-
_inherits(SingleValueContainer, _React$Component);
|
|
34
|
-
var _super = _createSuper(SingleValueContainer);
|
|
35
32
|
function SingleValueContainer() {
|
|
36
33
|
var _this;
|
|
37
34
|
_classCallCheck(this, SingleValueContainer);
|
|
38
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
36
|
args[_key] = arguments[_key];
|
|
40
37
|
}
|
|
41
|
-
_this =
|
|
42
|
-
_defineProperty(
|
|
38
|
+
_this = _callSuper(this, SingleValueContainer, [].concat(args));
|
|
39
|
+
_defineProperty(_this, "renderAvatar", function () {
|
|
43
40
|
var _this$props = _this.props,
|
|
44
41
|
hasValue = _this$props.hasValue,
|
|
45
42
|
_this$props$selectPro = _this$props.selectProps,
|
|
@@ -58,8 +55,8 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
58
55
|
return null;
|
|
59
56
|
});
|
|
60
57
|
//@ts-ignore react-select unsupported props
|
|
61
|
-
_defineProperty(
|
|
62
|
-
_defineProperty(
|
|
58
|
+
_defineProperty(_this, "onValueContainerClick", _this.props.selectProps.onValueContainerClick);
|
|
59
|
+
_defineProperty(_this, "Wrapper", function (_ref) {
|
|
63
60
|
var children = _ref.children;
|
|
64
61
|
return _this.onValueContainerClick ?
|
|
65
62
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, jsx-a11y/no-static-element-interactions -- Ignored via go/DSP-18766
|
|
@@ -72,7 +69,8 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
72
69
|
});
|
|
73
70
|
return _this;
|
|
74
71
|
}
|
|
75
|
-
|
|
72
|
+
_inherits(SingleValueContainer, _React$Component);
|
|
73
|
+
return _createClass(SingleValueContainer, [{
|
|
76
74
|
key: "render",
|
|
77
75
|
value: function render() {
|
|
78
76
|
var _this$props2 = this.props,
|
|
@@ -86,5 +84,4 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
86
84
|
}, this.renderAvatar()), children));
|
|
87
85
|
}
|
|
88
86
|
}]);
|
|
89
|
-
return SingleValueContainer;
|
|
90
87
|
}(React.Component);
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import Avatar from '@atlaskit/avatar';
|
|
9
9
|
import TeamAvatar from '@atlaskit/teams-avatar';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { getAvatarSize } from './utils';
|
|
12
12
|
export var SizeableAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
13
|
-
_inherits(SizeableAvatar, _React$PureComponent);
|
|
14
|
-
var _super = _createSuper(SizeableAvatar);
|
|
15
13
|
function SizeableAvatar() {
|
|
16
14
|
_classCallCheck(this, SizeableAvatar);
|
|
17
|
-
return
|
|
15
|
+
return _callSuper(this, SizeableAvatar, arguments);
|
|
18
16
|
}
|
|
19
|
-
|
|
17
|
+
_inherits(SizeableAvatar, _React$PureComponent);
|
|
18
|
+
return _createClass(SizeableAvatar, [{
|
|
20
19
|
key: "render",
|
|
21
20
|
value: function render() {
|
|
22
21
|
var _this$props = this.props,
|
|
@@ -34,5 +33,4 @@ export var SizeableAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
34
33
|
return type === 'team' ? /*#__PURE__*/React.createElement(TeamAvatar, props) : /*#__PURE__*/React.createElement(Avatar, props);
|
|
35
34
|
}
|
|
36
35
|
}]);
|
|
37
|
-
return SizeableAvatar;
|
|
38
36
|
}(React.PureComponent);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
/**
|
|
12
11
|
* @jsxRuntime classic
|
|
@@ -25,16 +24,14 @@ import { HighlightText } from '../HighlightText';
|
|
|
25
24
|
import { messages } from '../i18n';
|
|
26
25
|
import { SizeableAvatar } from '../SizeableAvatar';
|
|
27
26
|
export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
28
|
-
_inherits(TeamOption, _React$PureComponent);
|
|
29
|
-
var _super = _createSuper(TeamOption);
|
|
30
27
|
function TeamOption() {
|
|
31
28
|
var _this;
|
|
32
29
|
_classCallCheck(this, TeamOption);
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
37
|
-
_defineProperty(
|
|
33
|
+
_this = _callSuper(this, TeamOption, [].concat(args));
|
|
34
|
+
_defineProperty(_this, "getPrimaryText", function () {
|
|
38
35
|
var _this$props$team = _this.props.team,
|
|
39
36
|
name = _this$props$team.name,
|
|
40
37
|
highlight = _this$props$team.highlight,
|
|
@@ -54,7 +51,7 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
54
51
|
highlights: highlight && highlight.name
|
|
55
52
|
}, name))];
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "renderByline", function () {
|
|
58
55
|
var _this$props = _this.props,
|
|
59
56
|
isSelected = _this$props.isSelected,
|
|
60
57
|
_this$props$team2 = _this$props.team,
|
|
@@ -88,14 +85,14 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
});
|
|
91
|
-
_defineProperty(
|
|
88
|
+
_defineProperty(_this, "getBylineComponent", function (isSelected, message) {
|
|
92
89
|
return jsx("span", {
|
|
93
90
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
94
91
|
css: textWrapper(isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")")),
|
|
95
92
|
"data-testid": "user-picker-team-secondary-text"
|
|
96
93
|
}, message);
|
|
97
94
|
});
|
|
98
|
-
_defineProperty(
|
|
95
|
+
_defineProperty(_this, "renderAvatar", function () {
|
|
99
96
|
var avatarUrl = _this.props.team.avatarUrl;
|
|
100
97
|
return jsx(SizeableAvatar, {
|
|
101
98
|
appearance: "big",
|
|
@@ -103,12 +100,12 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
100
|
type: "team"
|
|
104
101
|
});
|
|
105
102
|
});
|
|
106
|
-
_defineProperty(
|
|
103
|
+
_defineProperty(_this, "getLozengeProps", function () {
|
|
107
104
|
return typeof _this.props.team.lozenge === 'string' ? {
|
|
108
105
|
text: _this.props.team.lozenge
|
|
109
106
|
} : _this.props.team.lozenge;
|
|
110
107
|
});
|
|
111
|
-
_defineProperty(
|
|
108
|
+
_defineProperty(_this, "renderCustomByLine", function () {
|
|
112
109
|
var _this$props$team3;
|
|
113
110
|
if (!((_this$props$team3 = _this.props.team) !== null && _this$props$team3 !== void 0 && _this$props$team3.byline)) {
|
|
114
111
|
return undefined;
|
|
@@ -120,7 +117,8 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
120
117
|
});
|
|
121
118
|
return _this;
|
|
122
119
|
}
|
|
123
|
-
|
|
120
|
+
_inherits(TeamOption, _React$PureComponent);
|
|
121
|
+
return _createClass(TeamOption, [{
|
|
124
122
|
key: "render",
|
|
125
123
|
value: function render() {
|
|
126
124
|
return jsx(AvatarItemOption, {
|
|
@@ -132,5 +130,4 @@ export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
132
130
|
});
|
|
133
131
|
}
|
|
134
132
|
}]);
|
|
135
|
-
return TeamOption;
|
|
136
133
|
}(React.PureComponent);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/**
|
|
11
10
|
* @jsxRuntime classic
|
|
@@ -20,16 +19,14 @@ import { HighlightText } from './HighlightText';
|
|
|
20
19
|
import { SizeableAvatar } from './SizeableAvatar';
|
|
21
20
|
import { hasValue } from './utils';
|
|
22
21
|
export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
23
|
-
_inherits(UserOption, _React$PureComponent);
|
|
24
|
-
var _super = _createSuper(UserOption);
|
|
25
22
|
function UserOption() {
|
|
26
23
|
var _this;
|
|
27
24
|
_classCallCheck(this, UserOption);
|
|
28
25
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
26
|
args[_key] = arguments[_key];
|
|
30
27
|
}
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(
|
|
28
|
+
_this = _callSuper(this, UserOption, [].concat(args));
|
|
29
|
+
_defineProperty(_this, "getPrimaryText", function () {
|
|
33
30
|
var _this$props$user = _this.props.user,
|
|
34
31
|
name = _this$props$user.name,
|
|
35
32
|
publicName = _this$props$user.publicName,
|
|
@@ -54,13 +51,13 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
54
51
|
}
|
|
55
52
|
return result;
|
|
56
53
|
});
|
|
57
|
-
_defineProperty(
|
|
54
|
+
_defineProperty(_this, "renderSecondaryText", function () {
|
|
58
55
|
return _this.props.user.byline ? jsx("span", {
|
|
59
56
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
60
57
|
css: textWrapper(_this.props.isSelected ? "var(--ds-text-selected, ".concat(B400, ")") : "var(--ds-text-subtlest, ".concat(N200, ")"))
|
|
61
58
|
}, _this.props.user.byline) : undefined;
|
|
62
59
|
});
|
|
63
|
-
_defineProperty(
|
|
60
|
+
_defineProperty(_this, "renderAvatar", function () {
|
|
64
61
|
var _this$props = _this.props,
|
|
65
62
|
avatarUrl = _this$props.user.avatarUrl,
|
|
66
63
|
status = _this$props.status;
|
|
@@ -70,14 +67,15 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
70
67
|
presence: status
|
|
71
68
|
});
|
|
72
69
|
});
|
|
73
|
-
_defineProperty(
|
|
70
|
+
_defineProperty(_this, "getLozengeProps", function () {
|
|
74
71
|
return typeof _this.props.user.lozenge === 'string' ? {
|
|
75
72
|
text: _this.props.user.lozenge
|
|
76
73
|
} : _this.props.user.lozenge;
|
|
77
74
|
});
|
|
78
75
|
return _this;
|
|
79
76
|
}
|
|
80
|
-
|
|
77
|
+
_inherits(UserOption, _React$PureComponent);
|
|
78
|
+
return _createClass(UserOption, [{
|
|
81
79
|
key: "render",
|
|
82
80
|
value: function render() {
|
|
83
81
|
return jsx(AvatarItemOption, {
|
|
@@ -89,5 +87,4 @@ export var UserOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
89
|
}]);
|
|
92
|
-
return UserOption;
|
|
93
90
|
}(React.PureComponent);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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; }
|
|
9
9
|
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) { _defineProperty(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; }
|
|
10
|
-
function
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
13
13
|
import Select, { CreatableSelect } from '@atlaskit/select';
|
|
@@ -23,18 +23,17 @@ import { ExusUserSourceProvider } from '../clients/UserSourceProvider';
|
|
|
23
23
|
import { userPickerRenderedUfoExperience as experience, UfoErrorBoundary } from '../util/ufoExperiences';
|
|
24
24
|
import { v4 as uuidv4 } from 'uuid';
|
|
25
25
|
export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
26
|
-
_inherits(UserPickerWithoutAnalytics, _React$Component);
|
|
27
|
-
var _super = _createSuper(UserPickerWithoutAnalytics);
|
|
28
26
|
function UserPickerWithoutAnalytics(props) {
|
|
29
27
|
var _this;
|
|
30
28
|
_classCallCheck(this, UserPickerWithoutAnalytics);
|
|
31
|
-
_this =
|
|
29
|
+
_this = _callSuper(this, UserPickerWithoutAnalytics, [props]);
|
|
32
30
|
_this.ufoId = uuidv4();
|
|
33
31
|
var experienceForId = experience.getInstance(_this.ufoId);
|
|
34
32
|
experienceForId.start();
|
|
35
33
|
return _this;
|
|
36
34
|
}
|
|
37
|
-
|
|
35
|
+
_inherits(UserPickerWithoutAnalytics, _React$Component);
|
|
36
|
+
return _createClass(UserPickerWithoutAnalytics, [{
|
|
38
37
|
key: "componentDidMount",
|
|
39
38
|
value: function componentDidMount() {
|
|
40
39
|
var experienceForId = experience.getInstance(this.ufoId);
|
|
@@ -91,7 +90,6 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
91
90
|
})))));
|
|
92
91
|
}
|
|
93
92
|
}]);
|
|
94
|
-
return UserPickerWithoutAnalytics;
|
|
95
93
|
}(React.Component);
|
|
96
94
|
_defineProperty(UserPickerWithoutAnalytics, "defaultProps", {
|
|
97
95
|
width: 350,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience, UFOExperienceState } from '@atlaskit/ufo';
|
|
@@ -22,13 +22,12 @@ export var userPickerOptionsShownUfoExperience = new ConcurrentExperience('user-
|
|
|
22
22
|
performanceType: ExperiencePerformanceTypes.InlineResult
|
|
23
23
|
});
|
|
24
24
|
export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
25
|
-
_inherits(UfoErrorBoundary, _React$Component);
|
|
26
|
-
var _super = _createSuper(UfoErrorBoundary);
|
|
27
25
|
function UfoErrorBoundary() {
|
|
28
26
|
_classCallCheck(this, UfoErrorBoundary);
|
|
29
|
-
return
|
|
27
|
+
return _callSuper(this, UfoErrorBoundary, arguments);
|
|
30
28
|
}
|
|
31
|
-
|
|
29
|
+
_inherits(UfoErrorBoundary, _React$Component);
|
|
30
|
+
return _createClass(UfoErrorBoundary, [{
|
|
32
31
|
key: "componentDidCatch",
|
|
33
32
|
value: function componentDidCatch() {
|
|
34
33
|
var instance = userPickerRenderedUfoExperience.getInstance(this.props.id);
|
|
@@ -42,5 +41,4 @@ export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
42
41
|
return this.props.children;
|
|
43
42
|
}
|
|
44
43
|
}]);
|
|
45
|
-
return UfoErrorBoundary;
|
|
46
44
|
}(React.Component);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "10.27.
|
|
3
|
+
"version": "10.27.8",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
56
56
|
"@atlaskit/popper": "^6.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
|
-
"@atlaskit/select": "^18.
|
|
58
|
+
"@atlaskit/select": "^18.9.0",
|
|
59
59
|
"@atlaskit/spinner": "^16.3.0",
|
|
60
60
|
"@atlaskit/teams-avatar": "^1.1.0",
|
|
61
61
|
"@atlaskit/theme": "^14.0.0",
|