@atlaskit/user-picker 11.23.3 → 11.25.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 +16 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/analytics.js +2 -1
- package/dist/cjs/components/AvatarItemOption.js +31 -2
- package/dist/cjs/components/AvatarOrIcon.js +1 -1
- package/dist/cjs/components/BaseUserPicker.js +69 -39
- package/dist/cjs/components/ClearIndicator.js +1 -1
- package/dist/cjs/components/Control.js +1 -1
- package/dist/cjs/components/CustomOption/main.js +1 -1
- package/dist/cjs/components/EmailOption/main.js +1 -1
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/cjs/components/ExternalUserOption/InfoIcon.js +1 -1
- package/dist/cjs/components/GroupOption/main.js +1 -1
- package/dist/cjs/components/Input.js +1 -1
- package/dist/cjs/components/MultiValue.js +152 -10
- package/dist/cjs/components/MultiValueContainer.js +1 -1
- package/dist/cjs/components/SingleValue.compiled.css +2 -0
- package/dist/cjs/components/SingleValue.js +13 -3
- package/dist/cjs/components/SingleValueContainer.js +1 -1
- package/dist/cjs/components/UserPicker.js +1 -1
- package/dist/cjs/components/i18n.js +5 -0
- package/dist/cjs/components/styles.js +2 -1
- package/dist/cjs/components/utils.js +1 -1
- package/dist/cjs/util/group-options-by-type/index.js +7 -3
- package/dist/es2019/analytics.js +1 -0
- package/dist/es2019/components/AvatarItemOption.js +31 -2
- package/dist/es2019/components/AvatarOrIcon.js +1 -1
- package/dist/es2019/components/BaseUserPicker.js +30 -1
- package/dist/es2019/components/ClearIndicator.js +1 -1
- package/dist/es2019/components/Control.js +1 -1
- package/dist/es2019/components/CustomOption/main.js +1 -1
- package/dist/es2019/components/EmailOption/main.js +1 -1
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/es2019/components/ExternalUserOption/InfoIcon.js +1 -1
- package/dist/es2019/components/GroupOption/main.js +1 -1
- package/dist/es2019/components/Input.js +1 -1
- package/dist/es2019/components/MultiValue.js +151 -11
- package/dist/es2019/components/MultiValueContainer.js +1 -1
- package/dist/es2019/components/SingleValue.compiled.css +2 -0
- package/dist/es2019/components/SingleValue.js +12 -3
- package/dist/es2019/components/SingleValueContainer.js +1 -1
- package/dist/es2019/components/UserPicker.js +1 -1
- package/dist/es2019/components/i18n.js +5 -0
- package/dist/es2019/components/styles.js +2 -1
- package/dist/es2019/components/utils.js +1 -1
- package/dist/es2019/util/group-options-by-type/index.js +7 -3
- package/dist/esm/analytics.js +1 -0
- package/dist/esm/components/AvatarItemOption.js +31 -2
- package/dist/esm/components/AvatarOrIcon.js +1 -1
- package/dist/esm/components/BaseUserPicker.js +69 -39
- package/dist/esm/components/ClearIndicator.js +1 -1
- package/dist/esm/components/Control.js +1 -1
- package/dist/esm/components/CustomOption/main.js +1 -1
- package/dist/esm/components/EmailOption/main.js +1 -1
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +1 -1
- package/dist/esm/components/ExternalUserOption/InfoIcon.js +1 -1
- package/dist/esm/components/GroupOption/main.js +1 -1
- package/dist/esm/components/Input.js +1 -1
- package/dist/esm/components/MultiValue.js +150 -10
- package/dist/esm/components/MultiValueContainer.js +1 -1
- package/dist/esm/components/SingleValue.compiled.css +2 -0
- package/dist/esm/components/SingleValue.js +12 -3
- package/dist/esm/components/SingleValueContainer.js +1 -1
- package/dist/esm/components/UserPicker.js +1 -1
- package/dist/esm/components/i18n.js +5 -0
- package/dist/esm/components/styles.js +2 -1
- package/dist/esm/components/utils.js +1 -1
- package/dist/esm/util/group-options-by-type/index.js +7 -3
- package/dist/types/analytics.d.ts +2 -2
- package/dist/types/components/AvatarItemOption.d.ts +2 -2
- package/dist/types/components/BaseUserPicker.d.ts +4 -1
- package/dist/types/components/ExternalUserOption/index.d.ts +4 -2
- package/dist/types/components/ExternalUserOption/main.d.ts +3 -2
- package/dist/types/components/GroupOption/main.d.ts +2 -2
- package/dist/types/components/PopupUserPicker.d.ts +90 -86
- package/dist/types/components/UserPicker.d.ts +2 -1
- package/dist/types/components/i18n.d.ts +5 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/util/group-options-by-type/index.d.ts +2 -1
- package/dist/types-ts4.5/analytics.d.ts +2 -2
- package/dist/types-ts4.5/components/AvatarItemOption.d.ts +2 -2
- package/dist/types-ts4.5/components/BaseUserPicker.d.ts +4 -1
- package/dist/types-ts4.5/components/ExternalUserOption/index.d.ts +4 -2
- package/dist/types-ts4.5/components/ExternalUserOption/main.d.ts +3 -2
- package/dist/types-ts4.5/components/GroupOption/main.d.ts +2 -2
- package/dist/types-ts4.5/components/PopupUserPicker.d.ts +90 -86
- package/dist/types-ts4.5/components/UserPicker.d.ts +2 -1
- package/dist/types-ts4.5/components/i18n.d.ts +5 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +4 -0
- package/dist/types-ts4.5/util/group-options-by-type/index.d.ts +2 -1
- package/package.json +16 -6
|
@@ -62,6 +62,8 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
62
62
|
componentDidUpdate(prevProps: UserPickerProps, prevState: UserPickerState): void;
|
|
63
63
|
private handleKeyDown;
|
|
64
64
|
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
65
|
+
private getOptionsOld;
|
|
66
|
+
private getOptionsNew;
|
|
65
67
|
private getOptions;
|
|
66
68
|
private getAppearance;
|
|
67
69
|
get ariaProps(): Partial<AriaAttributes>;
|
|
@@ -90,6 +92,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
90
92
|
footer?: React.ReactNode;
|
|
91
93
|
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
92
94
|
groupByTypeOrder?: NonNullable<OptionData['type']>[];
|
|
95
|
+
customGroupLabels?: Partial<Record<NonNullable<OptionData['type']>, React.ReactNode>>;
|
|
93
96
|
header?: React.ReactNode;
|
|
94
97
|
height?: number | string;
|
|
95
98
|
includeTeamsUpdates?: boolean;
|
|
@@ -160,7 +163,7 @@ export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
160
163
|
*/
|
|
161
164
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
162
165
|
width: string | number;
|
|
163
|
-
}, keyof WithAnalyticsEventsProps>, 'options' | 'noOptionsMessage' | 'placeholder' | 'addMoreMessage' | 'allowEmail' | 'anchor' | 'appearance' | 'ariaDescribedBy' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaLive' | 'autoFocus' | 'captureMenuScroll' | 'clearValueLabel' | 'closeMenuOnScroll' | 'components' | 'defaultValue' | 'disableInput' | 'emailLabel' | 'fieldId' | 'footer' | 'forwardedRef' | 'groupByTypeOrder' | 'header' | 'height' | 'includeTeamsUpdates' | 'inputId' | 'isDisabled' | 'isFooterFocused' | 'isInvalid' | 'isLoading' | 'isValidEmail' | 'loadOptions' | 'loadUserSource' | 'maxOptions' | 'maxPickerHeight' | 'menuIsOpen' | 'menuMinWidth' | 'menuPortalTarget' | 'menuPosition' | 'menuShouldBlockScroll' | 'name' | 'onBlur' | 'onChange' | 'onClear' | 'onClose' | 'onFocus' | 'onInputChange' | 'onKeyDown' | 'onOpen' | 'onSelection' | 'open' | 'placeholderAvatar' | 'popupSelectProps' | 'required' | 'search' | 'setIsFooterFocused' | 'showClearIndicator' | 'strategy' | 'styles' | 'suggestEmailsForDomain' | 'UNSAFE_hasDraggableParentComponent' | 'value' | 'width' | 'pickerProps' | 'SelectComponent'> & {
|
|
166
|
+
}, keyof WithAnalyticsEventsProps>, 'options' | 'noOptionsMessage' | 'placeholder' | 'addMoreMessage' | 'allowEmail' | 'anchor' | 'appearance' | 'ariaDescribedBy' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaLive' | 'autoFocus' | 'captureMenuScroll' | 'clearValueLabel' | 'closeMenuOnScroll' | 'components' | 'defaultValue' | 'disableInput' | 'emailLabel' | 'fieldId' | 'footer' | 'forwardedRef' | 'groupByTypeOrder' | 'customGroupLabels' | 'header' | 'height' | 'includeTeamsUpdates' | 'inputId' | 'isDisabled' | 'isFooterFocused' | 'isInvalid' | 'isLoading' | 'isValidEmail' | 'loadOptions' | 'loadUserSource' | 'maxOptions' | 'maxPickerHeight' | 'menuIsOpen' | 'menuMinWidth' | 'menuPortalTarget' | 'menuPosition' | 'menuShouldBlockScroll' | 'name' | 'onBlur' | 'onChange' | 'onClear' | 'onClose' | 'onFocus' | 'onInputChange' | 'onKeyDown' | 'onOpen' | 'onSelection' | 'open' | 'placeholderAvatar' | 'popupSelectProps' | 'required' | 'search' | 'setIsFooterFocused' | 'showClearIndicator' | 'strategy' | 'styles' | 'suggestEmailsForDomain' | 'UNSAFE_hasDraggableParentComponent' | 'value' | 'width' | 'pickerProps' | 'SelectComponent'> & {
|
|
164
167
|
isClearable?: boolean | undefined;
|
|
165
168
|
isMulti?: boolean | undefined;
|
|
166
169
|
loadOptionsErrorMessage?: ((value: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import type { ExternalUser } from '../../types';
|
|
2
4
|
declare const AsyncExternalUserOption: React.LazyExoticComponent<React.ForwardRefExoticComponent<Omit<{
|
|
3
5
|
isSelected: boolean;
|
|
4
6
|
status?: string;
|
|
5
|
-
user:
|
|
6
|
-
}, keyof
|
|
7
|
+
user: ExternalUser;
|
|
8
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>>;
|
|
7
9
|
export default AsyncExternalUserOption;
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
6
7
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
8
|
import { type ExternalUser } from '../../types';
|
|
8
|
-
export declare const imageContainer:
|
|
9
|
-
export declare const emailDomainWrapper:
|
|
9
|
+
export declare const imageContainer: SerializedStyles;
|
|
10
|
+
export declare const emailDomainWrapper: SerializedStyles;
|
|
10
11
|
export type ExternalUserOptionProps = WithAnalyticsEventsProps & {
|
|
11
12
|
isSelected: boolean;
|
|
12
13
|
status?: string;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { jsx, type SerializedStyles } from '@emotion/react';
|
|
7
7
|
import { type Group } from '../../types';
|
|
8
|
-
export declare const groupOptionIconWrapper:
|
|
8
|
+
export declare const groupOptionIconWrapper: SerializedStyles;
|
|
9
9
|
export type GroupOptionProps = {
|
|
10
10
|
group: Group;
|
|
11
11
|
includeTeamsUpdates?: boolean;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { type CreateUIAnalyticsEvent, type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
|
+
import { type PopupSelectProps, type SelectComponentsConfig, type StylesConfig } from '@atlaskit/select';
|
|
1
3
|
import React from 'react';
|
|
2
|
-
import { type PopupUserPickerProps } from '../types';
|
|
4
|
+
import { type Appearance, type BoundariesElement, type DefaultValue, type LoadOptions, type LoadUserSource, type OnChange, type OnInputChange, type OnOption, type OnPicker, type OptionData, type PopupUserPickerProps, type RootBoundary, type Target, type UserPickerRef, type Value } from '../types';
|
|
5
|
+
import type { Placement } from '@popperjs/core';
|
|
6
|
+
import type { EmailValidator } from './emailValidation';
|
|
3
7
|
interface State {
|
|
4
8
|
flipped: boolean;
|
|
5
9
|
}
|
|
@@ -23,23 +27,23 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
23
27
|
addMoreMessage?: string;
|
|
24
28
|
allowEmail?: boolean;
|
|
25
29
|
anchor?: React.ComponentType<any>;
|
|
26
|
-
appearance?:
|
|
30
|
+
appearance?: Appearance;
|
|
27
31
|
ariaDescribedBy?: string;
|
|
28
32
|
ariaLabel?: string;
|
|
29
33
|
ariaLabelledBy?: string;
|
|
30
|
-
ariaLive?:
|
|
34
|
+
ariaLive?: 'polite' | 'off' | 'assertive';
|
|
31
35
|
autoFocus?: boolean;
|
|
32
36
|
captureMenuScroll?: boolean;
|
|
33
37
|
clearValueLabel?: string;
|
|
34
38
|
closeMenuOnScroll?: boolean | EventListener;
|
|
35
|
-
components?:
|
|
36
|
-
defaultValue?:
|
|
39
|
+
components?: SelectComponentsConfig<OptionData, boolean>;
|
|
40
|
+
defaultValue?: DefaultValue;
|
|
37
41
|
disableInput?: boolean;
|
|
38
42
|
emailLabel?: string;
|
|
39
43
|
fieldId: string | null;
|
|
40
44
|
footer?: React.ReactNode;
|
|
41
|
-
forwardedRef?: React.ForwardedRef<
|
|
42
|
-
groupByTypeOrder?: NonNullable<
|
|
45
|
+
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
46
|
+
groupByTypeOrder?: NonNullable<OptionData['type']>[];
|
|
43
47
|
header?: React.ReactNode;
|
|
44
48
|
height?: number | string;
|
|
45
49
|
includeTeamsUpdates?: boolean;
|
|
@@ -51,18 +55,18 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
51
55
|
isInvalid?: boolean;
|
|
52
56
|
isLoading?: boolean;
|
|
53
57
|
isMulti?: boolean;
|
|
54
|
-
isValidEmail?:
|
|
55
|
-
loadOptions?:
|
|
58
|
+
isValidEmail?: EmailValidator;
|
|
59
|
+
loadOptions?: LoadOptions;
|
|
56
60
|
loadOptionsErrorMessage?: (value: {
|
|
57
61
|
inputValue: string;
|
|
58
62
|
}) => React.ReactNode;
|
|
59
|
-
loadUserSource?:
|
|
63
|
+
loadUserSource?: LoadUserSource;
|
|
60
64
|
maxOptions?: number;
|
|
61
65
|
maxPickerHeight?: number;
|
|
62
66
|
menuIsOpen?: boolean;
|
|
63
67
|
menuMinWidth?: number;
|
|
64
68
|
menuPortalTarget?: HTMLElement;
|
|
65
|
-
menuPosition?:
|
|
69
|
+
menuPosition?: 'absolute' | 'fixed';
|
|
66
70
|
menuShouldBlockScroll?: boolean;
|
|
67
71
|
minHeight?: number | string;
|
|
68
72
|
name?: string;
|
|
@@ -70,136 +74,136 @@ export declare const PopupUserPicker: React.ForwardRefExoticComponent<Omit<Pick<
|
|
|
70
74
|
noOptionsMessage?: ((value: {
|
|
71
75
|
inputValue: string;
|
|
72
76
|
}) => string | null | React.ReactNode) | null | React.ReactNode;
|
|
73
|
-
onBlur?:
|
|
74
|
-
onChange?:
|
|
75
|
-
onClear?:
|
|
76
|
-
onClose?:
|
|
77
|
-
onFocus?:
|
|
78
|
-
onInputChange?:
|
|
77
|
+
onBlur?: OnPicker;
|
|
78
|
+
onChange?: OnChange;
|
|
79
|
+
onClear?: OnPicker;
|
|
80
|
+
onClose?: OnPicker;
|
|
81
|
+
onFocus?: OnPicker;
|
|
82
|
+
onInputChange?: OnInputChange;
|
|
79
83
|
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
80
|
-
onOpen?:
|
|
81
|
-
onSelection?:
|
|
84
|
+
onOpen?: OnPicker;
|
|
85
|
+
onSelection?: OnOption;
|
|
82
86
|
open?: boolean;
|
|
83
87
|
openMenuOnClick?: boolean;
|
|
84
|
-
options?:
|
|
88
|
+
options?: OptionData[];
|
|
85
89
|
placeholder?: React.ReactNode;
|
|
86
|
-
placeholderAvatar?:
|
|
87
|
-
popupSelectProps?:
|
|
90
|
+
placeholderAvatar?: 'person' | 'team';
|
|
91
|
+
popupSelectProps?: PopupSelectProps<OptionData>;
|
|
88
92
|
required?: boolean;
|
|
89
93
|
search?: string;
|
|
90
94
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
91
95
|
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
92
96
|
showClearIndicator?: boolean;
|
|
93
|
-
strategy?:
|
|
94
|
-
styles?:
|
|
97
|
+
strategy?: 'fixed' | 'absolute';
|
|
98
|
+
styles?: StylesConfig;
|
|
95
99
|
subtle?: boolean;
|
|
96
100
|
suggestEmailsForDomain?: string;
|
|
97
101
|
textFieldBackgroundColor?: boolean;
|
|
98
102
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
99
|
-
value?:
|
|
103
|
+
value?: Value;
|
|
100
104
|
width?: number | string;
|
|
101
105
|
} & {
|
|
102
|
-
boundariesElement?:
|
|
106
|
+
boundariesElement?: BoundariesElement;
|
|
103
107
|
offset?: [
|
|
104
108
|
number,
|
|
105
109
|
number
|
|
106
110
|
];
|
|
107
|
-
placement?:
|
|
111
|
+
placement?: Placement;
|
|
108
112
|
popupTitle?: string;
|
|
109
|
-
rootBoundary?:
|
|
113
|
+
rootBoundary?: RootBoundary;
|
|
110
114
|
shouldFlip?: boolean;
|
|
111
|
-
target:
|
|
112
|
-
}, keyof
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
target: Target;
|
|
116
|
+
}, keyof WithAnalyticsEventsProps>, never> & {
|
|
117
|
+
footer?: React.ReactNode;
|
|
118
|
+
header?: React.ReactNode;
|
|
119
|
+
search?: string | undefined;
|
|
120
|
+
appearance?: Appearance | undefined;
|
|
121
|
+
height?: number | string | undefined;
|
|
122
|
+
minHeight?: number | string | undefined;
|
|
123
|
+
width?: number | string | undefined;
|
|
115
124
|
offset?: [
|
|
116
125
|
number,
|
|
117
126
|
number
|
|
118
127
|
] | undefined;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
inputId?: string | undefined;
|
|
128
|
-
isClearable?: boolean | undefined;
|
|
129
|
-
isInvalid?: boolean | undefined;
|
|
130
|
-
isLoading?: boolean | undefined;
|
|
131
|
-
isMulti?: boolean | undefined;
|
|
132
|
-
menuIsOpen?: boolean | undefined;
|
|
133
|
-
menuPosition?: "absolute" | "fixed" | undefined;
|
|
134
|
-
menuPortalTarget?: HTMLElement | undefined;
|
|
135
|
-
menuShouldBlockScroll?: boolean | undefined;
|
|
128
|
+
shouldFlip?: boolean | undefined;
|
|
129
|
+
boundariesElement?: BoundariesElement | undefined;
|
|
130
|
+
placement?: Placement | undefined;
|
|
131
|
+
anchor?: React.ComponentType<any> | undefined;
|
|
132
|
+
onInputChange?: OnInputChange | undefined;
|
|
133
|
+
onSelection?: OnOption | undefined;
|
|
134
|
+
options?: OptionData[] | undefined;
|
|
135
|
+
required?: boolean | undefined;
|
|
136
136
|
name?: string | undefined;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
placeholder?: React.ReactNode;
|
|
138
|
+
value?: Value;
|
|
139
|
+
onChange?: OnChange | undefined;
|
|
140
|
+
defaultValue?: DefaultValue;
|
|
141
|
+
autoFocus?: boolean | undefined;
|
|
142
|
+
onFocus?: OnPicker | undefined;
|
|
143
|
+
onBlur?: OnPicker | undefined;
|
|
142
144
|
onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined;
|
|
143
|
-
|
|
144
|
-
options?: import("..").OptionData[] | undefined;
|
|
145
|
-
styles?: import("@atlaskit/select").StylesConfig | undefined;
|
|
146
|
-
required?: boolean | undefined;
|
|
147
|
-
search?: string | undefined;
|
|
148
|
-
anchor?: React.ComponentType<any> | undefined;
|
|
145
|
+
isDisabled?: boolean | undefined;
|
|
149
146
|
addMoreMessage?: string | undefined;
|
|
150
147
|
allowEmail?: boolean | undefined;
|
|
151
148
|
ariaDescribedBy?: string | undefined;
|
|
152
149
|
ariaLabel?: string | undefined;
|
|
153
150
|
ariaLabelledBy?: string | undefined;
|
|
154
|
-
ariaLive?:
|
|
151
|
+
ariaLive?: 'polite' | 'off' | 'assertive' | undefined;
|
|
152
|
+
captureMenuScroll?: boolean | undefined;
|
|
155
153
|
clearValueLabel?: string | undefined;
|
|
156
|
-
|
|
154
|
+
closeMenuOnScroll?: (boolean | EventListener) | undefined;
|
|
155
|
+
components?: SelectComponentsConfig<OptionData, boolean> | undefined;
|
|
157
156
|
disableInput?: boolean | undefined;
|
|
158
157
|
emailLabel?: string | undefined;
|
|
159
158
|
fieldId?: string | null | undefined;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
groupByTypeOrder?: NonNullable<import("..").OptionData["type"]>[] | undefined;
|
|
163
|
-
header?: React.ReactNode;
|
|
164
|
-
height?: number | string | undefined;
|
|
159
|
+
forwardedRef?: React.ForwardedRef<UserPickerRef> | undefined;
|
|
160
|
+
groupByTypeOrder?: NonNullable<OptionData['type']>[] | undefined;
|
|
165
161
|
includeTeamsUpdates?: boolean | undefined;
|
|
162
|
+
inputId?: string | undefined;
|
|
163
|
+
isClearable?: boolean | undefined;
|
|
166
164
|
isFooterFocused?: boolean | undefined;
|
|
167
165
|
isHeaderFocused?: boolean | undefined;
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
isInvalid?: boolean | undefined;
|
|
167
|
+
isLoading?: boolean | undefined;
|
|
168
|
+
isMulti?: boolean | undefined;
|
|
169
|
+
isValidEmail?: EmailValidator | undefined;
|
|
170
|
+
loadOptions?: LoadOptions | undefined;
|
|
170
171
|
loadOptionsErrorMessage?: ((value: {
|
|
171
172
|
inputValue: string;
|
|
172
173
|
}) => React.ReactNode) | undefined;
|
|
173
|
-
loadUserSource?:
|
|
174
|
+
loadUserSource?: LoadUserSource | undefined;
|
|
174
175
|
maxOptions?: number | undefined;
|
|
175
176
|
maxPickerHeight?: number | undefined;
|
|
177
|
+
menuIsOpen?: boolean | undefined;
|
|
176
178
|
menuMinWidth?: number | undefined;
|
|
177
|
-
|
|
179
|
+
menuPortalTarget?: HTMLElement | undefined;
|
|
180
|
+
menuPosition?: 'absolute' | 'fixed' | undefined;
|
|
181
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
178
182
|
noBorder?: boolean | undefined;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
noOptionsMessage?: React.ReactNode | ((value: {
|
|
184
|
+
inputValue: string;
|
|
185
|
+
}) => string | null | React.ReactNode);
|
|
186
|
+
onClear?: OnPicker | undefined;
|
|
187
|
+
onClose?: OnPicker | undefined;
|
|
188
|
+
onOpen?: OnPicker | undefined;
|
|
183
189
|
open?: boolean | undefined;
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
openMenuOnClick?: boolean | undefined;
|
|
191
|
+
placeholderAvatar?: 'person' | 'team' | undefined;
|
|
192
|
+
popupSelectProps?: PopupSelectProps<OptionData> | undefined;
|
|
186
193
|
setIsFooterFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
187
194
|
setIsHeaderFocused?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
188
195
|
showClearIndicator?: boolean | undefined;
|
|
189
|
-
strategy?:
|
|
196
|
+
strategy?: 'fixed' | 'absolute' | undefined;
|
|
197
|
+
styles?: StylesConfig | undefined;
|
|
190
198
|
subtle?: boolean | undefined;
|
|
191
199
|
suggestEmailsForDomain?: string | undefined;
|
|
192
200
|
textFieldBackgroundColor?: boolean | undefined;
|
|
193
201
|
UNSAFE_hasDraggableParentComponent?: boolean | undefined;
|
|
194
|
-
width?: number | string | undefined;
|
|
195
|
-
target?: import("..").Target | undefined;
|
|
196
202
|
popupTitle?: string | undefined;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
boundariesElement?: import("../types").BoundariesElement | undefined;
|
|
200
|
-
shouldFlip?: boolean | undefined;
|
|
203
|
+
rootBoundary?: RootBoundary | undefined;
|
|
204
|
+
target?: Target | undefined;
|
|
201
205
|
} & {
|
|
202
206
|
ref?: React.Ref<any> | undefined;
|
|
203
|
-
createAnalyticsEvent?:
|
|
204
|
-
},
|
|
207
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined;
|
|
208
|
+
}, 'ref'> & React.RefAttributes<any>>;
|
|
205
209
|
export {};
|
|
@@ -31,6 +31,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
31
31
|
footer?: React.ReactNode;
|
|
32
32
|
forwardedRef?: React.ForwardedRef<import("../types").UserPickerRef>;
|
|
33
33
|
groupByTypeOrder?: NonNullable<import("..").OptionData["type"]>[];
|
|
34
|
+
customGroupLabels?: Partial<Record<NonNullable<import("..").OptionData["type"]>, React.ReactNode>>;
|
|
34
35
|
header?: React.ReactNode;
|
|
35
36
|
height?: number | string;
|
|
36
37
|
includeTeamsUpdates?: boolean;
|
|
@@ -89,7 +90,7 @@ export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
89
90
|
UNSAFE_hasDraggableParentComponent?: boolean;
|
|
90
91
|
value?: import("..").Value;
|
|
91
92
|
width?: number | string;
|
|
92
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "minHeight" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
93
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "placeholder" | "isDisabled" | "onChange" | "onInputChange" | "value" | "appearance" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isClearable" | "isInvalid" | "isLoading" | "menuIsOpen" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "name" | "noOptionsMessage" | "onBlur" | "onFocus" | "onKeyDown" | "openMenuOnClick" | "options" | "styles" | "required" | "search" | "anchor" | "addMoreMessage" | "allowEmail" | "ariaDescribedBy" | "ariaLabel" | "ariaLabelledBy" | "ariaLive" | "clearValueLabel" | "defaultValue" | "disableInput" | "emailLabel" | "fieldId" | "footer" | "forwardedRef" | "groupByTypeOrder" | "customGroupLabels" | "header" | "height" | "includeTeamsUpdates" | "isFooterFocused" | "isHeaderFocused" | "isValidEmail" | "loadOptions" | "loadOptionsErrorMessage" | "loadUserSource" | "maxOptions" | "maxPickerHeight" | "menuMinWidth" | "minHeight" | "noBorder" | "onClear" | "onClose" | "onOpen" | "onSelection" | "open" | "placeholderAvatar" | "popupSelectProps" | "setIsFooterFocused" | "setIsHeaderFocused" | "showClearIndicator" | "strategy" | "subtle" | "suggestEmailsForDomain" | "textFieldBackgroundColor" | "UNSAFE_hasDraggableParentComponent"> & {
|
|
93
94
|
isMulti?: boolean | undefined;
|
|
94
95
|
width?: number | string | undefined;
|
|
95
96
|
} & {} & React.RefAttributes<any>>;
|
|
@@ -169,6 +169,11 @@ export declare const messages: {
|
|
|
169
169
|
defaultMessage: string;
|
|
170
170
|
description: string;
|
|
171
171
|
};
|
|
172
|
+
archivedLozenge: {
|
|
173
|
+
id: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
172
177
|
userTypeLabel: {
|
|
173
178
|
id: string;
|
|
174
179
|
defaultMessage: string;
|
|
@@ -5,4 +5,4 @@ export { PopupUserPicker } from './components/PopupUserPicker';
|
|
|
5
5
|
export { SingleValue } from './components/SingleValue';
|
|
6
6
|
export { isEmail, isExternalUser, isTeam, isUser, isGroup } from './components/utils';
|
|
7
7
|
export { CustomType, EmailType, GroupType, TeamType, UserType, ExternalUserType, } from './types';
|
|
8
|
-
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
|
8
|
+
export type { ActionTypes, Appearance, AtlasKitSelectChange, AtlaskitSelectValue, DefaultValue, InputActionTypes, LozengeProps, OnChange, OnInputChange, OnOption, OnPicker, Option, OptionData, OptionIdentifier, PopupUserPickerProps, Promisable, Target, TeamState, UserPickerProps, UserPickerState, Value, Custom, Email, Group, GroupHighlight, HighlightRange, LoadOptions, Team, TeamMember, TeamHighlight, User, UserHighlight, ExternalUser, UserSource, } from './types';
|
|
@@ -66,6 +66,8 @@ export type UserPickerProps = WithAnalyticsEventsProps & {
|
|
|
66
66
|
forwardedRef?: React.ForwardedRef<UserPickerRef>;
|
|
67
67
|
/** group the options by type */
|
|
68
68
|
groupByTypeOrder?: NonNullable<OptionData['type']>[];
|
|
69
|
+
/** Custom labels for grouped option types. Overrides default labels when groupByTypeOrder is used. */
|
|
70
|
+
customGroupLabels?: Partial<Record<NonNullable<OptionData['type']>, React.ReactNode>>;
|
|
69
71
|
/** Header to be displayed in MenuList */
|
|
70
72
|
header?: React.ReactNode;
|
|
71
73
|
/** Sets the height of the user picker. If not set, the height settings will be based on the "compact" or "normal" appearance. */
|
|
@@ -323,6 +325,7 @@ export interface LozengeProps {
|
|
|
323
325
|
tooltip?: string;
|
|
324
326
|
}
|
|
325
327
|
export declare const TeamType = "team";
|
|
328
|
+
export type TeamState = 'ACTIVE' | 'DISBANDED' | 'PURGED';
|
|
326
329
|
export interface TeamMember {
|
|
327
330
|
id: string;
|
|
328
331
|
name: string;
|
|
@@ -337,6 +340,7 @@ export interface Team extends OptionData {
|
|
|
337
340
|
includeTeamsUpdates?: boolean;
|
|
338
341
|
memberCount?: number;
|
|
339
342
|
members?: TeamMember[];
|
|
343
|
+
state?: TeamState;
|
|
340
344
|
teamTypeName?: string;
|
|
341
345
|
type: 'team';
|
|
342
346
|
verified?: boolean;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { OptionData, Option, GroupedOptions } from '../../types';
|
|
2
|
-
export declare const groupOptionsByType: import("memoize-one").MemoizedFn<(options: Option[], groupByTypeOrder: NonNullable<OptionData["type"]>[]) => Option[] | GroupedOptions[]>;
|
|
3
|
+
export declare const groupOptionsByType: import("memoize-one").MemoizedFn<(options: Option[], groupByTypeOrder: NonNullable<OptionData["type"]>[], customGroupLabels?: Partial<Record<NonNullable<OptionData["type"]>, React.ReactNode>>) => Option[] | GroupedOptions[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/user-picker",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.25.0",
|
|
4
4
|
"description": "Fabric component for display a dropdown to select a user from",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,18 +46,19 @@
|
|
|
46
46
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
47
47
|
"@atlaskit/avatar": "^25.8.0",
|
|
48
48
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
49
|
-
"@atlaskit/icon": "^32.
|
|
49
|
+
"@atlaskit/icon": "^32.1.0",
|
|
50
50
|
"@atlaskit/logo": "^19.10.0",
|
|
51
|
-
"@atlaskit/lozenge": "^13.
|
|
51
|
+
"@atlaskit/lozenge": "^13.5.0",
|
|
52
52
|
"@atlaskit/people-teams-ui-public": "^3.7.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/popper": "^7.1.0",
|
|
55
55
|
"@atlaskit/primitives": "^18.0.0",
|
|
56
|
-
"@atlaskit/select": "^21.
|
|
56
|
+
"@atlaskit/select": "^21.8.0",
|
|
57
57
|
"@atlaskit/spinner": "^19.0.0",
|
|
58
|
+
"@atlaskit/tag": "^14.5.0",
|
|
58
59
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
59
60
|
"@atlaskit/theme": "^22.0.0",
|
|
60
|
-
"@atlaskit/tokens": "^11.
|
|
61
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
61
62
|
"@atlaskit/tooltip": "^20.14.0",
|
|
62
63
|
"@atlaskit/ufo": "^0.4.0",
|
|
63
64
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"@af/visual-regression": "workspace:^",
|
|
79
80
|
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
80
81
|
"@atlaskit/heading": "^5.3.0",
|
|
81
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
82
|
+
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
82
83
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
83
84
|
"@emotion/styled": "^11.0.0",
|
|
84
85
|
"@testing-library/dom": "^10.1.0",
|
|
@@ -118,6 +119,15 @@
|
|
|
118
119
|
},
|
|
119
120
|
"jira_ai_agent_avatar_user_picker_user_option": {
|
|
120
121
|
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"platform-dst-lozenge-tag-badge-visual-uplifts": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"enable-sup-archive-experience": {
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"jsm-wfo-assignee-recommendation-on-queues": {
|
|
130
|
+
"type": "boolean"
|
|
121
131
|
}
|
|
122
132
|
}
|
|
123
133
|
}
|