@box/user-selector 1.41.2 → 1.42.2

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.
@@ -8,11 +8,12 @@ export type ContainerTemplateProps<T extends UserSelectorOption = UserContactTyp
8
8
  };
9
9
  export declare const defaultContainerTemplateArgs: ContainerTemplateProps;
10
10
  export declare function ContainerTemplate<T extends UserSelectorOption = UserContactType>(props: ContainerTemplateProps<T>): import("react/jsx-runtime").JSX.Element;
11
- export type ComponentTemplateProps<T extends UserSelectorOption = UserContactType> = Omit<UserSelectorProps<T>, 'inputValue' | 'onInputValueChange' | 'onSelectedUsersChange' | 'selectedUsers'> & {
11
+ export type ComponentTemplateProps<T extends UserSelectorOption = UserSelectorOption> = Omit<UserSelectorProps<T>, 'inputValue' | 'onInputValueChange' | 'onSelectedUsersChange' | 'selectedUsers'> & {
12
12
  divStyle?: HTMLAttributes<HTMLDivElement>['style'];
13
13
  initialInputValue?: string;
14
14
  initialSelectedUsers?: T[];
15
15
  };
16
16
  export declare const defaultComponentTemplateArgs: ComponentTemplateProps;
17
+ export declare const fetchUsersWithEmailFallback: (inputValue: string) => Promise<Array<UserSelectorOption>>;
17
18
  export declare const ComponentTemplate: (props: ComponentTemplateProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export declare const UserSelectorMap: ComponentRecord<Partial<ComponentTemplateProps<UserSelectorOption>>>;
@@ -11,7 +11,7 @@ export type UserContactType = {
11
11
  };
12
12
  export type CustomUserContactType = {
13
13
  name: string;
14
- subtitle: string;
14
+ subtitle?: string;
15
15
  value: string;
16
16
  avatar: {
17
17
  color: string;
@@ -10,7 +10,7 @@ export type BaseUserSelectorProps<T extends UserSelectorOption> = {
10
10
  /**
11
11
  * Function to fetch users when the input value changes
12
12
  */
13
- fetchUsers: (inputValue: string) => Promise<UserContactType[]>;
13
+ fetchUsers: (inputValue: string) => Promise<Array<T>>;
14
14
  /**
15
15
  * onChange for controlled selected users state
16
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/user-selector",
3
- "version": "1.41.2",
3
+ "version": "1.42.2",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.16.0",
@@ -11,9 +11,9 @@
11
11
  "react-intl": "6.4.2"
12
12
  },
13
13
  "devDependencies": {
14
- "@box/blueprint-web": "^12.96.0",
14
+ "@box/blueprint-web": "^12.97.0",
15
15
  "@box/blueprint-web-assets": "^4.80.0",
16
- "@box/combobox-with-api": "^1.10.2",
16
+ "@box/combobox-with-api": "^1.10.4",
17
17
  "@box/storybook-utils": "^0.14.17",
18
18
  "@types/lodash": "^4.17.14",
19
19
  "react": "^18.3.0",