@attraccess/plugins-frontend-ui 1.9.0 → 1.10.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/index.js +1241 -1217
- package/lib/components/attraccess-user/AttraccessUser.d.ts +3 -2
- package/lib/components/attraccess-user/AttraccessUserActionsContext.d.ts +2 -2
- package/lib/components/user-search/UserSearch.d.ts +2 -2
- package/lib/components/user-search/UserSearch.utils.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { User } from '../../../../libs/react-query-client/src/index.ts';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
export type UserIdentity = Pick<User, 'id' | 'username'>;
|
|
3
4
|
interface AttraccessUserProps {
|
|
4
|
-
user?: User
|
|
5
|
+
user?: UserIdentity & Partial<Pick<User, 'deletedAt'>>;
|
|
5
6
|
description?: ReactNode;
|
|
6
7
|
className?: string;
|
|
7
|
-
onStartDirectMessage?: (user:
|
|
8
|
+
onStartDirectMessage?: (user: UserIdentity) => void;
|
|
8
9
|
variant?: 'full' | 'mini';
|
|
9
10
|
/** When false, render as plain display without the direct-message popover. Defaults to true. */
|
|
10
11
|
interactive?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { User } from '../../../../libs/react-query-client/src/index.ts';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { UserIdentity } from './AttraccessUser';
|
|
3
3
|
interface AttraccessUserActions {
|
|
4
|
-
onStartDirectMessage?: (user:
|
|
4
|
+
onStartDirectMessage?: (user: UserIdentity) => void;
|
|
5
5
|
}
|
|
6
6
|
interface AttraccessUserActionsProviderProps extends AttraccessUserActions {
|
|
7
7
|
children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UserIdentity } from '../attraccess-user/AttraccessUser';
|
|
3
3
|
interface UserSearchProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
placeholder?: string;
|
|
@@ -7,7 +7,7 @@ interface UserSearchProps {
|
|
|
7
7
|
/** Clears the current selection and search whenever this value changes identity
|
|
8
8
|
* (e.g. pass a drawer's isOpen so the picker resets on every open/close). */
|
|
9
9
|
resetSignal?: unknown;
|
|
10
|
-
onSelectionChange?: (user:
|
|
10
|
+
onSelectionChange?: (user: UserIdentity | null) => void;
|
|
11
11
|
wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
12
12
|
afterAutocomplete?: React.ReactNode;
|
|
13
13
|
afterSelection?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserIdentity } from '../attraccess-user/AttraccessUser';
|
|
2
2
|
export interface UserGroup {
|
|
3
3
|
letter: string;
|
|
4
|
-
users:
|
|
4
|
+
users: UserIdentity[];
|
|
5
5
|
}
|
|
6
|
-
export declare function groupUsersByLetter(users:
|
|
6
|
+
export declare function groupUsersByLetter(users: UserIdentity[]): UserGroup[];
|