@fluxo-dev/shell 25.3.8 → 25.4.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.esm.js +1551 -574
- package/package.json +12 -12
- package/src/index.d.ts +2 -1
- package/src/lib/components/message-receiver-modal.d.ts +11 -0
- package/src/lib/components/routes/main-routes.d.ts +6 -1
- package/src/lib/components/send-message-modal.d.ts +21 -0
- package/src/lib/hooks/use-session-hub.d.ts +22 -0
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.4.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^18.3.1",
|
|
6
6
|
"@mantine/core": "^7.12.2",
|
|
7
7
|
"react-router-dom": "^6.11.2",
|
|
8
8
|
"react-redux": "^8.0.5",
|
|
9
9
|
"@reduxjs/toolkit": "^1.9.1",
|
|
10
|
-
"@fluxo-dev/api-client-base": "^25.
|
|
11
|
-
"@fluxo-dev/shell-bi": "^25.
|
|
12
|
-
"@fluxo-dev/shell-hub": "^25.
|
|
13
|
-
"@fluxo-dev/shell-korebi": "^25.
|
|
14
|
-
"@fluxo-dev/shell-mfe": "^25.
|
|
15
|
-
"@fluxo-dev/shell-printing": "^25.
|
|
16
|
-
"@fluxo-dev/shell-reporting": "^25.
|
|
17
|
-
"@fluxo-dev/shell-workflow": "^25.
|
|
18
|
-
"@fluxo-dev/shell-ravify": "^25.
|
|
19
|
-
"@fluxo-dev/state": "^25.
|
|
20
|
-
"@fluxo-dev/ui-components": "^25.
|
|
10
|
+
"@fluxo-dev/api-client-base": "^25.4.0",
|
|
11
|
+
"@fluxo-dev/shell-bi": "^25.4.0",
|
|
12
|
+
"@fluxo-dev/shell-hub": "^25.4.0",
|
|
13
|
+
"@fluxo-dev/shell-korebi": "^25.4.0",
|
|
14
|
+
"@fluxo-dev/shell-mfe": "^25.4.0",
|
|
15
|
+
"@fluxo-dev/shell-printing": "^25.4.0",
|
|
16
|
+
"@fluxo-dev/shell-reporting": "^25.4.0",
|
|
17
|
+
"@fluxo-dev/shell-workflow": "^25.4.0",
|
|
18
|
+
"@fluxo-dev/shell-ravify": "^25.4.0",
|
|
19
|
+
"@fluxo-dev/state": "^25.4.0",
|
|
20
|
+
"@fluxo-dev/ui-components": "^25.4.0",
|
|
21
21
|
"@scalar/api-reference-react": "^0.3.142",
|
|
22
22
|
"@devexpress/analytics-core": "23.1.3",
|
|
23
23
|
"devexpress-dashboard": "23.1.3",
|
package/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { FluxoShell, type FluxoShellProps, type ShellFrontend, type ShellUI, She
|
|
|
2
2
|
export { FrontendSwitch } from './lib/components/frontend-switch';
|
|
3
3
|
export { ScreenSharingProvider, useScreenSharingContext } from './lib/contexts/screen-sharing-context';
|
|
4
4
|
export { ScreenSharingWidget, type ScreenSharingWidgetProps } from './lib/components/screen-sharing-widget';
|
|
5
|
-
export {
|
|
5
|
+
export { MessageReceiverModal } from './lib/components/message-receiver-modal';
|
|
6
|
+
export { useSessionHub, type ReceivedMessage, type MessageType, type DisplayType } from './lib/hooks/use-session-hub';
|
|
6
7
|
export { LockedResource, type LockedResourceProps } from './lib/locked-resource';
|
|
7
8
|
export { ShellSessionContext } from './lib/layouts/main/shell-session-provider';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Modal per visualizzare i messaggi ricevuti dal server
|
|
4
|
+
* Supporta 3 modalità di visualizzazione:
|
|
5
|
+
* - Modal: apre un modal tradizionale
|
|
6
|
+
* - Toast: notifica bottom-right che resta aperta finché l'utente non la chiude
|
|
7
|
+
* - NotificationBar: barra full-width fixed top che resta aperta finché l'utente non la chiude
|
|
8
|
+
*
|
|
9
|
+
* I messaggi sono persistiti in localStorage e ricompaiono al refresh della pagina
|
|
10
|
+
*/
|
|
11
|
+
export declare const MessageReceiverModal: React.FC;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RouteObject } from "react-router-dom";
|
|
1
2
|
import { FluxoShellProps, ShellFrontend } from '../../app';
|
|
2
3
|
export interface MainRoutesProps {
|
|
3
4
|
pluginEndpoint: string;
|
|
@@ -5,4 +6,8 @@ export interface MainRoutesProps {
|
|
|
5
6
|
isAdminFrontend: boolean;
|
|
6
7
|
fluxoShellProps: FluxoShellProps;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Genera le routes principali come RouteObject[] invece di componente wrapper
|
|
11
|
+
* Questo evita il remount dei componenti quando si switcha tra sessioni
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateMainRoutes(props: MainRoutesProps, hasAdminAccess: boolean, hasDeveloperAccess: boolean, hasDataAnalystAccess: boolean): RouteObject[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SendMessageModalProps {
|
|
3
|
+
opened: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
mode: 'broadcast' | 'user' | 'session' | 'multiple-users';
|
|
6
|
+
targetId?: string;
|
|
7
|
+
targetName?: string;
|
|
8
|
+
availableUsers?: Array<{
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}>;
|
|
12
|
+
sessionHub: {
|
|
13
|
+
invoke: <T = any>(methodName: string, ...args: any[]) => Promise<T>;
|
|
14
|
+
};
|
|
15
|
+
onMessageSent?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Modal per inviare messaggi agli utenti connessi
|
|
19
|
+
*/
|
|
20
|
+
export declare const SendMessageModal: React.FC<SendMessageModalProps>;
|
|
21
|
+
export {};
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Payload ricevuto dall'evento ReceiveMessage
|
|
3
|
+
*/
|
|
4
|
+
export interface ReceivedMessage {
|
|
5
|
+
messageType: string;
|
|
6
|
+
displayType: string;
|
|
7
|
+
message: string;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
targetUserId?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Tipi di messaggio suggeriti (personalizzabili)
|
|
13
|
+
*/
|
|
14
|
+
export type MessageType = 'Critico' | 'Errore' | 'Avviso' | 'Informazioni' | 'Successo' | 'Alert' | 'Notifica' | string;
|
|
15
|
+
/**
|
|
16
|
+
* Tipi di visualizzazione suggeriti (personalizzabili)
|
|
17
|
+
*/
|
|
18
|
+
export type DisplayType = 'Toast' | 'Modal' | 'NotificationBar' | string;
|
|
1
19
|
/**
|
|
2
20
|
* Hook to manage SessionHub WebSocket connection lifecycle
|
|
3
21
|
* @param shouldConnect - When true, starts the connection. Use this to delay connection until FluxoClient is initialized
|
|
@@ -15,4 +33,8 @@ export declare const useSessionHub: (shouldConnect?: boolean) => {
|
|
|
15
33
|
reconnect: () => Promise<void>;
|
|
16
34
|
disconnect: () => Promise<void>;
|
|
17
35
|
hasBeenConnectedOnce: boolean;
|
|
36
|
+
sendBroadcastMessage: (messageType: MessageType, message: string) => Promise<void>;
|
|
37
|
+
sendMessageToSession: (targetConnectionId: string, messageType: MessageType, message: string) => Promise<void>;
|
|
38
|
+
sendMessageToUser: (targetUserId: string, messageType: MessageType, message: string) => Promise<void>;
|
|
39
|
+
onReceiveMessage: (handler: (data: ReceivedMessage) => void) => () => void;
|
|
18
40
|
};
|