@atlaskit/user-picker 9.4.0 → 9.5.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 +12 -0
- package/analytics/package.json +1 -1
- package/dist/cjs/components/AvatarItemOption.js +20 -13
- package/dist/cjs/components/EmailOption/main.js +3 -2
- package/dist/cjs/components/ExternalUserOption/ExternalAvatarItemOption.js +16 -11
- package/dist/cjs/components/ExternalUserOption/main.js +1 -0
- package/dist/cjs/components/GroupOption/main.js +3 -2
- package/dist/cjs/components/TeamOption/main.js +3 -2
- package/dist/cjs/components/UserOption.js +3 -2
- package/dist/cjs/components/creatable.js +1 -1
- package/dist/cjs/components/creatableEmailSuggestion.js +1 -1
- package/dist/cjs/components/utils.js +7 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AvatarItemOption.js +10 -5
- package/dist/es2019/components/EmailOption/main.js +3 -2
- package/dist/es2019/components/ExternalUserOption/ExternalAvatarItemOption.js +7 -3
- package/dist/es2019/components/ExternalUserOption/main.js +1 -0
- package/dist/es2019/components/GroupOption/main.js +3 -2
- package/dist/es2019/components/TeamOption/main.js +3 -2
- package/dist/es2019/components/UserOption.js +3 -2
- package/dist/es2019/components/creatable.js +1 -1
- package/dist/es2019/components/creatableEmailSuggestion.js +1 -1
- package/dist/es2019/components/utils.js +7 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AvatarItemOption.js +20 -13
- package/dist/esm/components/EmailOption/main.js +3 -2
- package/dist/esm/components/ExternalUserOption/ExternalAvatarItemOption.js +17 -11
- package/dist/esm/components/ExternalUserOption/main.js +1 -0
- package/dist/esm/components/GroupOption/main.js +3 -2
- package/dist/esm/components/TeamOption/main.js +3 -2
- package/dist/esm/components/UserOption.js +3 -2
- package/dist/esm/components/creatable.js +1 -1
- package/dist/esm/components/creatableEmailSuggestion.js +1 -1
- package/dist/esm/components/utils.js +7 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AvatarItemOption.d.ts +3 -2
- package/dist/types/components/BaseUserPicker.d.ts +1 -1
- package/dist/types/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +2 -1
- package/dist/types/components/PopupUserPicker.d.ts +1 -1
- package/dist/types/components/UserPicker.d.ts +1 -1
- package/dist/types/types.d.ts +6 -4
- package/dist/types-ts4.0/analytics.d.ts +24 -0
- package/dist/types-ts4.0/clients/UserSourceProvider.d.ts +11 -0
- package/dist/types-ts4.0/components/AddOptionAvatar.d.ts +6 -0
- package/dist/types-ts4.0/components/AvatarItemOption.d.ts +12 -0
- package/dist/types-ts4.0/components/BaseUserPicker.d.ts +60 -0
- package/dist/types-ts4.0/components/ClearIndicator.d.ts +6 -0
- package/dist/types-ts4.0/components/EmailOption/index.d.ts +3 -0
- package/dist/types-ts4.0/components/EmailOption/main.d.ts +17 -0
- package/dist/types-ts4.0/components/ExternalUserOption/ExternalAvatarItemOption.d.ts +10 -0
- package/dist/types-ts4.0/components/ExternalUserOption/InfoIcon.d.ts +3 -0
- package/dist/types-ts4.0/components/ExternalUserOption/SourcesTooltipContent.d.ts +6 -0
- package/dist/types-ts4.0/components/ExternalUserOption/index.d.ts +3 -0
- package/dist/types-ts4.0/components/ExternalUserOption/main.d.ts +12 -0
- package/dist/types-ts4.0/components/ExternalUserSourcesContainer.d.ts +15 -0
- package/dist/types-ts4.0/components/GroupOption/index.d.ts +3 -0
- package/dist/types-ts4.0/components/GroupOption/main.d.ts +15 -0
- package/dist/types-ts4.0/components/HighlightText.d.ts +9 -0
- package/dist/types-ts4.0/components/Input.d.ts +11 -0
- package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +3 -0
- package/dist/types-ts4.0/components/MultiValue.d.ts +25 -0
- package/dist/types-ts4.0/components/MultiValueContainer.d.ts +30 -0
- package/dist/types-ts4.0/components/Option.d.ts +14 -0
- package/dist/types-ts4.0/components/PopupControl.d.ts +6 -0
- package/dist/types-ts4.0/components/PopupInput.d.ts +13 -0
- package/dist/types-ts4.0/components/PopupUserPicker.d.ts +39 -0
- package/dist/types-ts4.0/components/SingleValue.d.ts +8 -0
- package/dist/types-ts4.0/components/SingleValueContainer.d.ts +8 -0
- package/dist/types-ts4.0/components/SizeableAvatar.d.ts +10 -0
- package/dist/types-ts4.0/components/TeamOption/index.d.ts +3 -0
- package/dist/types-ts4.0/components/TeamOption/main.d.ts +15 -0
- package/dist/types-ts4.0/components/UserOption.d.ts +14 -0
- package/dist/types-ts4.0/components/UserPicker.d.ts +16 -0
- package/dist/types-ts4.0/components/assets/github.d.ts +2 -0
- package/dist/types-ts4.0/components/assets/google.d.ts +2 -0
- package/dist/types-ts4.0/components/assets/microsoft.d.ts +2 -0
- package/dist/types-ts4.0/components/assets/slack.d.ts +2 -0
- package/dist/types-ts4.0/components/batch.d.ts +1 -0
- package/dist/types-ts4.0/components/components.d.ts +55 -0
- package/dist/types-ts4.0/components/creatable.d.ts +12 -0
- package/dist/types-ts4.0/components/creatableEmailSuggestion.d.ts +19 -0
- package/dist/types-ts4.0/components/emailValidation.d.ts +3 -0
- package/dist/types-ts4.0/components/i18n.d.ts +127 -0
- package/dist/types-ts4.0/components/popup.d.ts +48 -0
- package/dist/types-ts4.0/components/styles.d.ts +17 -0
- package/dist/types-ts4.0/components/utils.d.ts +28 -0
- package/dist/types-ts4.0/i18n/cs.d.ts +33 -0
- package/dist/types-ts4.0/i18n/da.d.ts +33 -0
- package/dist/types-ts4.0/i18n/de.d.ts +33 -0
- package/dist/types-ts4.0/i18n/en.d.ts +7 -0
- package/dist/types-ts4.0/i18n/en_GB.d.ts +7 -0
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +33 -0
- package/dist/types-ts4.0/i18n/es.d.ts +33 -0
- package/dist/types-ts4.0/i18n/et.d.ts +15 -0
- package/dist/types-ts4.0/i18n/fi.d.ts +33 -0
- package/dist/types-ts4.0/i18n/fr.d.ts +33 -0
- package/dist/types-ts4.0/i18n/hu.d.ts +33 -0
- package/dist/types-ts4.0/i18n/index.d.ts +36 -0
- package/dist/types-ts4.0/i18n/is.d.ts +7 -0
- package/dist/types-ts4.0/i18n/it.d.ts +33 -0
- package/dist/types-ts4.0/i18n/ja.d.ts +33 -0
- package/dist/types-ts4.0/i18n/ko.d.ts +33 -0
- package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
- package/dist/types-ts4.0/i18n/nb.d.ts +33 -0
- package/dist/types-ts4.0/i18n/nl.d.ts +33 -0
- package/dist/types-ts4.0/i18n/pl.d.ts +33 -0
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +33 -0
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +15 -0
- package/dist/types-ts4.0/i18n/ro.d.ts +7 -0
- package/dist/types-ts4.0/i18n/ru.d.ts +33 -0
- package/dist/types-ts4.0/i18n/sk.d.ts +15 -0
- package/dist/types-ts4.0/i18n/sv.d.ts +33 -0
- package/dist/types-ts4.0/i18n/th.d.ts +33 -0
- package/dist/types-ts4.0/i18n/tr.d.ts +33 -0
- package/dist/types-ts4.0/i18n/uk.d.ts +33 -0
- package/dist/types-ts4.0/i18n/vi.d.ts +33 -0
- package/dist/types-ts4.0/i18n/zh.d.ts +33 -0
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +33 -0
- package/dist/types-ts4.0/index.d.ts +7 -0
- package/dist/types-ts4.0/types.d.ts +296 -0
- package/dist/types-ts4.0/util/i18n-util.d.ts +11 -0
- package/dist/types-ts4.0/util/ufoExperiences.d.ts +10 -0
- package/package.json +18 -11
- package/report.api.md +107 -97
- package/tmp/api-report-tmp.d.ts +365 -0
- package/types/package.json +1 -1
|
@@ -34,17 +34,19 @@ var isOptionData = function isOptionData(option) {
|
|
|
34
34
|
export var optionToSelectableOption = function optionToSelectableOption(option) {
|
|
35
35
|
if (isOptionData(option)) {
|
|
36
36
|
return {
|
|
37
|
+
data: option,
|
|
38
|
+
isDisabled: option.isDisabled,
|
|
37
39
|
label: option.name,
|
|
38
|
-
value: option.id
|
|
39
|
-
data: option
|
|
40
|
+
value: option.id
|
|
40
41
|
};
|
|
41
42
|
} else {
|
|
42
43
|
return {
|
|
43
|
-
label: option.id,
|
|
44
|
-
value: option.id,
|
|
45
44
|
data: _objectSpread(_objectSpread({}, option), {}, {
|
|
46
45
|
name: option.id
|
|
47
|
-
})
|
|
46
|
+
}),
|
|
47
|
+
isDisabled: option.isDisabled,
|
|
48
|
+
label: option.id,
|
|
49
|
+
value: option.id
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -4,8 +4,9 @@ import { LozengeProps } from '../types';
|
|
|
4
4
|
export declare const textWrapper: (color?: string | undefined) => import("@emotion/utils").SerializedStyles;
|
|
5
5
|
export declare type AvatarItemOptionProps = {
|
|
6
6
|
avatar: ReactNode;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
lozenge?: ReactNode | LozengeProps;
|
|
7
9
|
primaryText?: ReactNode;
|
|
8
10
|
secondaryText?: ReactNode;
|
|
9
|
-
lozenge?: ReactNode | LozengeProps;
|
|
10
11
|
};
|
|
11
|
-
export declare const AvatarItemOption: ({ avatar, primaryText, secondaryText,
|
|
12
|
+
export declare const AvatarItemOption: ({ avatar, isDisabled, lozenge, primaryText, secondaryText, }: AvatarItemOptionProps) => JSX.Element;
|
|
@@ -51,7 +51,7 @@ export declare class BaseUserPickerWithoutAnalytics extends React.Component<Base
|
|
|
51
51
|
private getAppearance;
|
|
52
52
|
render(): JSX.Element;
|
|
53
53
|
}
|
|
54
|
-
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "
|
|
54
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "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" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
55
55
|
isMulti: boolean;
|
|
56
56
|
subtle: boolean;
|
|
57
57
|
noBorder: boolean;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export declare type ExternalAvatarItemOptionProps = {
|
|
4
4
|
avatar: ReactNode;
|
|
5
|
+
isDisabled?: boolean;
|
|
5
6
|
primaryText: ReactNode;
|
|
6
7
|
secondaryText?: ReactNode;
|
|
7
8
|
sourcesInfoTooltip?: ReactNode;
|
|
8
9
|
};
|
|
9
|
-
export declare const ExternalAvatarItemOption: ({ avatar, primaryText, secondaryText, sourcesInfoTooltip, }: ExternalAvatarItemOptionProps) => JSX.Element;
|
|
10
|
+
export declare const ExternalAvatarItemOption: ({ avatar, isDisabled, primaryText, secondaryText, sourcesInfoTooltip, }: ExternalAvatarItemOptionProps) => JSX.Element;
|
|
@@ -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<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "
|
|
30
|
+
export declare const PopupUserPicker: React.ForwardRefExoticComponent<Pick<Omit<PopupUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "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
31
|
boundariesElement: string;
|
|
32
32
|
width: number;
|
|
33
33
|
isMulti: boolean;
|
|
@@ -10,7 +10,7 @@ export declare class UserPickerWithoutAnalytics extends React.Component<UserPick
|
|
|
10
10
|
componentDidMount(): void;
|
|
11
11
|
render(): JSX.Element;
|
|
12
12
|
}
|
|
13
|
-
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "
|
|
13
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
14
14
|
width: number;
|
|
15
15
|
isMulti: boolean;
|
|
16
16
|
}, never>> & React.RefAttributes<any>>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -199,11 +199,12 @@ export interface GroupHighlight {
|
|
|
199
199
|
}
|
|
200
200
|
export interface OptionData {
|
|
201
201
|
avatarUrl?: any;
|
|
202
|
+
fixed?: boolean;
|
|
202
203
|
id: string;
|
|
204
|
+
isDisabled?: boolean;
|
|
205
|
+
lozenge?: string | LozengeProps | ReactNode;
|
|
203
206
|
name: string;
|
|
204
207
|
type?: 'user' | 'team' | 'email' | 'group';
|
|
205
|
-
fixed?: boolean;
|
|
206
|
-
lozenge?: string | LozengeProps | ReactNode;
|
|
207
208
|
}
|
|
208
209
|
export declare const UserType = "user";
|
|
209
210
|
export declare type UserSource = 'google' | 'slack' | 'microsoft' | 'github' | 'jira' | 'confluence' | 'other-atlassian';
|
|
@@ -250,7 +251,7 @@ export interface Group extends OptionData {
|
|
|
250
251
|
}
|
|
251
252
|
export declare type Value = OptionData | OptionData[] | null | undefined;
|
|
252
253
|
export declare type DefaultValue = Value | OptionIdentifier | OptionIdentifier[];
|
|
253
|
-
export declare type OptionIdentifier = Pick<OptionData, 'id' | 'type'>;
|
|
254
|
+
export declare type OptionIdentifier = Pick<OptionData, 'id' | 'type' | 'isDisabled'>;
|
|
254
255
|
export declare const EmailType = "email";
|
|
255
256
|
export interface Email extends OptionData {
|
|
256
257
|
type: 'email';
|
|
@@ -262,9 +263,10 @@ export declare type OnInputChange = (query?: string, sessionId?: string) => void
|
|
|
262
263
|
export declare type OnPicker = (sessionId?: string) => void;
|
|
263
264
|
export declare type OnOption = (value: Value, sessionId?: string) => void;
|
|
264
265
|
export declare type Option<Data = OptionData> = {
|
|
266
|
+
data: Data;
|
|
267
|
+
isDisabled?: boolean;
|
|
265
268
|
label: string;
|
|
266
269
|
value: string;
|
|
267
|
-
data: Data;
|
|
268
270
|
};
|
|
269
271
|
export interface UserSourceResult {
|
|
270
272
|
sourceId: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { UserPickerProps, UserPickerState } from './types';
|
|
3
|
+
export declare 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[] | undefined) => {
|
|
8
|
+
sources: UserSource[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { LozengeProps } from '../types';
|
|
4
|
+
export declare const textWrapper: (color?: string | undefined) => import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare type AvatarItemOptionProps = {
|
|
6
|
+
avatar: ReactNode;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
lozenge?: ReactNode | LozengeProps;
|
|
9
|
+
primaryText?: ReactNode;
|
|
10
|
+
secondaryText?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare const AvatarItemOption: ({ avatar, isDisabled, lozenge, primaryText, secondaryText, }: AvatarItemOptionProps) => JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserPickerProps, UserPickerState } from '../types';
|
|
3
|
+
export declare 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
|
+
};
|
|
18
|
+
static getDerivedStateFromProps(nextProps: Partial<UserPickerProps>, prevState: UserPickerState): Partial<UserPickerState>;
|
|
19
|
+
private selectRef;
|
|
20
|
+
private session?;
|
|
21
|
+
private journeyId?;
|
|
22
|
+
private optionsShownUfoExperienceInstance;
|
|
23
|
+
constructor(props: BaseUserPickerProps);
|
|
24
|
+
private getSessionId;
|
|
25
|
+
private withSelectRef;
|
|
26
|
+
nextOption: () => void;
|
|
27
|
+
previousOption: () => void;
|
|
28
|
+
focus: () => void;
|
|
29
|
+
blur: () => void;
|
|
30
|
+
selectOption: () => void;
|
|
31
|
+
private handleChange;
|
|
32
|
+
private handleSelectRef;
|
|
33
|
+
private addOptions;
|
|
34
|
+
private handleLoadOptionsError;
|
|
35
|
+
private debouncedLoadOptions;
|
|
36
|
+
abortOptionsShownUfoExperience: () => void;
|
|
37
|
+
startOptionsShownUfoExperience: () => void;
|
|
38
|
+
private executeLoadOptions;
|
|
39
|
+
private handleFocus;
|
|
40
|
+
private resetInputState;
|
|
41
|
+
private handleBlur;
|
|
42
|
+
private handleClose;
|
|
43
|
+
private handleInputChange;
|
|
44
|
+
private fireEvent;
|
|
45
|
+
private startSession;
|
|
46
|
+
componentDidMount(): void;
|
|
47
|
+
componentDidUpdate(_: UserPickerProps, prevState: UserPickerState): void;
|
|
48
|
+
private handleKeyDown;
|
|
49
|
+
handleClearIndicatorHover: (hoveringClearIndicator: boolean) => void;
|
|
50
|
+
private getOptions;
|
|
51
|
+
private getAppearance;
|
|
52
|
+
render(): JSX.Element;
|
|
53
|
+
}
|
|
54
|
+
export declare const BaseUserPicker: React.ForwardRefExoticComponent<Pick<Omit<BaseUserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "components" | "inputId" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "width" | "menuMinWidth" | "maxPickerHeight" | "loadOptions" | "loadUserSource" | "search" | "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" | "subtle" | "noBorder">> & Partial<Pick<{
|
|
55
|
+
isMulti: boolean;
|
|
56
|
+
subtle: boolean;
|
|
57
|
+
noBorder: boolean;
|
|
58
|
+
textFieldBackgroundColor: boolean;
|
|
59
|
+
isClearable: boolean;
|
|
60
|
+
}, never>> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Email } from '../../types';
|
|
4
|
+
import { EmailValidationResponse } from '../emailValidation';
|
|
5
|
+
export declare type EmailOptionProps = {
|
|
6
|
+
email: Email;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
emailValidity: EmailValidationResponse;
|
|
10
|
+
};
|
|
11
|
+
export declare class EmailOption extends React.PureComponent<EmailOptionProps> {
|
|
12
|
+
private getLozengeProps;
|
|
13
|
+
private renderPrimaryText;
|
|
14
|
+
private renderSecondaryText;
|
|
15
|
+
private renderOption;
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare type ExternalAvatarItemOptionProps = {
|
|
4
|
+
avatar: ReactNode;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
primaryText: ReactNode;
|
|
7
|
+
secondaryText?: ReactNode;
|
|
8
|
+
sourcesInfoTooltip?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const ExternalAvatarItemOption: ({ avatar, isDisabled, primaryText, secondaryText, sourcesInfoTooltip, }: ExternalAvatarItemOptionProps) => 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/utils").SerializedStyles;
|
|
5
|
+
export declare const sourceWrapper: import("@emotion/utils").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/utils").SerializedStyles;
|
|
6
|
+
export declare const emailDomainWrapper: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare 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
|
+
declare 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,15 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Group } from '../../types';
|
|
4
|
+
export declare const groupOptionIconWrapper: import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare type GroupOptionProps = {
|
|
6
|
+
group: Group;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare class GroupOption extends React.PureComponent<GroupOptionProps> {
|
|
10
|
+
private getPrimaryText;
|
|
11
|
+
private renderAvatar;
|
|
12
|
+
private renderByline;
|
|
13
|
+
private getLozengeProps;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
@@ -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 declare 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,25 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OptionType } from '@atlaskit/select';
|
|
4
|
+
import { Option, UserPickerProps } from '../types';
|
|
5
|
+
import { MultiValueProps } from '@atlaskit/select/types';
|
|
6
|
+
export declare const scrollToValue: (valueContainer: HTMLDivElement, control: HTMLElement) => void;
|
|
7
|
+
declare type Props = MultiValueProps<OptionType> & {
|
|
8
|
+
isFocused?: boolean;
|
|
9
|
+
data: Option;
|
|
10
|
+
innerProps: any;
|
|
11
|
+
removeProps: {
|
|
12
|
+
onClick: Function;
|
|
13
|
+
};
|
|
14
|
+
selectProps: UserPickerProps;
|
|
15
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
16
|
+
};
|
|
17
|
+
export declare class MultiValue extends React.Component<Props> {
|
|
18
|
+
private containerRef;
|
|
19
|
+
constructor(props: Props);
|
|
20
|
+
componentDidUpdate(): void;
|
|
21
|
+
shouldComponentUpdate(nextProps: Props): boolean;
|
|
22
|
+
getElemBefore: () => JSX.Element;
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ValueContainerProps } from '@atlaskit/select';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { User, Option } from '../types';
|
|
4
|
+
export declare type State = {
|
|
5
|
+
valueSize: number;
|
|
6
|
+
previousValueSize: number;
|
|
7
|
+
};
|
|
8
|
+
declare type Props = ValueContainerProps<Option<User>[], true> & {
|
|
9
|
+
innerProps?: ValueContainerInnerProps;
|
|
10
|
+
};
|
|
11
|
+
declare 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 declare 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 declare 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>, "isDisabled" | "target" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "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,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ValueContainerProps } from '@atlaskit/select';
|
|
4
|
+
import { User, Option } from '../types';
|
|
5
|
+
export declare class SingleValueContainer extends React.Component<ValueContainerProps<Option<User>>> {
|
|
6
|
+
private renderAvatar;
|
|
7
|
+
render(): JSX.Element;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Team } from '../../types';
|
|
3
|
+
export declare type TeamOptionProps = {
|
|
4
|
+
team: Team;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare class TeamOption extends React.PureComponent<TeamOptionProps> {
|
|
8
|
+
private getPrimaryText;
|
|
9
|
+
private renderByline;
|
|
10
|
+
private getBylineComponent;
|
|
11
|
+
private renderAvatar;
|
|
12
|
+
private getLozengeProps;
|
|
13
|
+
private renderCustomByLine;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { User } from '../types';
|
|
3
|
+
export declare type UserOptionProps = {
|
|
4
|
+
user: User;
|
|
5
|
+
status?: string;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class UserOption extends React.PureComponent<UserOptionProps> {
|
|
9
|
+
getPrimaryText: () => JSX.Element[];
|
|
10
|
+
renderSecondaryText: () => JSX.Element | undefined;
|
|
11
|
+
private renderAvatar;
|
|
12
|
+
private getLozengeProps;
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserPickerProps } from '../types';
|
|
3
|
+
export declare class UserPickerWithoutAnalytics extends React.Component<UserPickerProps> {
|
|
4
|
+
ufoId: string;
|
|
5
|
+
constructor(props: UserPickerProps);
|
|
6
|
+
static defaultProps: {
|
|
7
|
+
width: number;
|
|
8
|
+
isMulti: boolean;
|
|
9
|
+
};
|
|
10
|
+
componentDidMount(): void;
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export declare const UserPicker: React.ForwardRefExoticComponent<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isDisabled" | "autoFocus" | "captureMenuScroll" | "closeMenuOnScroll" | "inputId" | "isClearable" | "isLoading" | "menuPosition" | "menuPortalTarget" | "menuShouldBlockScroll" | "noOptionsMessage" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "options" | "placeholder" | "styles" | "value" | "defaultValue" | "fieldId" | "menuMinWidth" | "maxPickerHeight" | "textFieldBackgroundColor" | "loadOptions" | "loadUserSource" | "search" | "anchor" | "open" | "onSelection" | "onClear" | "onClose" | "appearance" | "subtle" | "noBorder" | "addMoreMessage" | "clearValueLabel" | "allowEmail" | "suggestEmailsForDomain" | "emailLabel" | "disableInput" | "isValidEmail" | "maxOptions" | "ariaLabelledBy" | "ariaLive"> & Partial<Pick<Omit<UserPickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "isMulti" | "width">> & Partial<Pick<{
|
|
14
|
+
width: number;
|
|
15
|
+
isMulti: boolean;
|
|
16
|
+
}, never>> & React.RefAttributes<any>>;
|