@bluealba/pae-ui-react-core 4.0.1 → 4.1.0-develop-1295
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 +45 -45
- package/dist/index.css +1 -1
- package/dist/index.esm.js +3318 -3002
- package/dist/index.systemjs.js +47 -47
- package/dist/index.umd.js +49 -49
- package/dist/src/feature-flags/FeatureFlagGuard.d.ts +30 -0
- package/dist/src/feature-flags/index.d.ts +3 -0
- package/dist/src/feature-flags/useFeatureFlag.d.ts +1 -0
- package/dist/src/feature-flags/useFeatureFlags.d.ts +1 -0
- package/dist/src/hooks/applications/ApplicationMenu.d.ts +2 -0
- package/dist/src/hooks/applications/useApplicationMenu.d.ts +1 -3
- package/dist/src/hooks/applications/useModuleMenu.d.ts +11 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/rooms/components/RoomAvatars.d.ts +12 -0
- package/dist/src/rooms/context/RoomsContext.d.ts +9 -0
- package/dist/src/rooms/hooks/useRoom.d.ts +6 -0
- package/dist/src/rooms/index.d.ts +5 -0
- package/dist/src/rooms/providers/RoomsProvider.d.ts +6 -0
- package/dist/src/rooms/types/rooms.types.d.ts +7 -0
- package/dist/src/rooms/utils/constants.d.ts +5 -0
- package/dist/src/rooms/utils/user-color.utils.d.ts +1 -0
- package/dist/src/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for the FeatureFlagGuard component
|
|
5
|
+
*/
|
|
6
|
+
export interface FeatureFlagGuardProps {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the feature flag to check
|
|
9
|
+
*/
|
|
10
|
+
flag: string;
|
|
11
|
+
/**
|
|
12
|
+
* Content to render when the flag is enabled (or disabled if inverted)
|
|
13
|
+
*/
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Optional content to render when the flag is disabled (or enabled if inverted)
|
|
17
|
+
* If not provided, nothing will be rendered when the flag is disabled
|
|
18
|
+
*/
|
|
19
|
+
fallback?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to invert the logic
|
|
22
|
+
* If true, children are shown when flag is disabled, fallback when enabled
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
invert?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Component for conditional rendering based on feature flags
|
|
29
|
+
*/
|
|
30
|
+
export declare const FeatureFlagGuard: FC<FeatureFlagGuardProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFeatureFlag: (flagName: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFeatureFlags: () => Record<string, boolean>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ApplicationMenu } from './ApplicationMenu';
|
|
2
1
|
import { PlatformApplication } from './PlatformApplication';
|
|
3
|
-
import {
|
|
2
|
+
import { ApplicationMenu } from './ApplicationMenu';
|
|
4
3
|
|
|
5
4
|
type UseApplicationMenuReturnType = {
|
|
6
5
|
loading: boolean;
|
|
@@ -8,4 +7,3 @@ type UseApplicationMenuReturnType = {
|
|
|
8
7
|
};
|
|
9
8
|
export declare const useApplicationMenu: (application: PlatformApplication | undefined) => UseApplicationMenuReturnType;
|
|
10
9
|
export default useApplicationMenu;
|
|
11
|
-
export declare const hasAccess: (authorizedOperations: Operation[]) => (operations: string[]) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Operation } from '@bluealba/pae-core';
|
|
2
|
+
import { ApplicationMenu } from './ApplicationMenu';
|
|
3
|
+
import { PlatformApplication } from './PlatformApplication';
|
|
4
|
+
|
|
5
|
+
type UseModuleMenuReturnType = {
|
|
6
|
+
loading: boolean;
|
|
7
|
+
menu: ApplicationMenu;
|
|
8
|
+
};
|
|
9
|
+
export declare const useModuleMenu: (application: PlatformApplication | undefined) => UseModuleMenuReturnType;
|
|
10
|
+
export default useModuleMenu;
|
|
11
|
+
export declare const hasAccess: (authorizedOperations: Operation[]) => (operations: string[]) => boolean;
|
|
@@ -12,6 +12,7 @@ export { useApplications } from './applications/useApplications';
|
|
|
12
12
|
export { useUIApplications } from './useUIApplications';
|
|
13
13
|
export { useApplicationUIModule } from './applications/useApplicationUIModule';
|
|
14
14
|
export { useApplicationIcon } from './applications/useApplicationIcon';
|
|
15
|
+
export { useModuleMenu } from './applications/useModuleMenu';
|
|
15
16
|
export { useApplicationMenu } from './applications/useApplicationMenu';
|
|
16
17
|
export { useCurrentApplicationName } from './applications/useCurrentApplicationName';
|
|
17
18
|
export { useApplicationJSModule } from './applications/useApplicationJSModule';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export * from './components/common';
|
|
|
9
9
|
export { default as initializeMicroFrontend } from './utils/initializeMicroFrontend';
|
|
10
10
|
export * from './MicrofrontendProps';
|
|
11
11
|
export { setupTestEnvironment } from './test-utils/setupTestEnvironment';
|
|
12
|
+
export * from './feature-flags';
|
|
13
|
+
export * from './rooms';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RoomUser } from '../types/rooms.types';
|
|
3
|
+
|
|
4
|
+
export interface RoomAvatarsProps {
|
|
5
|
+
users: RoomUser[];
|
|
6
|
+
maxVisible?: number;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
overlap?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
onUserClick?: (user: RoomUser) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const RoomAvatars: React.FC<RoomAvatarsProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConnectionStatus, RoomUser } from '../types/rooms.types';
|
|
2
|
+
|
|
3
|
+
export interface RoomsContextValue {
|
|
4
|
+
status: ConnectionStatus;
|
|
5
|
+
joinRoom: (roomId: string) => void;
|
|
6
|
+
leaveRoom: (roomId: string) => void;
|
|
7
|
+
getRoomUsers: (roomId: string) => RoomUser[];
|
|
8
|
+
}
|
|
9
|
+
export declare const RoomsContext: import('react').Context<RoomsContextValue | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateUserColor(userId: string): string;
|
package/dist/src/types.d.ts
CHANGED