@atlaskit/user-picker 7.16.3 → 8.0.0
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 +60 -0
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/components/AvatarItemOption.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +3 -3
- package/dist/cjs/components/EmailOption.js +2 -2
- package/dist/cjs/components/ExternalUserOption.js +4 -4
- package/dist/cjs/components/GroupOption.js +3 -3
- package/dist/cjs/components/MessagesIntlProvider.js +4 -3
- package/dist/cjs/components/MultiValue.js +3 -3
- package/dist/cjs/components/MultiValueContainer.js +5 -3
- package/dist/cjs/components/PopupControl.js +38 -7
- package/dist/cjs/components/PopupUserPicker.js +1 -1
- package/dist/cjs/components/TeamOption.js +5 -5
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/creatable.js +5 -2
- package/dist/cjs/components/i18n.js +2 -2
- package/dist/cjs/components/smart-user-picker/components/index.js +3 -3
- package/dist/cjs/components/smart-user-picker/config/index.js +1 -1
- package/dist/cjs/components/smart-user-picker/index.js +4 -4
- package/dist/cjs/components/styles.js +9 -15
- package/dist/cjs/components/utils.js +1 -1
- package/dist/cjs/i18n/en_ZZ.js +38 -0
- package/dist/cjs/i18n/fi.js +2 -0
- package/dist/cjs/i18n/fr.js +3 -1
- package/dist/cjs/i18n/index.js +44 -36
- package/dist/cjs/i18n/uk.js +2 -0
- package/dist/cjs/i18n/zh_TW.js +2 -0
- package/dist/cjs/index.js +28 -28
- package/dist/cjs/types.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/BaseUserPicker.js +1 -1
- package/dist/es2019/components/EmailOption.js +1 -1
- package/dist/es2019/components/ExternalUserOption.js +1 -1
- package/dist/es2019/components/GroupOption.js +1 -1
- package/dist/es2019/components/MessagesIntlProvider.js +2 -1
- package/dist/es2019/components/MultiValue.js +1 -1
- package/dist/es2019/components/MultiValueContainer.js +7 -4
- package/dist/es2019/components/PopupControl.js +33 -6
- package/dist/es2019/components/TeamOption.js +1 -1
- package/dist/es2019/components/creatable.js +13 -8
- package/dist/es2019/components/i18n.js +1 -1
- package/dist/es2019/components/smart-user-picker/components/index.js +1 -1
- package/dist/es2019/components/styles.js +8 -8
- package/dist/es2019/i18n/en_ZZ.js +30 -0
- package/dist/es2019/i18n/fi.js +2 -0
- package/dist/es2019/i18n/fr.js +3 -1
- package/dist/es2019/i18n/index.js +1 -0
- package/dist/es2019/i18n/uk.js +2 -0
- package/dist/es2019/i18n/zh_TW.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/BaseUserPicker.js +1 -1
- package/dist/esm/components/EmailOption.js +1 -1
- package/dist/esm/components/ExternalUserOption.js +1 -1
- package/dist/esm/components/GroupOption.js +1 -1
- package/dist/esm/components/MessagesIntlProvider.js +2 -1
- package/dist/esm/components/MultiValue.js +1 -1
- package/dist/esm/components/MultiValueContainer.js +3 -2
- package/dist/esm/components/PopupControl.js +28 -7
- package/dist/esm/components/TeamOption.js +1 -1
- package/dist/esm/components/creatable.js +5 -2
- package/dist/esm/components/i18n.js +1 -1
- package/dist/esm/components/smart-user-picker/components/index.js +1 -1
- package/dist/esm/components/styles.js +8 -8
- package/dist/esm/i18n/en_ZZ.js +30 -0
- package/dist/esm/i18n/fi.js +2 -0
- package/dist/esm/i18n/fr.js +3 -1
- package/dist/esm/i18n/index.js +1 -0
- package/dist/esm/i18n/uk.js +2 -0
- package/dist/esm/i18n/zh_TW.js +2 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/MessagesIntlProvider.d.ts +4 -4
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/SingleValue.d.ts +1 -0
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/components/components.d.ts +4 -4
- package/dist/types/components/creatable.d.ts +5 -3
- package/dist/types/components/creatableEmailSuggestion.d.ts +2 -2
- package/dist/types/components/popup.d.ts +2 -2
- package/dist/types/components/smart-user-picker/service/recommendationClient.d.ts +2 -2
- package/dist/types/components/smart-user-picker/service/users-transformer.d.ts +3 -3
- package/dist/types/components/styles.d.ts +3 -3
- package/dist/types/components/utils.d.ts +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +30 -0
- package/dist/types/i18n/fi.d.ts +2 -0
- package/dist/types/i18n/fr.d.ts +2 -0
- package/dist/types/i18n/index.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +2 -0
- package/dist/types/i18n/zh_TW.d.ts +2 -0
- package/package.json +7 -8
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by i18n-tools.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
// English (Instrumented)
|
|
8
|
+
export default {
|
|
9
|
+
'fabric.elements.user-picker.email.add': 'Add user',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Enter an email address',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Select an email address',
|
|
12
|
+
'fabric.elements.user-picker.external.sourced.from': 'Found in:',
|
|
13
|
+
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
14
|
+
'fabric.elements.user-picker.google.provider': 'Google',
|
|
15
|
+
'fabric.elements.user-picker.group.byline': 'Admin-managed group',
|
|
16
|
+
'fabric.elements.user-picker.guest.lozenge.text': 'GUEST',
|
|
17
|
+
'fabric.elements.user-picker.guest.lozenge.tooltip.group': 'Guest groups can only access certain spaces and have limited access to user info.',
|
|
18
|
+
'fabric.elements.user-picker.guest.lozenge.tooltip.user': 'Guests can only access certain spaces and have limited access to user info.',
|
|
19
|
+
'fabric.elements.user-picker.member.lozenge.text': 'MEMBER',
|
|
20
|
+
'fabric.elements.user-picker.microsoft.provider': 'Microsoft',
|
|
21
|
+
'fabric.elements.user-picker.multi.remove-item': 'Remove',
|
|
22
|
+
'fabric.elements.user-picker.placeholder': 'Enter people or teams...',
|
|
23
|
+
'fabric.elements.user-picker.placeholder.add-more': 'add more people...',
|
|
24
|
+
'fabric.elements.user-picker.single.clear': 'Clear',
|
|
25
|
+
'fabric.elements.user-picker.slack.provider': 'Slack',
|
|
26
|
+
'fabric.elements.user-picker.team.member.50plus': 'Team • 50+ members',
|
|
27
|
+
'fabric.elements.user-picker.team.member.50plus.including.you': 'Team • 50+ members, including you',
|
|
28
|
+
'fabric.elements.user-picker.team.member.count': '{count, plural, one {Team • {count} member} other {Team • {count} members}}',
|
|
29
|
+
'fabric.elements.user-picker.team.member.count.including.you': '{count, plural, one {Team • {count} member, including you} other {Team • {count} members, including you}}'
|
|
30
|
+
};
|
package/dist/es2019/i18n/fi.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Finnish
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Lisää käyttäjä',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Anna sähköpostiosoite',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Valitse sähköpostiosoite',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Löydetty kohteesta:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
package/dist/es2019/i18n/fr.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// French
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Ajoutez un utilisateur',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Saisissez une adresse e-mail',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Sélectionnez une adresse e-mail',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Trouvé dans :',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
|
@@ -18,7 +20,7 @@ export default {
|
|
|
18
20
|
'fabric.elements.user-picker.microsoft.provider': 'Microsoft',
|
|
19
21
|
'fabric.elements.user-picker.multi.remove-item': 'Supprimer',
|
|
20
22
|
'fabric.elements.user-picker.placeholder': 'Saisissez des personnes ou des équipes…',
|
|
21
|
-
'fabric.elements.user-picker.placeholder.add-more': 'ajouter
|
|
23
|
+
'fabric.elements.user-picker.placeholder.add-more': 'ajouter plus de personnes…',
|
|
22
24
|
'fabric.elements.user-picker.single.clear': 'Effacer',
|
|
23
25
|
'fabric.elements.user-picker.slack.provider': 'Slack',
|
|
24
26
|
'fabric.elements.user-picker.team.member.50plus': 'Équipe • Plus de 50 membres',
|
|
@@ -29,6 +29,7 @@ export { default as th } from './th';
|
|
|
29
29
|
export { default as tr } from './tr';
|
|
30
30
|
export { default as uk } from './uk';
|
|
31
31
|
export { default as vi } from './vi';
|
|
32
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
32
33
|
export { default as en } from './en';
|
|
33
34
|
export { default as en_GB } from './en_GB';
|
|
34
35
|
export { default as is } from './is';
|
package/dist/es2019/i18n/uk.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Ukrainian
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Додайте користувача',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Введіть адресу електронної пошти',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Виберіть адресу електронної пошти',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Знайдено в:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// undefined
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': '新增使用者',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': '輸入電子郵件地址',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': '選取電子郵件地址',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': '尋找位置:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
package/dist/es2019/version.json
CHANGED
|
@@ -20,7 +20,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
20
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
21
21
|
import debounce from 'lodash/debounce';
|
|
22
22
|
import React from 'react';
|
|
23
|
-
import { FormattedMessage } from 'react-intl';
|
|
23
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
24
24
|
import { cancelEvent, clearEvent, createAndFireEventInElementsChannel, deleteEvent, failedEvent, focusEvent, searchedEvent, selectEvent, startSession } from '../analytics';
|
|
25
25
|
import { batchByKey } from './batch';
|
|
26
26
|
import { messages } from './i18n';
|
|
@@ -11,7 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
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
12
|
|
|
13
13
|
import React from 'react';
|
|
14
|
-
import { FormattedMessage } from 'react-intl';
|
|
14
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
15
15
|
import { B400, N200, N800 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { AddOptionAvatar } from './AddOptionAvatar';
|
|
17
17
|
import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
|
|
@@ -25,7 +25,7 @@ import { SlackIcon } from './assets/slack';
|
|
|
25
25
|
import { GoogleIcon } from './assets/google';
|
|
26
26
|
import { MicrosoftIcon } from './assets/microsoft';
|
|
27
27
|
import { GitHubIcon } from './assets/github';
|
|
28
|
-
import { FormattedMessage } from 'react-intl';
|
|
28
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
29
29
|
import { messages } from './i18n';
|
|
30
30
|
export var ImageContainer = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 12px;\n width: 12px;\n padding-right: 4px;\n"])));
|
|
31
31
|
export var SourcesTooltipContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-bottom: 4px;\n"])));
|
|
@@ -14,7 +14,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
14
14
|
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; } }
|
|
15
15
|
|
|
16
16
|
import React from 'react';
|
|
17
|
-
import { FormattedMessage } from 'react-intl';
|
|
17
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
18
18
|
import styled from 'styled-components';
|
|
19
19
|
import { N20, B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
20
20
|
import PeopleIcon from '@atlaskit/icon/glyph/people';
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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 { IntlProvider, injectIntl } from 'react-intl';
|
|
9
|
+
import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
10
10
|
import { getMessagesForLocale } from '../util/i18n-util';
|
|
11
11
|
var EMPTY = {};
|
|
12
12
|
|
|
@@ -42,6 +42,7 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
|
42
42
|
return _objectSpread(_objectSpread({}, intl.messages), messages);
|
|
43
43
|
}, [intl.messages, messages]);
|
|
44
44
|
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
45
|
+
locale: intl.locale,
|
|
45
46
|
messages: mergedMessages
|
|
46
47
|
}, children);
|
|
47
48
|
};
|
|
@@ -16,7 +16,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
16
16
|
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; } }
|
|
17
17
|
|
|
18
18
|
import React from 'react';
|
|
19
|
-
import { FormattedMessage } from 'react-intl';
|
|
19
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
20
20
|
import { components } from '@atlaskit/select';
|
|
21
21
|
import styled from 'styled-components';
|
|
22
22
|
import { AddOptionAvatar } from './AddOptionAvatar';
|
|
@@ -18,7 +18,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
18
18
|
import { components } from '@atlaskit/select';
|
|
19
19
|
import React from 'react';
|
|
20
20
|
import ReactDOM from 'react-dom';
|
|
21
|
-
import { FormattedMessage } from 'react-intl';
|
|
21
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
22
22
|
import { messages } from './i18n';
|
|
23
23
|
import { isChildInput } from './utils';
|
|
24
24
|
export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -57,11 +57,12 @@ export var MultiValueContainer = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
_defineProperty(_assertThisInitialized(_this), "addPlaceholder", function (placeholder) {
|
|
60
|
-
|
|
60
|
+
var children = React.Children.map(_this.props.children, function (child) {
|
|
61
61
|
return isChildInput(child) && _this.showPlaceholder() ? /*#__PURE__*/React.cloneElement(child, {
|
|
62
62
|
placeholder: placeholder
|
|
63
63
|
}) : child;
|
|
64
64
|
});
|
|
65
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
65
66
|
});
|
|
66
67
|
|
|
67
68
|
_defineProperty(_assertThisInitialized(_this), "renderChildren", function () {
|
|
@@ -5,17 +5,40 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
7
7
|
|
|
8
|
-
var _templateObject;
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
9
9
|
|
|
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
|
|
|
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
13
|
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import {
|
|
15
|
+
import { themed } from '@atlaskit/theme/components';
|
|
16
|
+
import { gridSize } from '@atlaskit/theme/constants';
|
|
16
17
|
import { components } from '@atlaskit/select';
|
|
17
|
-
import styled from 'styled-components';
|
|
18
|
-
|
|
18
|
+
import styled, { css } from 'styled-components';
|
|
19
|
+
import { N200, DN90 } from '@atlaskit/theme/colors';
|
|
20
|
+
var spacing = gridSize();
|
|
21
|
+
var fontSize = 12;
|
|
22
|
+
var innerHeight = spacing * 2; // 16px
|
|
23
|
+
|
|
24
|
+
var lineHeight = innerHeight / fontSize;
|
|
25
|
+
var ControlWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0px ", "px ", "px;\n"])), spacing, spacing);
|
|
26
|
+
var getColor = themed({
|
|
27
|
+
light: N200,
|
|
28
|
+
dark: DN90
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var getPadding = function getPadding() {
|
|
32
|
+
var right = 0;
|
|
33
|
+
var bottom = spacing / 2;
|
|
34
|
+
var left = 0;
|
|
35
|
+
var top = spacing * 2.5;
|
|
36
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px ", "px ", "px;\n "])), top, right, bottom, left);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var Label = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n font-weight: 600;\n line-height: ", ";\n ", "\n"])), function (props) {
|
|
40
|
+
return getColor(props);
|
|
41
|
+
}, fontSize, lineHeight, getPadding);
|
|
19
42
|
export var PopupControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
20
43
|
_inherits(PopupControl, _React$PureComponent);
|
|
21
44
|
|
|
@@ -31,9 +54,7 @@ export var PopupControl = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
31
54
|
key: "render",
|
|
32
55
|
value: function render() {
|
|
33
56
|
var popupTitle = this.props.selectProps.popupTitle;
|
|
34
|
-
return /*#__PURE__*/React.createElement(ControlWrapper, null, /*#__PURE__*/React.createElement(Label,
|
|
35
|
-
label: popupTitle
|
|
36
|
-
}), /*#__PURE__*/React.createElement(components.Control, this.props));
|
|
57
|
+
return /*#__PURE__*/React.createElement(ControlWrapper, null, /*#__PURE__*/React.createElement(Label, null, popupTitle), /*#__PURE__*/React.createElement(components.Control, this.props));
|
|
37
58
|
}
|
|
38
59
|
}]);
|
|
39
60
|
|
|
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
|
|
14
14
|
import { B400, N800, N200 } from '@atlaskit/theme/colors';
|
|
15
15
|
import React from 'react';
|
|
16
|
-
import { FormattedMessage } from 'react-intl';
|
|
16
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
17
17
|
import { AvatarItemOption, TextWrapper } from './AvatarItemOption';
|
|
18
18
|
import { HighlightText } from './HighlightText';
|
|
19
19
|
import { messages } from './i18n';
|
|
@@ -42,7 +42,7 @@ var isOptionDisabled = function isOptionDisabled() {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
function creatableProps(isValidEmail) {
|
|
46
46
|
return {
|
|
47
47
|
allowCreateWhileLoading: true,
|
|
48
48
|
createOptionPosition: 'first',
|
|
@@ -51,4 +51,7 @@ export var getCreatableProps = memoizeOne(function (isValidEmail) {
|
|
|
51
51
|
formatCreateLabel: formatCreateLabel,
|
|
52
52
|
isOptionDisabled: isOptionDisabled(isValidEmail)
|
|
53
53
|
};
|
|
54
|
-
}
|
|
54
|
+
} // ignoring the 'clear' memoizeOne function object property
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export var getCreatableProps = memoizeOne(creatableProps);
|
|
@@ -22,7 +22,7 @@ import debounce from 'lodash/debounce';
|
|
|
22
22
|
import uuidV4 from 'uuid/v4';
|
|
23
23
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
24
24
|
import memoizeOne from 'memoize-one';
|
|
25
|
-
import { injectIntl } from 'react-intl';
|
|
25
|
+
import { injectIntl } from 'react-intl-next';
|
|
26
26
|
import { requestUsersEvent, filterUsersEvent, preparedUsersLoadedEvent, successfulRequestUsersEvent, failedRequestUsersEvent, mountedWithPrefetchEvent, createAndFireEventInElementsChannel } from '../../../analytics';
|
|
27
27
|
import { UserType } from '../../../types';
|
|
28
28
|
import { UserPicker } from '../../UserPicker';
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7
7
|
|
|
8
8
|
import { AVATAR_SIZES, BORDER_WIDTH } from '@atlaskit/avatar';
|
|
9
|
-
import
|
|
9
|
+
import { B100, N0, N10, N20, N30, N40, N100, R50, R400 } from '@atlaskit/theme/colors';
|
|
10
10
|
import memoizeOne from 'memoize-one';
|
|
11
11
|
import { getAvatarSize } from './utils';
|
|
12
12
|
import { mergeStyles } from '@atlaskit/select';
|
|
@@ -28,14 +28,14 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
28
28
|
var isMulti = state.selectProps.isMulti;
|
|
29
29
|
return _objectSpread(_objectSpread({}, css), {}, {
|
|
30
30
|
width: width,
|
|
31
|
-
borderColor: state.isFocused ? css.borderColor : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' :
|
|
32
|
-
backgroundColor: state.isFocused ? css['backgroundColor'] : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ?
|
|
31
|
+
borderColor: state.isFocused ? css.borderColor : state.selectProps.subtle || state.selectProps.noBorder ? 'transparent' : N40,
|
|
32
|
+
backgroundColor: state.isFocused ? css['backgroundColor'] : state.selectProps.subtle ? 'transparent' : state.selectProps.textFieldBackgroundColor ? N10 : N20,
|
|
33
33
|
'&:hover .fabric-user-picker__clear-indicator': {
|
|
34
34
|
opacity: 1
|
|
35
35
|
},
|
|
36
36
|
':hover': _objectSpread(_objectSpread({}, css[':hover']), {}, {
|
|
37
|
-
borderColor: state.isFocused ? css[':hover'] ? css[':hover'].borderColor :
|
|
38
|
-
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ?
|
|
37
|
+
borderColor: state.isFocused ? css[':hover'] ? css[':hover'].borderColor : B100 : state.selectProps.subtle ? state.selectProps.hoveringClearIndicator ? R50 : N30 : N40,
|
|
38
|
+
backgroundColor: state.selectProps.subtle && state.selectProps.hoveringClearIndicator ? R50 : state.isFocused ? css[':hover'] ? css[':hover'].backgroundColor : N0 : state.isDisabled ? N10 : N30
|
|
39
39
|
}),
|
|
40
40
|
padding: 0,
|
|
41
41
|
minHeight: isCompact ? 'none' : 44,
|
|
@@ -59,7 +59,7 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
59
59
|
paddingTop: 0,
|
|
60
60
|
padding: 0,
|
|
61
61
|
':hover': {
|
|
62
|
-
color:
|
|
62
|
+
color: R400
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
},
|
|
@@ -157,14 +157,14 @@ export var getStyles = memoizeOne(function (width, isMulti, overrideStyles) {
|
|
|
157
157
|
paddingLeft: isMulti ? 0 : AVATAR_PADDING,
|
|
158
158
|
'& input::placeholder': {
|
|
159
159
|
/* Chrome, Firefox, Opera, Safari 10.1+ */
|
|
160
|
-
color:
|
|
160
|
+
color: N100,
|
|
161
161
|
opacity: 1
|
|
162
162
|
/* Firefox */
|
|
163
163
|
|
|
164
164
|
},
|
|
165
165
|
'& input:-ms-input-placeholder': {
|
|
166
166
|
/* Internet Explorer 10-11 */
|
|
167
|
-
color:
|
|
167
|
+
color: N100
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by i18n-tools.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
// English (Instrumented)
|
|
8
|
+
export default {
|
|
9
|
+
'fabric.elements.user-picker.email.add': 'Add user',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Enter an email address',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Select an email address',
|
|
12
|
+
'fabric.elements.user-picker.external.sourced.from': 'Found in:',
|
|
13
|
+
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
14
|
+
'fabric.elements.user-picker.google.provider': 'Google',
|
|
15
|
+
'fabric.elements.user-picker.group.byline': 'Admin-managed group',
|
|
16
|
+
'fabric.elements.user-picker.guest.lozenge.text': 'GUEST',
|
|
17
|
+
'fabric.elements.user-picker.guest.lozenge.tooltip.group': 'Guest groups can only access certain spaces and have limited access to user info.',
|
|
18
|
+
'fabric.elements.user-picker.guest.lozenge.tooltip.user': 'Guests can only access certain spaces and have limited access to user info.',
|
|
19
|
+
'fabric.elements.user-picker.member.lozenge.text': 'MEMBER',
|
|
20
|
+
'fabric.elements.user-picker.microsoft.provider': 'Microsoft',
|
|
21
|
+
'fabric.elements.user-picker.multi.remove-item': 'Remove',
|
|
22
|
+
'fabric.elements.user-picker.placeholder': 'Enter people or teams...',
|
|
23
|
+
'fabric.elements.user-picker.placeholder.add-more': 'add more people...',
|
|
24
|
+
'fabric.elements.user-picker.single.clear': 'Clear',
|
|
25
|
+
'fabric.elements.user-picker.slack.provider': 'Slack',
|
|
26
|
+
'fabric.elements.user-picker.team.member.50plus': 'Team • 50+ members',
|
|
27
|
+
'fabric.elements.user-picker.team.member.50plus.including.you': 'Team • 50+ members, including you',
|
|
28
|
+
'fabric.elements.user-picker.team.member.count': '{count, plural, one {Team • {count} member} other {Team • {count} members}}',
|
|
29
|
+
'fabric.elements.user-picker.team.member.count.including.you': '{count, plural, one {Team • {count} member, including you} other {Team • {count} members, including you}}'
|
|
30
|
+
};
|
package/dist/esm/i18n/fi.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Finnish
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Lisää käyttäjä',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Anna sähköpostiosoite',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Valitse sähköpostiosoite',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Löydetty kohteesta:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
package/dist/esm/i18n/fr.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// French
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Ajoutez un utilisateur',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Saisissez une adresse e-mail',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Sélectionnez une adresse e-mail',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Trouvé dans :',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
|
@@ -18,7 +20,7 @@ export default {
|
|
|
18
20
|
'fabric.elements.user-picker.microsoft.provider': 'Microsoft',
|
|
19
21
|
'fabric.elements.user-picker.multi.remove-item': 'Supprimer',
|
|
20
22
|
'fabric.elements.user-picker.placeholder': 'Saisissez des personnes ou des équipes…',
|
|
21
|
-
'fabric.elements.user-picker.placeholder.add-more': 'ajouter
|
|
23
|
+
'fabric.elements.user-picker.placeholder.add-more': 'ajouter plus de personnes…',
|
|
22
24
|
'fabric.elements.user-picker.single.clear': 'Effacer',
|
|
23
25
|
'fabric.elements.user-picker.slack.provider': 'Slack',
|
|
24
26
|
'fabric.elements.user-picker.team.member.50plus': 'Équipe • Plus de 50 membres',
|
package/dist/esm/i18n/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { default as th } from './th';
|
|
|
29
29
|
export { default as tr } from './tr';
|
|
30
30
|
export { default as uk } from './uk';
|
|
31
31
|
export { default as vi } from './vi';
|
|
32
|
+
export { default as en_ZZ } from './en_ZZ';
|
|
32
33
|
export { default as en } from './en';
|
|
33
34
|
export { default as en_GB } from './en_GB';
|
|
34
35
|
export { default as is } from './is';
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Ukrainian
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': 'Додайте користувача',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': 'Введіть адресу електронної пошти',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': 'Виберіть адресу електронної пошти',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': 'Знайдено в:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// undefined
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.elements.user-picker.email.add': '新增使用者',
|
|
10
|
+
'fabric.elements.user-picker.email.add.potential': '輸入電子郵件地址',
|
|
11
|
+
'fabric.elements.user-picker.email.select.to.add': '選取電子郵件地址',
|
|
10
12
|
'fabric.elements.user-picker.external.sourced.from': '尋找位置:',
|
|
11
13
|
'fabric.elements.user-picker.github.provider': 'GitHub',
|
|
12
14
|
'fabric.elements.user-picker.google.provider': 'Google',
|
package/dist/esm/version.json
CHANGED
|
@@ -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, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "
|
|
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<{
|
|
52
52
|
isMulti: boolean;
|
|
53
53
|
subtle: boolean;
|
|
54
54
|
noBorder: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IntlShape } from 'react-intl-next';
|
|
3
3
|
export interface MessagesIntlProviderProps {
|
|
4
|
-
intl:
|
|
4
|
+
intl: IntlShape;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: React.
|
|
7
|
-
WrappedComponent:
|
|
6
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MessagesIntlProviderProps>> & {
|
|
7
|
+
WrappedComponent: React.ComponentType<MessagesIntlProviderProps>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -27,7 +27,7 @@ export declare class PopupUserPickerWithoutAnalytics extends React.Component<Pop
|
|
|
27
27
|
};
|
|
28
28
|
render(): JSX.Element;
|
|
29
29
|
}
|
|
30
|
-
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Pick<PopupUserPickerProps, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Pick<PopupUserPickerProps, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle"> & Partial<Pick<Pick<PopupUserPickerProps, "placeholder" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "offset" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "popupTitle" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">, "isMulti" | "offset" | "width" | "boundariesElement" | "placement" | "rootBoundary" | "shouldFlip">> & Partial<Pick<{
|
|
31
31
|
boundariesElement: string;
|
|
32
32
|
width: number;
|
|
33
33
|
isMulti: boolean;
|
|
@@ -7,7 +7,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
|
|
|
7
7
|
};
|
|
8
8
|
render(): JSX.Element;
|
|
9
9
|
}
|
|
10
|
-
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Pick<UserPickerProps, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "isMulti" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "
|
|
10
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Pick<UserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "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">, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isDisabled" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions"> & Partial<Pick<Pick<UserPickerProps, "placeholder" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "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">, "isMulti" | "width">> & Partial<Pick<{
|
|
11
11
|
width: number;
|
|
12
12
|
isMulti: boolean;
|
|
13
13
|
}, never>> & React.RefAttributes<any>>;
|
|
@@ -9,7 +9,7 @@ import { PopupControl } from './PopupControl';
|
|
|
9
9
|
/**
|
|
10
10
|
* Memoize getComponents to avoid rerenders.
|
|
11
11
|
*/
|
|
12
|
-
export declare const getComponents: (multi?: boolean | undefined, anchor?: import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined) => {
|
|
12
|
+
export declare const getComponents: import("memoize-one").MemoizedFn<(multi?: boolean | undefined, anchor?: import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined) => {
|
|
13
13
|
Control: import("react").ComponentType<any>;
|
|
14
14
|
Option: import("react").FC<import("./Option").OptionProps>;
|
|
15
15
|
MultiValue?: undefined;
|
|
@@ -30,8 +30,8 @@ export declare const getComponents: (multi?: boolean | undefined, anchor?: impor
|
|
|
30
30
|
ValueContainer: typeof MultiValueContainer | typeof SingleValueContainer;
|
|
31
31
|
Input: typeof Input;
|
|
32
32
|
Control?: undefined;
|
|
33
|
-
}
|
|
34
|
-
export declare const getPopupComponents: (hasPopupTitle: boolean) => {
|
|
33
|
+
}>;
|
|
34
|
+
export declare const getPopupComponents: import("memoize-one").MemoizedFn<(hasPopupTitle: boolean) => {
|
|
35
35
|
DropdownIndicator: null;
|
|
36
36
|
SingleValue: (props: {
|
|
37
37
|
data: import("..").Option<import("..").OptionData>;
|
|
@@ -52,4 +52,4 @@ export declare const getPopupComponents: (hasPopupTitle: boolean) => {
|
|
|
52
52
|
Option: import("react").FC<import("./Option").OptionProps>;
|
|
53
53
|
ValueContainer: typeof SingleValueContainer;
|
|
54
54
|
Input: typeof PopupInput;
|
|
55
|
-
}
|
|
55
|
+
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Option } from '../types';
|
|
2
2
|
import { EmailValidator } from './emailValidation';
|
|
3
|
-
|
|
3
|
+
declare function creatableProps(isValidEmail?: EmailValidator): {
|
|
4
4
|
allowCreateWhileLoading: boolean;
|
|
5
5
|
createOptionPosition: string;
|
|
6
6
|
isValidNewOption: (inputValue?: string | undefined) => boolean | "" | undefined;
|
|
7
|
-
getNewOptionData: (inputValue: string) => Option
|
|
7
|
+
getNewOptionData: (inputValue: string) => Option<import("../types").OptionData>;
|
|
8
8
|
formatCreateLabel: (inputText?: string | undefined) => string;
|
|
9
|
-
isOptionDisabled: (option: Option) => boolean;
|
|
9
|
+
isOptionDisabled: (option: Option<import("../types").OptionData>) => boolean;
|
|
10
10
|
};
|
|
11
|
+
export declare const getCreatableProps: typeof creatableProps;
|
|
12
|
+
export {};
|