@bluealba/pae-ui-react-core 4.1.2 → 4.2.0-develop-1349
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/dist/index.cjs.js +48 -48
- package/dist/index.css +1 -1
- package/dist/index.esm.js +5622 -4505
- package/dist/index.systemjs.js +49 -49
- package/dist/index.umd.js +60 -60
- package/dist/src/components/ThemeToggle/DarkModeIcon.d.ts +4 -0
- package/dist/src/components/ThemeToggle/LightModeIcon.d.ts +4 -0
- package/dist/src/components/ThemeToggle/ThemeToggle.d.ts +7 -0
- package/dist/src/components/ThemeToggle/useTheme.d.ts +4 -0
- package/dist/src/components/common/Select2/Select.d.ts +18 -0
- package/dist/src/components/common/Select2/index.d.ts +2 -0
- package/dist/src/components/common/Table/Table.d.ts +1 -0
- package/dist/src/components/common/TextWithTooltip/TextWithTooltip.d.ts +10 -0
- package/dist/src/components/common/index.d.ts +4 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/useServiceWebSocketURL.d.ts +13 -0
- package/dist/src/rooms/hooks/useRoom.d.ts +27 -1
- package/package.json +2 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SelectOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
options: SelectOption[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export default Select;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TextWithTooltipProps {
|
|
4
|
+
children: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
tooltipSide?: "right" | "top" | "bottom" | "left";
|
|
7
|
+
tooltipClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TextWithTooltip: FC<TextWithTooltipProps>;
|
|
10
|
+
export default TextWithTooltip;
|
|
@@ -13,8 +13,12 @@ export { Label } from './Label/Label';
|
|
|
13
13
|
export type { LabelProps } from './Label/Label';
|
|
14
14
|
export { default as Select } from './Select/Select';
|
|
15
15
|
export type { SelectProps } from './Select/Select';
|
|
16
|
+
export { default as Select2 } from './Select2/Select';
|
|
17
|
+
export type { SelectProps as Select2Props } from './Select2/Select';
|
|
16
18
|
export { TextArea } from './TextArea/TextArea';
|
|
17
19
|
export type { TextAreaProps } from './TextArea/TextArea';
|
|
20
|
+
export { TextWithTooltip } from './TextWithTooltip/TextWithTooltip';
|
|
21
|
+
export type { TextWithTooltipProps } from './TextWithTooltip/TextWithTooltip';
|
|
18
22
|
export { SearchInput } from './SearchInput/SearchInput';
|
|
19
23
|
export type { SearchInputProps } from './SearchInput/SearchInput';
|
|
20
24
|
export { SearchAutocomplete } from './SearchAutocomplete/SearchAutocomplete';
|
|
@@ -4,3 +4,5 @@ export { ExtensionPoint } from './ExtensionPoint';
|
|
|
4
4
|
export { default as Authorized } from './Authorized';
|
|
5
5
|
export { default as PlatformEventListener } from './PlatformEventListener';
|
|
6
6
|
export { default as ApplicationIcon } from './ApplicationIcon';
|
|
7
|
+
export { default as ThemeToggle } from './ThemeToggle/ThemeToggle';
|
|
8
|
+
export { useTheme } from './ThemeToggle/useTheme';
|
|
@@ -24,6 +24,7 @@ export { useAuth } from './useAuth';
|
|
|
24
24
|
export { useOperations } from './useOperations';
|
|
25
25
|
export { useServiceInvoker, type ServiceInvoker } from './useServiceInvoker';
|
|
26
26
|
export { useServiceBaseURL } from './useServiceBaseURL';
|
|
27
|
+
export { useServiceWebSocketURL } from './useServiceWebSocketURL';
|
|
27
28
|
export { useTrackEvent } from './habits/useTrackEvent';
|
|
28
29
|
export { useTrackEvents } from './habits/useTrackEvents';
|
|
29
30
|
export { type ApplicationEvent } from './habits/ApplicationEvent';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given a serviceName it returns its WebSocket URL with impersonation and tenant
|
|
3
|
+
* query params forwarded from the current page URL.
|
|
4
|
+
*
|
|
5
|
+
* This hook is specifically designed for WebSocket connections that need to
|
|
6
|
+
* maintain impersonation context from the parent page.
|
|
7
|
+
*
|
|
8
|
+
* @param serviceName - The service name as registered in the catalog
|
|
9
|
+
* @param skipThrow - If true, returns null instead of throwing when service is not found
|
|
10
|
+
* @returns The WebSocket URL with forwarded query params, or null if service not found
|
|
11
|
+
*/
|
|
12
|
+
export declare const useServiceWebSocketURL: (serviceName: string, skipThrow?: boolean) => string | null;
|
|
13
|
+
export default useServiceWebSocketURL;
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { RoomUser } from '../types/rooms.types';
|
|
2
2
|
|
|
3
|
+
export interface UseRoomOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Automatically join the room when the hook is used.
|
|
6
|
+
* Defaults to true.
|
|
7
|
+
*/
|
|
8
|
+
autoJoin?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Automatically leave the room when the component unmounts.
|
|
11
|
+
* Defaults to true.
|
|
12
|
+
*/
|
|
13
|
+
autoLeave?: boolean;
|
|
14
|
+
}
|
|
3
15
|
export interface UseRoomReturn {
|
|
4
16
|
users: RoomUser[];
|
|
17
|
+
roomId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates whether the authenticated user has joined the room.
|
|
20
|
+
*/
|
|
21
|
+
hasJoined: boolean;
|
|
22
|
+
joinRoom: () => void;
|
|
23
|
+
leaveRoom: () => void;
|
|
5
24
|
}
|
|
6
|
-
export declare
|
|
25
|
+
export declare const DEFAULT_OPTIONS: UseRoomOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Hook to manage room participation and retrieve room users.
|
|
28
|
+
* @param roomId current room ID
|
|
29
|
+
* @param options configuration options for auto-joining and auto-leaving the room
|
|
30
|
+
* @returns an object containing room users, room ID, and functions to join/leave the room
|
|
31
|
+
*/
|
|
32
|
+
export declare function useRoom(roomId: string, options?: UseRoomOptions): UseRoomReturn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluealba/pae-ui-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-develop-1349",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
45
46
|
"@radix-ui/react-slot": "^1.1.0",
|
|
46
47
|
"clsx": "^2.1.1",
|
|
47
48
|
"color-parse": "^2.0.2",
|