@atlaskit/user-picker 10.2.1 → 10.2.3
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 +12 -0
- package/dist/cjs/components/BaseUserPicker.js +14 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/BaseUserPicker.js +11 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/BaseUserPicker.js +14 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/BaseUserPicker.d.ts +1 -0
- package/dist/types-ts4.5/analytics.d.ts +24 -0
- package/dist/types-ts4.5/clients/UserSourceProvider.d.ts +11 -0
- package/dist/types-ts4.5/components/AddOptionAvatar.d.ts +6 -0
- package/dist/types-ts4.5/components/AvatarItemOption.d.ts +13 -0
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +64 -0
- package/dist/types-ts4.5/components/ClearIndicator.d.ts +6 -0
- package/dist/types-ts4.5/components/CustomOption/index.d.ts +3 -0
- package/dist/types-ts4.5/components/CustomOption/main.d.ts +15 -0
- package/dist/types-ts4.5/components/EmailOption/index.d.ts +3 -0
- package/dist/types-ts4.5/components/EmailOption/main.d.ts +18 -0
- package/dist/types-ts4.5/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +11 -0
- package/dist/types-ts4.5/components/ExternalUserOption/InfoIcon.d.ts +3 -0
- package/dist/types-ts4.5/components/ExternalUserOption/SourcesTooltipContent.d.ts +6 -0
- package/dist/types-ts4.5/components/ExternalUserOption/index.d.ts +3 -0
- package/dist/types-ts4.5/components/ExternalUserOption/main.d.ts +12 -0
- package/dist/types-ts4.5/components/ExternalUserSourcesContainer.d.ts +15 -0
- package/dist/types-ts4.5/components/GroupOption/index.d.ts +3 -0
- package/dist/types-ts4.5/components/GroupOption/main.d.ts +16 -0
- package/dist/types-ts4.5/components/HighlightText.d.ts +9 -0
- package/dist/types-ts4.5/components/Input.d.ts +11 -0
- package/dist/types-ts4.5/components/MessagesIntlProvider.d.ts +3 -0
- package/dist/types-ts4.5/components/MultiValue.d.ts +26 -0
- package/dist/types-ts4.5/components/MultiValueContainer.d.ts +30 -0
- package/dist/types-ts4.5/components/Option.d.ts +14 -0
- package/dist/types-ts4.5/components/PopupControl.d.ts +7 -0
- package/dist/types-ts4.5/components/PopupInput.d.ts +13 -0
- package/dist/types-ts4.5/components/PopupUserPicker.d.ts +39 -0
- package/dist/types-ts4.5/components/SingleValue.d.ts +5 -0
- package/dist/types-ts4.5/components/SingleValueContainer.d.ts +9 -0
- package/dist/types-ts4.5/components/SizeableAvatar.d.ts +10 -0
- package/dist/types-ts4.5/components/TeamOption/index.d.ts +3 -0
- package/dist/types-ts4.5/components/TeamOption/main.d.ts +16 -0
- package/dist/types-ts4.5/components/UserOption.d.ts +15 -0
- package/dist/types-ts4.5/components/UserPicker.d.ts +16 -0
- package/dist/types-ts4.5/components/assets/github.d.ts +2 -0
- package/dist/types-ts4.5/components/assets/google.d.ts +2 -0
- package/dist/types-ts4.5/components/assets/microsoft.d.ts +2 -0
- package/dist/types-ts4.5/components/assets/slack.d.ts +2 -0
- package/dist/types-ts4.5/components/batch.d.ts +1 -0
- package/dist/types-ts4.5/components/components.d.ts +46 -0
- package/dist/types-ts4.5/components/creatable.d.ts +12 -0
- package/dist/types-ts4.5/components/creatableEmailSuggestion.d.ts +19 -0
- package/dist/types-ts4.5/components/emailValidation.d.ts +3 -0
- package/dist/types-ts4.5/components/i18n.d.ts +132 -0
- package/dist/types-ts4.5/components/popup.d.ts +48 -0
- package/dist/types-ts4.5/components/styles.d.ts +42 -0
- package/dist/types-ts4.5/components/utils.d.ts +29 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +35 -0
- package/dist/types-ts4.5/i18n/da.d.ts +35 -0
- package/dist/types-ts4.5/i18n/de.d.ts +35 -0
- package/dist/types-ts4.5/i18n/en.d.ts +35 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +35 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +34 -0
- package/dist/types-ts4.5/i18n/es.d.ts +35 -0
- package/dist/types-ts4.5/i18n/et.d.ts +15 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +35 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +35 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +35 -0
- package/dist/types-ts4.5/i18n/index.d.ts +36 -0
- package/dist/types-ts4.5/i18n/is.d.ts +7 -0
- package/dist/types-ts4.5/i18n/it.d.ts +35 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +35 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +35 -0
- package/dist/types-ts4.5/i18n/languages.d.ts +27 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +35 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +35 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +35 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +35 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +15 -0
- package/dist/types-ts4.5/i18n/ro.d.ts +7 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +35 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +15 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +35 -0
- package/dist/types-ts4.5/i18n/th.d.ts +35 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +35 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +35 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +35 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +35 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +35 -0
- package/dist/types-ts4.5/index.d.ts +7 -0
- package/dist/types-ts4.5/types.d.ts +316 -0
- package/dist/types-ts4.5/util/i18n-util.d.ts +11 -0
- package/dist/types-ts4.5/util/ufoExperiences.d.ts +10 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/user-picker
|
|
2
2
|
|
|
3
|
+
## 10.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e8dbb0a281b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e8dbb0a281b) - add a11y support for alert messages
|
|
8
|
+
|
|
9
|
+
## 10.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
14
|
+
|
|
3
15
|
## 10.2.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -24,6 +24,8 @@ var _batch = require("./batch");
|
|
|
24
24
|
var _i18n = require("./i18n");
|
|
25
25
|
var _utils = require("./utils");
|
|
26
26
|
var _ufoExperiences = require("../util/ufoExperiences");
|
|
27
|
+
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; }
|
|
28
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
27
29
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
28
30
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
31
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -412,6 +414,17 @@ var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
|
412
414
|
this.optionsShownUfoExperienceInstance.success();
|
|
413
415
|
}
|
|
414
416
|
}
|
|
417
|
+
}, {
|
|
418
|
+
key: "ariaProps",
|
|
419
|
+
get: function get() {
|
|
420
|
+
var ariaLabels = Object.keys(this.props).filter(function (key) {
|
|
421
|
+
return key.startsWith('aria-');
|
|
422
|
+
});
|
|
423
|
+
var props = _objectSpread({}, this.props);
|
|
424
|
+
return ariaLabels.reduce(function (obj, key) {
|
|
425
|
+
return _objectSpread(_objectSpread({}, obj), {}, (0, _defineProperty2.default)({}, key, props[key]));
|
|
426
|
+
}, {});
|
|
427
|
+
}
|
|
415
428
|
}, {
|
|
416
429
|
key: "render",
|
|
417
430
|
value: function render() {
|
|
@@ -499,7 +512,7 @@ var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Component) {
|
|
|
499
512
|
onKeyDown: this.handleKeyDown,
|
|
500
513
|
maxPickerHeight: maxPickerHeight,
|
|
501
514
|
textFieldBackgroundColor: textFieldBackgroundColor
|
|
502
|
-
}, pickerProps));
|
|
515
|
+
}, this.ariaProps, pickerProps));
|
|
503
516
|
}
|
|
504
517
|
}], [{
|
|
505
518
|
key: "getDerivedStateFromProps",
|
package/dist/cjs/version.json
CHANGED
|
@@ -397,6 +397,16 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
397
397
|
this.optionsShownUfoExperienceInstance.success();
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
+
get ariaProps() {
|
|
401
|
+
const ariaLabels = Object.keys(this.props).filter(key => key.startsWith('aria-'));
|
|
402
|
+
const props = {
|
|
403
|
+
...this.props
|
|
404
|
+
};
|
|
405
|
+
return ariaLabels.reduce((obj, key) => ({
|
|
406
|
+
...obj,
|
|
407
|
+
[key]: props[key]
|
|
408
|
+
}), {});
|
|
409
|
+
}
|
|
400
410
|
render() {
|
|
401
411
|
const {
|
|
402
412
|
isMulti,
|
|
@@ -484,7 +494,7 @@ export class BaseUserPickerWithoutAnalytics extends React.Component {
|
|
|
484
494
|
onKeyDown: this.handleKeyDown,
|
|
485
495
|
maxPickerHeight: maxPickerHeight,
|
|
486
496
|
textFieldBackgroundColor: textFieldBackgroundColor
|
|
487
|
-
}, pickerProps));
|
|
497
|
+
}, this.ariaProps, pickerProps));
|
|
488
498
|
}
|
|
489
499
|
}
|
|
490
500
|
_defineProperty(BaseUserPickerWithoutAnalytics, "defaultProps", {
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,6 +6,8 @@ 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
|
+
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
|
+
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; }
|
|
9
11
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
10
12
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -405,6 +407,17 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
405
407
|
this.optionsShownUfoExperienceInstance.success();
|
|
406
408
|
}
|
|
407
409
|
}
|
|
410
|
+
}, {
|
|
411
|
+
key: "ariaProps",
|
|
412
|
+
get: function get() {
|
|
413
|
+
var ariaLabels = Object.keys(this.props).filter(function (key) {
|
|
414
|
+
return key.startsWith('aria-');
|
|
415
|
+
});
|
|
416
|
+
var props = _objectSpread({}, this.props);
|
|
417
|
+
return ariaLabels.reduce(function (obj, key) {
|
|
418
|
+
return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, key, props[key]));
|
|
419
|
+
}, {});
|
|
420
|
+
}
|
|
408
421
|
}, {
|
|
409
422
|
key: "render",
|
|
410
423
|
value: function render() {
|
|
@@ -492,7 +505,7 @@ export var BaseUserPickerWithoutAnalytics = /*#__PURE__*/function (_React$Compon
|
|
|
492
505
|
onKeyDown: this.handleKeyDown,
|
|
493
506
|
maxPickerHeight: maxPickerHeight,
|
|
494
507
|
textFieldBackgroundColor: textFieldBackgroundColor
|
|
495
|
-
}, pickerProps));
|
|
508
|
+
}, this.ariaProps, pickerProps));
|
|
496
509
|
}
|
|
497
510
|
}], [{
|
|
498
511
|
key: "getDerivedStateFromProps",
|
package/dist/esm/version.json
CHANGED
|
@@ -51,6 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
51
51
|
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
52
52
|
private getOptions;
|
|
53
53
|
private getAppearance;
|
|
54
|
+
get ariaProps(): {};
|
|
54
55
|
render(): JSX.Element;
|
|
55
56
|
}
|
|
56
57
|
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "noOptionsMessage" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "loadOptionsErrorMessage" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { UserPickerProps, UserPickerState } from './types';
|
|
3
|
+
export type UserPickerSession = {
|
|
4
|
+
id: string;
|
|
5
|
+
start: number;
|
|
6
|
+
inputChangeTime: number;
|
|
7
|
+
upCount: number;
|
|
8
|
+
downCount: number;
|
|
9
|
+
lastKey?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const startSession: () => UserPickerSession;
|
|
12
|
+
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
13
|
+
export interface EventCreator {
|
|
14
|
+
(props: UserPickerProps, state: UserPickerState, session?: UserPickerSession): AnalyticsEventPayload;
|
|
15
|
+
(props: UserPickerProps, state: UserPickerState, session?: UserPickerSession, ...args: any[]): AnalyticsEventPayload;
|
|
16
|
+
}
|
|
17
|
+
export declare const focusEvent: EventCreator;
|
|
18
|
+
export declare const clearEvent: EventCreator;
|
|
19
|
+
export declare const deleteEvent: EventCreator;
|
|
20
|
+
export declare const cancelEvent: EventCreator;
|
|
21
|
+
export declare const selectEvent: EventCreator;
|
|
22
|
+
export declare const searchedEvent: EventCreator;
|
|
23
|
+
export declare const failedEvent: EventCreator;
|
|
24
|
+
export declare const userInfoEvent: (sources: string[], accountId: string) => AnalyticsEventPayload;
|
|
@@ -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[]) => {
|
|
8
|
+
sources: UserSource[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { LozengeProps } from '../types';
|
|
5
|
+
export declare const textWrapper: (color?: string) => import("@emotion/react").SerializedStyles;
|
|
6
|
+
export type AvatarItemOptionProps = {
|
|
7
|
+
avatar: ReactNode;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
lozenge?: ReactNode | LozengeProps;
|
|
10
|
+
primaryText?: ReactNode;
|
|
11
|
+
secondaryText?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const AvatarItemOption: ({ avatar, isDisabled, lozenge, primaryText, secondaryText, }: AvatarItemOptionProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserPickerProps, UserPickerState } from '../types';
|
|
3
|
+
export type BaseUserPickerProps = UserPickerProps & {
|
|
4
|
+
SelectComponent: React.ComponentClass<any>;
|
|
5
|
+
pickerProps?: any;
|
|
6
|
+
styles: any;
|
|
7
|
+
components: any;
|
|
8
|
+
width: string | number;
|
|
9
|
+
};
|
|
10
|
+
export declare class BaseUserPickerWithoutAnalytics extends React.Component<BaseUserPickerProps, UserPickerState> {
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
isMulti: boolean;
|
|
13
|
+
subtle: boolean;
|
|
14
|
+
noBorder: boolean;
|
|
15
|
+
textFieldBackgroundColor: boolean;
|
|
16
|
+
isClearable: boolean;
|
|
17
|
+
loadOptionsErrorMessage: () => JSX.Element;
|
|
18
|
+
};
|
|
19
|
+
static getDerivedStateFromProps(nextProps: Partial<UserPickerProps>, prevState: UserPickerState): Partial<UserPickerState>;
|
|
20
|
+
private selectRef;
|
|
21
|
+
private session?;
|
|
22
|
+
private journeyId?;
|
|
23
|
+
private optionsShownUfoExperienceInstance;
|
|
24
|
+
constructor(props: BaseUserPickerProps);
|
|
25
|
+
private getSessionId;
|
|
26
|
+
private withSelectRef;
|
|
27
|
+
nextOption: () => void;
|
|
28
|
+
previousOption: () => void;
|
|
29
|
+
focus: () => void;
|
|
30
|
+
blur: () => void;
|
|
31
|
+
selectOption: () => void;
|
|
32
|
+
private handleChange;
|
|
33
|
+
private handleSelectRef;
|
|
34
|
+
private addOptions;
|
|
35
|
+
private handleLoadOptionsError;
|
|
36
|
+
private debouncedLoadOptions;
|
|
37
|
+
abortOptionsShownUfoExperience: () => void;
|
|
38
|
+
startOptionsShownUfoExperience: () => void;
|
|
39
|
+
private executeLoadOptions;
|
|
40
|
+
private handleFocus;
|
|
41
|
+
private resetInputState;
|
|
42
|
+
private handleBlur;
|
|
43
|
+
private handleOpen;
|
|
44
|
+
private handleClose;
|
|
45
|
+
private handleInputChange;
|
|
46
|
+
private fireEvent;
|
|
47
|
+
private startSession;
|
|
48
|
+
componentDidMount(): void;
|
|
49
|
+
componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
|
|
50
|
+
private handleKeyDown;
|
|
51
|
+
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
52
|
+
private getOptions;
|
|
53
|
+
private getAppearance;
|
|
54
|
+
get ariaProps(): {};
|
|
55
|
+
render(): JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "noOptionsMessage" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "SelectComponent" | "pickerProps"> & Partial<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isClearable" | "isMulti" | "textFieldBackgroundColor" | "loadOptionsErrorMessage" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
58
|
+
isMulti: boolean;
|
|
59
|
+
subtle: boolean;
|
|
60
|
+
noBorder: boolean;
|
|
61
|
+
textFieldBackgroundColor: boolean;
|
|
62
|
+
isClearable: boolean;
|
|
63
|
+
loadOptionsErrorMessage: () => JSX.Element;
|
|
64
|
+
}, never>> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Custom } from '../../types';
|
|
4
|
+
export type CustomOptionProps = {
|
|
5
|
+
data: Custom;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class CustomOption extends React.PureComponent<CustomOptionProps> {
|
|
9
|
+
private getPrimaryText;
|
|
10
|
+
private getBylineComponent;
|
|
11
|
+
private renderByline;
|
|
12
|
+
private renderAvatar;
|
|
13
|
+
private getLozengeProps;
|
|
14
|
+
render(): jsx.JSX.Element;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { Email } from '../../types';
|
|
5
|
+
import { EmailValidationResponse } from '../emailValidation';
|
|
6
|
+
export type EmailOptionProps = {
|
|
7
|
+
email: Email;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
emailValidity: EmailValidationResponse;
|
|
11
|
+
};
|
|
12
|
+
export declare class EmailOption extends React.PureComponent<EmailOptionProps> {
|
|
13
|
+
private getLozengeProps;
|
|
14
|
+
private renderPrimaryText;
|
|
15
|
+
private renderSecondaryText;
|
|
16
|
+
private renderOption;
|
|
17
|
+
render(): jsx.JSX.Element;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export type ExternalAvatarItemOptionProps = {
|
|
5
|
+
avatar: ReactNode;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
primaryText: ReactNode;
|
|
8
|
+
secondaryText?: ReactNode;
|
|
9
|
+
sourcesInfoTooltip?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const ExternalAvatarItemOption: ({ avatar, isDisabled, primaryText, secondaryText, sourcesInfoTooltip, }: ExternalAvatarItemOptionProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ExternalUserSourcesData } from '../ExternalUserSourcesContainer';
|
|
4
|
+
export declare const sourcesTooltipContainer: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const sourceWrapper: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const SourcesTooltipContent: React.FC<ExternalUserSourcesData>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const AsyncExternalUserOption: React.LazyExoticComponent<React.ForwardRefExoticComponent<Omit<import("./main").ExternalUserOptionProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>>;
|
|
3
|
+
export default AsyncExternalUserOption;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import { ExternalUser } from '../../types';
|
|
5
|
+
export declare const imageContainer: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const emailDomainWrapper: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export type ExternalUserOptionProps = WithAnalyticsEventsProps & {
|
|
8
|
+
user: ExternalUser;
|
|
9
|
+
status?: string;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const ExternalUserOption: React.ForwardRefExoticComponent<Omit<ExternalUserOptionProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { UserSource } from '../types';
|
|
3
|
+
export interface ExternalUserSourcesData {
|
|
4
|
+
sources: UserSource[];
|
|
5
|
+
sourcesLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
type SourcesChildrenFunc = (sourcesData: ExternalUserSourcesData) => 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 {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { Group } from '../../types';
|
|
5
|
+
export declare const groupOptionIconWrapper: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export type GroupOptionProps = {
|
|
7
|
+
group: Group;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare class GroupOption extends React.PureComponent<GroupOptionProps> {
|
|
11
|
+
private getPrimaryText;
|
|
12
|
+
private renderAvatar;
|
|
13
|
+
private renderByline;
|
|
14
|
+
private getLozengeProps;
|
|
15
|
+
render(): jsx.JSX.Element;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighlightRange } from '../types';
|
|
3
|
+
export interface Props {
|
|
4
|
+
highlights?: HighlightRange[];
|
|
5
|
+
children: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class HighlightText extends React.PureComponent<Props> {
|
|
8
|
+
render(): (string | JSX.Element)[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
selectProps?: {
|
|
4
|
+
disableInput?: boolean;
|
|
5
|
+
};
|
|
6
|
+
innerRef: (ref: React.Ref<HTMLInputElement>) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare class Input extends React.Component<Props> {
|
|
9
|
+
handleKeyPress: (e: KeyboardEvent) => void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OptionType } from '@atlaskit/select';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import { Option, UserPickerProps } from '../types';
|
|
6
|
+
import { MultiValueProps } from '@atlaskit/select';
|
|
7
|
+
export declare const scrollToValue: (valueContainer: HTMLDivElement, control: HTMLElement) => void;
|
|
8
|
+
type Props = MultiValueProps<OptionType> & {
|
|
9
|
+
isFocused?: boolean;
|
|
10
|
+
data: Option;
|
|
11
|
+
innerProps: any;
|
|
12
|
+
removeProps: {
|
|
13
|
+
onClick: Function;
|
|
14
|
+
};
|
|
15
|
+
selectProps: UserPickerProps;
|
|
16
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
17
|
+
};
|
|
18
|
+
export declare class MultiValue extends React.Component<Props> {
|
|
19
|
+
private containerRef;
|
|
20
|
+
constructor(props: Props);
|
|
21
|
+
componentDidUpdate(): void;
|
|
22
|
+
shouldComponentUpdate(nextProps: Props): boolean;
|
|
23
|
+
getElemBefore: () => jsx.JSX.Element;
|
|
24
|
+
render(): jsx.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MultiValueProps } from '@atlaskit/select';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { User, Option } from '../types';
|
|
4
|
+
export type State = {
|
|
5
|
+
valueSize: number;
|
|
6
|
+
previousValueSize: number;
|
|
7
|
+
};
|
|
8
|
+
type Props = MultiValueProps<Option<User>[], true> & {
|
|
9
|
+
innerProps?: ValueContainerInnerProps;
|
|
10
|
+
};
|
|
11
|
+
type ValueContainerInnerProps = {
|
|
12
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
13
|
+
};
|
|
14
|
+
export declare class MultiValueContainer extends React.PureComponent<Props, State> {
|
|
15
|
+
static getDerivedStateFromProps(nextProps: Props, prevState: State): {
|
|
16
|
+
valueSize: number;
|
|
17
|
+
previousValueSize: number;
|
|
18
|
+
};
|
|
19
|
+
private valueContainerInnerProps;
|
|
20
|
+
private timeoutId;
|
|
21
|
+
constructor(props: Props);
|
|
22
|
+
componentDidUpdate(): void;
|
|
23
|
+
componentWillUnmount(): void;
|
|
24
|
+
scrollToBottom: () => void;
|
|
25
|
+
private showPlaceholder;
|
|
26
|
+
private addPlaceholder;
|
|
27
|
+
private renderChildren;
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OptionProps as AkOptionProps } from '@atlaskit/select';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { Option as OptionType } from '../types';
|
|
4
|
+
export type OptionProps = AkOptionProps & {
|
|
5
|
+
data: OptionType;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
isFocused: boolean;
|
|
9
|
+
status?: string;
|
|
10
|
+
selectProps: {
|
|
11
|
+
emailLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const Option: FC<OptionProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
selectProps: {
|
|
4
|
+
disableInput?: boolean;
|
|
5
|
+
};
|
|
6
|
+
innerRef: (ref: React.Ref<HTMLInputElement>) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare class PopupInput extends React.Component<Props> {
|
|
9
|
+
private ref;
|
|
10
|
+
componentDidMount(): void;
|
|
11
|
+
private handleInnerRef;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopupUserPickerProps } from '../types';
|
|
3
|
+
interface State {
|
|
4
|
+
flipped: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class PopupUserPickerWithoutAnalytics extends React.Component<PopupUserPickerProps, State> {
|
|
7
|
+
static defaultProps: {
|
|
8
|
+
boundariesElement: string;
|
|
9
|
+
width: number;
|
|
10
|
+
isMulti: boolean;
|
|
11
|
+
offset: number[];
|
|
12
|
+
placement: string;
|
|
13
|
+
rootBoundary: string;
|
|
14
|
+
shouldFlip: boolean;
|
|
15
|
+
};
|
|
16
|
+
state: {
|
|
17
|
+
flipped: boolean;
|
|
18
|
+
};
|
|
19
|
+
handleFlipStyle: (data: {
|
|
20
|
+
flipped: boolean;
|
|
21
|
+
styles: any;
|
|
22
|
+
popper: any;
|
|
23
|
+
}) => {
|
|
24
|
+
flipped: boolean;
|
|
25
|
+
styles: any;
|
|
26
|
+
popper: any;
|
|
27
|
+
};
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "options" | "search" | "noOptionsMessage" | "placeholder" | "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "styles" | "value" | "target" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive" | "popupTitle"> & Partial<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "offset" | "isMulti" | "width" | "rootBoundary" | "boundariesElement" | "placement" | "shouldFlip">> & Partial<Pick<{
|
|
31
|
+
boundariesElement: string;
|
|
32
|
+
width: number;
|
|
33
|
+
isMulti: boolean;
|
|
34
|
+
offset: number[];
|
|
35
|
+
placement: string;
|
|
36
|
+
rootBoundary: string;
|
|
37
|
+
shouldFlip: boolean;
|
|
38
|
+
}, never>> & React.RefAttributes<any>>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { ValueContainerProps } from '@atlaskit/select';
|
|
5
|
+
import { User, Option } from '../types';
|
|
6
|
+
export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
|
|
7
|
+
private renderAvatar;
|
|
8
|
+
render(): jsx.JSX.Element;
|
|
9
|
+
}
|