@atlaskit/user-picker 8.1.0 → 8.3.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 +24 -0
- package/dist/cjs/analytics.js +2 -2
- package/dist/cjs/clients/UserSourceProvider.js +97 -0
- package/dist/cjs/components/AvatarItemOption.js +21 -5
- package/dist/cjs/components/ClearIndicator.js +27 -8
- package/dist/cjs/components/EmailOption/index.js +29 -0
- package/dist/cjs/components/{EmailOption.js → EmailOption/main.js} +3 -3
- package/dist/cjs/components/ExternalUserOption/index.js +29 -0
- package/dist/cjs/components/{ExternalUserOption.js → ExternalUserOption/main.js} +41 -22
- package/dist/cjs/components/ExternalUserSourcesContainer.js +43 -0
- package/dist/cjs/components/GroupOption/index.js +29 -0
- package/dist/cjs/components/{GroupOption.js → GroupOption/main.js} +3 -3
- package/dist/cjs/components/MessagesIntlProvider.js +5 -6
- package/dist/cjs/components/MultiValue.js +3 -1
- package/dist/cjs/components/MultiValueContainer.js +5 -3
- package/dist/cjs/components/Option.js +26 -13
- package/dist/cjs/components/SingleValue.js +3 -1
- package/dist/cjs/components/SingleValueContainer.js +3 -1
- package/dist/cjs/components/SizeableAvatar.js +4 -5
- package/dist/cjs/components/TeamOption/index.js +29 -0
- package/dist/cjs/components/{TeamOption.js → TeamOption/main.js} +4 -4
- package/dist/cjs/components/UserPicker.js +10 -5
- package/dist/cjs/components/components.js +2 -2
- package/dist/cjs/components/i18n.js +5 -0
- package/dist/cjs/components/smart-user-picker/components/index.js +2 -2
- package/dist/cjs/components/smart-user-picker/service/recommendationClient.js +2 -2
- package/dist/cjs/components/styles.js +9 -5
- package/dist/cjs/components/utils.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/clients/UserSourceProvider.js +56 -0
- package/dist/es2019/components/AvatarItemOption.js +12 -4
- package/dist/es2019/components/ClearIndicator.js +14 -5
- package/dist/es2019/components/EmailOption/index.js +9 -0
- package/dist/es2019/components/{EmailOption.js → EmailOption/main.js} +3 -3
- package/dist/es2019/components/ExternalUserOption/index.js +9 -0
- package/dist/es2019/components/{ExternalUserOption.js → ExternalUserOption/main.js} +38 -21
- package/dist/es2019/components/ExternalUserSourcesContainer.js +28 -0
- package/dist/es2019/components/GroupOption/index.js +9 -0
- package/dist/es2019/components/{GroupOption.js → GroupOption/main.js} +3 -3
- package/dist/es2019/components/MessagesIntlProvider.js +3 -3
- package/dist/es2019/components/Option.js +23 -9
- package/dist/es2019/components/TeamOption/index.js +9 -0
- package/dist/es2019/components/{TeamOption.js → TeamOption/main.js} +4 -4
- package/dist/es2019/components/UserPicker.js +7 -3
- package/dist/es2019/components/i18n.js +5 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +2 -2
- package/dist/esm/clients/UserSourceProvider.js +73 -0
- package/dist/esm/components/AvatarItemOption.js +14 -4
- package/dist/esm/components/ClearIndicator.js +18 -7
- package/dist/esm/components/EmailOption/index.js +11 -0
- package/dist/esm/components/{EmailOption.js → EmailOption/main.js} +3 -3
- package/dist/esm/components/ExternalUserOption/index.js +11 -0
- package/dist/esm/components/{ExternalUserOption.js → ExternalUserOption/main.js} +39 -22
- package/dist/esm/components/ExternalUserSourcesContainer.js +30 -0
- package/dist/esm/components/GroupOption/index.js +11 -0
- package/dist/esm/components/{GroupOption.js → GroupOption/main.js} +3 -3
- package/dist/esm/components/MessagesIntlProvider.js +6 -6
- package/dist/esm/components/MultiValue.js +2 -1
- package/dist/esm/components/MultiValueContainer.js +4 -3
- package/dist/esm/components/Option.js +25 -12
- package/dist/esm/components/SingleValue.js +2 -1
- package/dist/esm/components/SingleValueContainer.js +2 -1
- package/dist/esm/components/SizeableAvatar.js +3 -3
- package/dist/esm/components/TeamOption/index.js +11 -0
- package/dist/esm/components/{TeamOption.js → TeamOption/main.js} +4 -4
- package/dist/esm/components/UserPicker.js +9 -5
- package/dist/esm/components/components.js +2 -2
- package/dist/esm/components/i18n.js +5 -0
- package/dist/esm/components/smart-user-picker/components/index.js +2 -2
- package/dist/esm/components/smart-user-picker/service/recommendationClient.js +2 -2
- package/dist/esm/components/styles.js +8 -5
- package/dist/esm/components/utils.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/clients/UserSourceProvider.d.ts +11 -0
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/EmailOption/index.d.ts +3 -0
- package/dist/types/components/{EmailOption.d.ts → EmailOption/main.d.ts} +2 -2
- package/dist/types/components/ExternalUserOption/index.d.ts +3 -0
- package/dist/types/components/{ExternalUserOption.d.ts → ExternalUserOption/main.d.ts} +1 -1
- package/dist/types/components/ExternalUserSourcesContainer.d.ts +15 -0
- package/dist/types/components/GroupOption/index.d.ts +3 -0
- package/dist/types/components/{GroupOption.d.ts → GroupOption/main.d.ts} +1 -1
- package/dist/types/components/MessagesIntlProvider.d.ts +2 -8
- package/dist/types/components/Option.d.ts +4 -1
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/TeamOption/index.d.ts +3 -0
- package/dist/types/components/{TeamOption.d.ts → TeamOption/main.d.ts} +1 -1
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/components/i18n.d.ts +5 -0
- package/dist/types/types.d.ts +15 -0
- package/package.json +12 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useUserSource } from '../clients/UserSourceProvider';
|
|
3
|
+
export var ExternalUserSourcesContainer = function ExternalUserSourcesContainer(_ref) {
|
|
4
|
+
var children = _ref.children,
|
|
5
|
+
accountId = _ref.accountId,
|
|
6
|
+
shouldFetchSources = _ref.shouldFetchSources,
|
|
7
|
+
_ref$initialSources = _ref.initialSources,
|
|
8
|
+
initialSources = _ref$initialSources === void 0 ? [] : _ref$initialSources;
|
|
9
|
+
|
|
10
|
+
var _useUserSource = useUserSource(accountId, shouldFetchSources, initialSources),
|
|
11
|
+
sources = _useUserSource.sources,
|
|
12
|
+
sourcesLoading = _useUserSource.loading,
|
|
13
|
+
sourcesError = _useUserSource.error;
|
|
14
|
+
|
|
15
|
+
if (typeof children === 'function') {
|
|
16
|
+
return children({
|
|
17
|
+
sources: sources,
|
|
18
|
+
sourcesLoading: sourcesLoading,
|
|
19
|
+
sourcesError: sourcesError
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return React.Children.map(children, function (child) {
|
|
24
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
25
|
+
sources: sources,
|
|
26
|
+
sourcesLoading: sourcesLoading,
|
|
27
|
+
sourcesError: sourcesError
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var AsyncGroupOption = /*#__PURE__*/React.lazy(function () {
|
|
3
|
+
return import(
|
|
4
|
+
/* webpackChunkName: "@atlaskit-internal_@atlassian/user-picker/group-option" */
|
|
5
|
+
'./main').then(function (module) {
|
|
6
|
+
return {
|
|
7
|
+
default: module.GroupOption
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
export default AsyncGroupOption;
|
|
@@ -19,9 +19,9 @@ import styled from 'styled-components';
|
|
|
19
19
|
import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
20
20
|
import { token } from '@atlaskit/tokens';
|
|
21
21
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
22
|
-
import { AvatarItemOption, TextWrapper } from '
|
|
23
|
-
import { messages } from '
|
|
24
|
-
import { HighlightText } from '
|
|
22
|
+
import { AvatarItemOption, TextWrapper } from '.././AvatarItemOption';
|
|
23
|
+
import { messages } from '.././i18n';
|
|
24
|
+
import { HighlightText } from '.././HighlightText';
|
|
25
25
|
export var GroupOptionIconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 2px;\n\n > span {\n background-color: ", ";\n border-radius: 50%;\n padding: 4px;\n }\n"])), token('color.background.subtleNeutral.resting', N20));
|
|
26
26
|
export var GroupOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
27
27
|
_inherits(GroupOption, _React$PureComponent);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import React, { useMemo } from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { useIntl, IntlProvider } from 'react-intl-next';
|
|
10
10
|
import { getMessagesForLocale } from '../util/i18n-util';
|
|
11
11
|
var EMPTY = {};
|
|
12
12
|
|
|
@@ -35,8 +35,8 @@ var useI18n = function useI18n(locale) {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
38
|
-
var intl =
|
|
39
|
-
|
|
38
|
+
var intl = useIntl();
|
|
39
|
+
var children = props.children;
|
|
40
40
|
var messages = useI18n(intl.locale);
|
|
41
41
|
var mergedMessages = useMemo(function () {
|
|
42
42
|
return _objectSpread(_objectSpread({}, intl.messages), messages);
|
|
@@ -47,4 +47,4 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
|
47
47
|
}, children);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
export default
|
|
50
|
+
export default MessagesIntlProvider;
|
|
@@ -8,6 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
11
|
+
var _excluded = ["children", "innerProps"];
|
|
11
12
|
|
|
12
13
|
var _templateObject, _templateObject2;
|
|
13
14
|
|
|
@@ -124,7 +125,7 @@ export var MultiValue = /*#__PURE__*/function (_React$Component) {
|
|
|
124
125
|
var _this$props3 = this.props,
|
|
125
126
|
children = _this$props3.children,
|
|
126
127
|
innerProps = _this$props3.innerProps,
|
|
127
|
-
rest = _objectWithoutProperties(_this$props3,
|
|
128
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
128
129
|
|
|
129
130
|
return /*#__PURE__*/React.createElement(components.MultiValue, _extends({}, rest, {
|
|
130
131
|
innerProps: {
|
|
@@ -6,10 +6,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
var _excluded = ["children", "innerProps"];
|
|
9
10
|
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
12
|
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
14
|
|
|
14
15
|
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); }; }
|
|
15
16
|
|
|
@@ -123,7 +124,7 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
123
124
|
var _this$props = this.props,
|
|
124
125
|
children = _this$props.children,
|
|
125
126
|
innerProps = _this$props.innerProps,
|
|
126
|
-
valueContainerProps = _objectWithoutProperties(_this$props,
|
|
127
|
+
valueContainerProps = _objectWithoutProperties(_this$props, _excluded);
|
|
127
128
|
|
|
128
129
|
var props = _objectSpread(_objectSpread({}, valueContainerProps), {}, {
|
|
129
130
|
innerProps: this.valueContainerInnerProps
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { components } from '@atlaskit/select';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { EmailOption } from './EmailOption';
|
|
4
|
-
import { TeamOption } from './TeamOption';
|
|
5
3
|
import { UserOption } from './UserOption';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import AsyncExternalOption from './ExternalUserOption';
|
|
5
|
+
import AsyncTeamOption from './TeamOption';
|
|
6
|
+
import AsyncGroupOption from './GroupOption';
|
|
7
|
+
import AsyncEmailOption from './EmailOption';
|
|
8
8
|
import { isEmail, isTeam, isUser, isGroup, isExternalUser } from './utils';
|
|
9
9
|
import { isValidEmail } from './emailValidation';
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var defaultOption = function defaultOption(_ref) {
|
|
12
12
|
var data = _ref.data.data,
|
|
13
13
|
isSelected = _ref.isSelected,
|
|
14
|
-
status = _ref.status
|
|
15
|
-
|
|
14
|
+
status = _ref.status;
|
|
15
|
+
return /*#__PURE__*/React.createElement(UserOption, {
|
|
16
|
+
user: data,
|
|
17
|
+
status: status,
|
|
18
|
+
isSelected: isSelected
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var dataOption = function dataOption(_ref2) {
|
|
23
|
+
var data = _ref2.data.data,
|
|
24
|
+
isSelected = _ref2.isSelected,
|
|
25
|
+
status = _ref2.status,
|
|
26
|
+
selectProps = _ref2.selectProps;
|
|
16
27
|
|
|
17
28
|
if (isExternalUser(data)) {
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
+
return /*#__PURE__*/React.createElement(AsyncExternalOption, {
|
|
19
30
|
user: data,
|
|
20
31
|
status: status,
|
|
21
32
|
isSelected: isSelected
|
|
@@ -31,7 +42,7 @@ var dataOption = function dataOption(_ref) {
|
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
if (isEmail(data)) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(
|
|
45
|
+
return /*#__PURE__*/React.createElement(AsyncEmailOption, {
|
|
35
46
|
email: data,
|
|
36
47
|
emailValidity: isValidEmail(data.id),
|
|
37
48
|
isSelected: isSelected,
|
|
@@ -40,14 +51,14 @@ var dataOption = function dataOption(_ref) {
|
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
if (isTeam(data)) {
|
|
43
|
-
return /*#__PURE__*/React.createElement(
|
|
54
|
+
return /*#__PURE__*/React.createElement(AsyncTeamOption, {
|
|
44
55
|
team: data,
|
|
45
56
|
isSelected: isSelected
|
|
46
57
|
});
|
|
47
58
|
}
|
|
48
59
|
|
|
49
60
|
if (isGroup(data)) {
|
|
50
|
-
return /*#__PURE__*/React.createElement(
|
|
61
|
+
return /*#__PURE__*/React.createElement(AsyncGroupOption, {
|
|
51
62
|
group: data,
|
|
52
63
|
isSelected: isSelected
|
|
53
64
|
});
|
|
@@ -57,5 +68,7 @@ var dataOption = function dataOption(_ref) {
|
|
|
57
68
|
};
|
|
58
69
|
|
|
59
70
|
export var Option = function Option(props) {
|
|
60
|
-
return /*#__PURE__*/React.createElement(components.Option, props,
|
|
71
|
+
return /*#__PURE__*/React.createElement(components.Option, props, /*#__PURE__*/React.createElement(React.Suspense, {
|
|
72
|
+
fallback: defaultOption(props)
|
|
73
|
+
}, dataOption(props)));
|
|
61
74
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
+
var _excluded = ["ref"];
|
|
3
4
|
|
|
4
5
|
var _templateObject;
|
|
5
6
|
|
|
@@ -26,7 +27,7 @@ export var SingleValue = function SingleValue(props) {
|
|
|
26
27
|
primaryText: label
|
|
27
28
|
}, function (_ref) {
|
|
28
29
|
var ref = _ref.ref,
|
|
29
|
-
props = _objectWithoutProperties(_ref,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
|
|
31
32
|
return /*#__PURE__*/React.createElement(AvatarItemComponent, props);
|
|
32
33
|
}) : null;
|
|
@@ -7,6 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
10
|
+
var _excluded = ["children"];
|
|
10
11
|
|
|
11
12
|
var _templateObject;
|
|
12
13
|
|
|
@@ -68,7 +69,7 @@ export var SingleValueContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
68
69
|
value: function render() {
|
|
69
70
|
var _this$props2 = this.props,
|
|
70
71
|
children = _this$props2.children,
|
|
71
|
-
valueContainerProps = _objectWithoutProperties(_this$props2,
|
|
72
|
+
valueContainerProps = _objectWithoutProperties(_this$props2, _excluded);
|
|
72
73
|
|
|
73
74
|
return /*#__PURE__*/React.createElement(components.ValueContainer, valueContainerProps, /*#__PURE__*/React.createElement(PlaceholderIconContainer, null, this.renderAvatar()), children);
|
|
74
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
1
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
2
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
3
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
5
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
6
6
|
|
|
7
7
|
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,9 +11,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
11
11
|
import Avatar from '@atlaskit/avatar';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { getAvatarSize } from './utils';
|
|
14
|
-
export var Props = function Props() {
|
|
14
|
+
export var Props = /*#__PURE__*/_createClass(function Props() {
|
|
15
15
|
_classCallCheck(this, Props);
|
|
16
|
-
};
|
|
16
|
+
});
|
|
17
17
|
export var SizeableAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
18
18
|
_inherits(SizeableAvatar, _React$PureComponent);
|
|
19
19
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var AsyncTeamOption = /*#__PURE__*/React.lazy(function () {
|
|
3
|
+
return import(
|
|
4
|
+
/* webpackChunkName: "@atlaskit-internal_@atlassian/user-picker/team-option" */
|
|
5
|
+
'./main').then(function (module) {
|
|
6
|
+
return {
|
|
7
|
+
default: module.TeamOption
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
export default AsyncTeamOption;
|
|
@@ -15,10 +15,10 @@ import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
|
15
15
|
import { token } from '@atlaskit/tokens';
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import { FormattedMessage } from 'react-intl-next';
|
|
18
|
-
import { AvatarItemOption, TextWrapper } from '
|
|
19
|
-
import { HighlightText } from '
|
|
20
|
-
import { messages } from '
|
|
21
|
-
import { SizeableAvatar } from '
|
|
18
|
+
import { AvatarItemOption, TextWrapper } from '.././AvatarItemOption';
|
|
19
|
+
import { HighlightText } from '.././HighlightText';
|
|
20
|
+
import { messages } from '.././i18n';
|
|
21
|
+
import { SizeableAvatar } from '.././SizeableAvatar';
|
|
22
22
|
export var TeamOption = /*#__PURE__*/function (_React$PureComponent) {
|
|
23
23
|
_inherits(TeamOption, _React$PureComponent);
|
|
24
24
|
|
|
@@ -6,9 +6,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
10
|
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
12
|
|
|
13
13
|
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); }; }
|
|
14
14
|
|
|
@@ -23,6 +23,7 @@ import { getComponents } from './components';
|
|
|
23
23
|
import { getCreatableProps } from './creatable';
|
|
24
24
|
import { getCreatableSuggestedEmailProps } from './creatableEmailSuggestion';
|
|
25
25
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
26
|
+
import { ExusUserSourceProvider } from './../clients/UserSourceProvider';
|
|
26
27
|
export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
27
28
|
_inherits(UserPickerWithoutAnalytics, _React$Component);
|
|
28
29
|
|
|
@@ -48,7 +49,8 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
48
49
|
menuPosition = _this$props.menuPosition,
|
|
49
50
|
menuShouldBlockScroll = _this$props.menuShouldBlockScroll,
|
|
50
51
|
captureMenuScroll = _this$props.captureMenuScroll,
|
|
51
|
-
closeMenuOnScroll = _this$props.closeMenuOnScroll
|
|
52
|
+
closeMenuOnScroll = _this$props.closeMenuOnScroll,
|
|
53
|
+
loadUserSource = _this$props.loadUserSource;
|
|
52
54
|
var width = this.props.width;
|
|
53
55
|
var SelectComponent = allowEmail ? CreatableSelect : Select;
|
|
54
56
|
var creatableProps = suggestEmailsForDomain ? getCreatableSuggestedEmailProps(suggestEmailsForDomain, isValidEmail) : getCreatableProps(isValidEmail);
|
|
@@ -62,13 +64,15 @@ export var UserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component)
|
|
|
62
64
|
var pickerProps = allowEmail ? _objectSpread(_objectSpread(_objectSpread({}, defaultPickerProps), creatableProps), {}, {
|
|
63
65
|
emailLabel: emailLabel
|
|
64
66
|
}) : _objectSpread({}, defaultPickerProps);
|
|
65
|
-
return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(
|
|
67
|
+
return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(ExusUserSourceProvider, {
|
|
68
|
+
fetchUserSource: loadUserSource
|
|
69
|
+
}, /*#__PURE__*/React.createElement(BaseUserPickerWithoutAnalytics, _extends({}, this.props, {
|
|
66
70
|
width: width,
|
|
67
71
|
SelectComponent: SelectComponent,
|
|
68
72
|
styles: getStyles(width, isMulti, this.props.styles),
|
|
69
73
|
components: getComponents(isMulti, anchor),
|
|
70
74
|
pickerProps: pickerProps
|
|
71
|
-
})));
|
|
75
|
+
}))));
|
|
72
76
|
}
|
|
73
77
|
}]);
|
|
74
78
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import memoizeOne from 'memoize-one';
|
|
8
8
|
import { ClearIndicator } from './ClearIndicator';
|
|
@@ -65,6 +65,11 @@ export var messages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Found in:',
|
|
66
66
|
description: 'From where the external user is coming'
|
|
67
67
|
},
|
|
68
|
+
externalUserSourcesError: {
|
|
69
|
+
id: 'fabric.elements.user-picker.external.sourced.error',
|
|
70
|
+
defaultMessage: "We can't connect you right now.",
|
|
71
|
+
description: "Error message when we can't fetch a user's import sources"
|
|
72
|
+
},
|
|
68
73
|
slackProvider: {
|
|
69
74
|
id: 'fabric.elements.user-picker.slack.provider',
|
|
70
75
|
defaultMessage: 'Slack',
|
|
@@ -9,9 +9,9 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
11
11
|
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
13
|
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
15
|
|
|
16
16
|
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); }; }
|
|
17
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { transformUsers } from './users-transformer';
|
|
8
8
|
import { getConfig } from '../config';
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
var _excluded = ["paddingTop", "paddingBottom", "paddingLeft", "paddingRight"],
|
|
4
|
+
_excluded2 = ["paddingTop", "paddingBottom", "position"],
|
|
5
|
+
_excluded3 = ["margin"];
|
|
3
6
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
8
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
10
|
|
|
8
11
|
import { AVATAR_SIZES, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
9
12
|
import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
|
|
@@ -52,7 +55,7 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
52
55
|
paddingBottom = _ref.paddingBottom,
|
|
53
56
|
paddingLeft = _ref.paddingLeft,
|
|
54
57
|
paddingRight = _ref.paddingRight,
|
|
55
|
-
css = _objectWithoutProperties(_ref,
|
|
58
|
+
css = _objectWithoutProperties(_ref, _excluded);
|
|
56
59
|
|
|
57
60
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
58
61
|
opacity: 0,
|
|
@@ -73,7 +76,7 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
73
76
|
var paddingTop = _ref2.paddingTop,
|
|
74
77
|
paddingBottom = _ref2.paddingBottom,
|
|
75
78
|
position = _ref2.position,
|
|
76
|
-
css = _objectWithoutProperties(_ref2,
|
|
79
|
+
css = _objectWithoutProperties(_ref2, _excluded2);
|
|
77
80
|
|
|
78
81
|
var isCompact = state.selectProps.appearance === 'compact';
|
|
79
82
|
var isMulti = state.selectProps.isMulti;
|
|
@@ -142,7 +145,7 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
142
145
|
},
|
|
143
146
|
input: function input(_ref3) {
|
|
144
147
|
var margin = _ref3.margin,
|
|
145
|
-
css = _objectWithoutProperties(_ref3,
|
|
148
|
+
css = _objectWithoutProperties(_ref3, _excluded3);
|
|
146
149
|
|
|
147
150
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
148
151
|
display: 'flex',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import memoizeOne from 'memoize-one';
|
|
9
9
|
import { EmailType, TeamType, GroupType, UserType } from '../types';
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoadUserSource, UserSource } from '../types';
|
|
3
|
+
export interface UserSourceContext {
|
|
4
|
+
fetchUserSource?: LoadUserSource;
|
|
5
|
+
}
|
|
6
|
+
export declare const ExusUserSourceProvider: React.FC<UserSourceContext>;
|
|
7
|
+
export declare const useUserSource: (accountId: string, shouldFetchSources: boolean, existingSources?: UserSource[] | undefined) => {
|
|
8
|
+
sources: UserSource[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
};
|
|
@@ -48,7 +48,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
48
48
|
private getAppearance;
|
|
49
49
|
render(): JSX.Element;
|
|
50
50
|
}
|
|
51
|
-
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
51
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps"> & Partial<Pick<Pick<BaseUserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "SelectComponent" | "pickerProps">, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
52
52
|
isMulti: boolean;
|
|
53
53
|
subtle: boolean;
|
|
54
54
|
noBorder: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Email } from '
|
|
3
|
-
import { EmailValidationResponse } from '
|
|
2
|
+
import { Email } from '../../types';
|
|
3
|
+
import { EmailValidationResponse } from '../emailValidation';
|
|
4
4
|
export declare type EmailOptionProps = {
|
|
5
5
|
email: Email;
|
|
6
6
|
isSelected: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ExternalUser } from '
|
|
2
|
+
import { ExternalUser } from '../../types';
|
|
3
3
|
export declare const ImageContainer: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
4
4
|
export declare const SourcesTooltipContainer: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
5
5
|
export declare const SourceWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { UserSource } from '../types';
|
|
3
|
+
declare type SourcesChildrenFunc = ({ sources, sourcesLoading, sourcesError, }: {
|
|
4
|
+
sources: UserSource[];
|
|
5
|
+
sourcesLoading: boolean;
|
|
6
|
+
sourcesError: string | null;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
interface SourcesContainerProps {
|
|
9
|
+
accountId: string;
|
|
10
|
+
shouldFetchSources: boolean;
|
|
11
|
+
initialSources: UserSource[];
|
|
12
|
+
children: SourcesChildrenFunc;
|
|
13
|
+
}
|
|
14
|
+
export declare const ExternalUserSourcesContainer: React.FC<SourcesContainerProps>;
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Group } from '
|
|
2
|
+
import { Group } from '../../types';
|
|
3
3
|
export declare const GroupOptionIconWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
4
4
|
export declare type GroupOptionProps = {
|
|
5
5
|
group: Group;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
intl: IntlShape;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MessagesIntlProviderProps>> & {
|
|
7
|
-
WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
2
|
+
declare const MessagesIntlProvider: React.FC;
|
|
3
|
+
export default MessagesIntlProvider;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { OptionProps as AkOptionProps } from '@atlaskit/select';
|
|
1
2
|
import { FC } from 'react';
|
|
2
3
|
import { Option as OptionType } from '../types';
|
|
3
|
-
export declare type OptionProps = {
|
|
4
|
+
export declare type OptionProps = AkOptionProps & {
|
|
4
5
|
data: OptionType;
|
|
5
6
|
isSelected: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
isFocused: boolean;
|
|
6
9
|
status?: string;
|
|
7
10
|
selectProps: {
|
|
8
11
|
emailLabel?: string;
|