@fluxo-dev/shell 25.2.9 → 25.2.11
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 +5462 -2023
- package/package.json +12 -12
- package/src/index.d.ts +3 -0
- package/src/lib/app.d.ts +11 -1
- package/src/lib/components/screen-sharing-consent-modal.d.ts +11 -0
- package/src/lib/components/screen-sharing-widget.d.ts +34 -0
- package/src/lib/components/screen-viewer-modal.d.ts +17 -0
- package/src/lib/contexts/screen-sharing-context.d.ts +29 -0
- package/src/lib/hooks/use-screen-sharing.d.ts +19 -0
- package/src/lib/hooks/use-session-hub.d.ts +16 -0
- package/src/lib/layouts/main/hooks/usePageTracker.d.ts +8 -0
- package/src/lib/pages/login/user-profile.d.ts +4 -1
- package/src/lib/pages/settings/connected-users/connected-users.d.ts +1 -0
- package/src/lib/pages/settings/menu-designer/menu-designer.d.ts +1 -1
- package/src/lib/pages/settings/menu-designer/menu-edit-form.d.ts +7 -0
- package/src/lib/pages/settings/menu-designer/menu-import-form.d.ts +9 -0
- package/src/lib/pages/settings/security/components/user/users-grid.d.ts +4 -1
- package/src/lib/pages/settings/settings.d.ts +2 -1
- package/src/lib/pages/settings/token/token-row.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "25.2.
|
|
3
|
+
"version": "25.2.11",
|
|
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.2.
|
|
11
|
-
"@fluxo-dev/shell-bi": "^25.2.
|
|
12
|
-
"@fluxo-dev/shell-hub": "^25.2.
|
|
13
|
-
"@fluxo-dev/shell-korebi": "^25.2.
|
|
14
|
-
"@fluxo-dev/shell-mfe": "^25.2.
|
|
15
|
-
"@fluxo-dev/shell-printing": "^25.2.
|
|
16
|
-
"@fluxo-dev/shell-reporting": "^25.2.
|
|
17
|
-
"@fluxo-dev/shell-workflow": "^25.2.
|
|
18
|
-
"@fluxo-dev/shell-ravify": "^25.2.
|
|
19
|
-
"@fluxo-dev/state": "^25.2.
|
|
20
|
-
"@fluxo-dev/ui-components": "^25.2.
|
|
10
|
+
"@fluxo-dev/api-client-base": "^25.2.11",
|
|
11
|
+
"@fluxo-dev/shell-bi": "^25.2.11",
|
|
12
|
+
"@fluxo-dev/shell-hub": "^25.2.11",
|
|
13
|
+
"@fluxo-dev/shell-korebi": "^25.2.11",
|
|
14
|
+
"@fluxo-dev/shell-mfe": "^25.2.11",
|
|
15
|
+
"@fluxo-dev/shell-printing": "^25.2.11",
|
|
16
|
+
"@fluxo-dev/shell-reporting": "^25.2.11",
|
|
17
|
+
"@fluxo-dev/shell-workflow": "^25.2.11",
|
|
18
|
+
"@fluxo-dev/shell-ravify": "^25.2.11",
|
|
19
|
+
"@fluxo-dev/state": "^25.2.11",
|
|
20
|
+
"@fluxo-dev/ui-components": "^25.2.11",
|
|
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
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { FluxoShell, type FluxoShellProps, type ShellFrontend, type ShellUI, ShellUINavigation } from './lib/app';
|
|
2
2
|
export { FrontendSwitch } from './lib/components/frontend-switch';
|
|
3
|
+
export { ScreenSharingProvider, useScreenSharingContext } from './lib/contexts/screen-sharing-context';
|
|
4
|
+
export { ScreenSharingWidget, type ScreenSharingWidgetProps } from './lib/components/screen-sharing-widget';
|
|
5
|
+
export { useSessionHub } from './lib/hooks/use-session-hub';
|
package/src/lib/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EmbeddedModule, InitialConfiguration } from '@fluxo-dev/api-client-base';
|
|
2
|
+
import { EmbeddedModule, FluxoUserProfile, InitialConfiguration, User } from '@fluxo-dev/api-client-base';
|
|
3
3
|
import './app.module.css';
|
|
4
4
|
import 'dayjs/locale/it';
|
|
5
5
|
import { FrontendSwitcherUiProps } from './pages/frontend-switcher/frontend-switcher';
|
|
@@ -38,6 +38,15 @@ export interface ShellUI {
|
|
|
38
38
|
withMultipleSessions?: boolean;
|
|
39
39
|
frontendSwitcher?: FrontendSwitcherUiProps;
|
|
40
40
|
}
|
|
41
|
+
export interface ShellSlots {
|
|
42
|
+
administrationSecurityUserProfile?: (data: {
|
|
43
|
+
user: User;
|
|
44
|
+
onClose: () => void;
|
|
45
|
+
}) => JSX.Element;
|
|
46
|
+
userProfile?: (data: {
|
|
47
|
+
user: FluxoUserProfile;
|
|
48
|
+
}) => JSX.Element;
|
|
49
|
+
}
|
|
41
50
|
export interface FluxoShellProps {
|
|
42
51
|
pluginEndpoint: string;
|
|
43
52
|
appVersion: string;
|
|
@@ -45,6 +54,7 @@ export interface FluxoShellProps {
|
|
|
45
54
|
clientInitialization: () => Promise<void>;
|
|
46
55
|
brandName?: string;
|
|
47
56
|
ui: ShellUI;
|
|
57
|
+
slots?: ShellSlots;
|
|
48
58
|
routing?: {
|
|
49
59
|
basename?: string;
|
|
50
60
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ScreenSharingConsentModalProps {
|
|
3
|
+
opened: boolean;
|
|
4
|
+
onConfirm: () => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Modale per richiedere il consenso alla condivisione dello schermo
|
|
9
|
+
*/
|
|
10
|
+
export declare const ScreenSharingConsentModal: React.FC<ScreenSharingConsentModalProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScreenSharingWidgetProps {
|
|
3
|
+
/**
|
|
4
|
+
* Dimensione del widget
|
|
5
|
+
* - 'xs': Extra small
|
|
6
|
+
* - 'sm': Small (default)
|
|
7
|
+
* - 'md': Medium
|
|
8
|
+
* - 'lg': Large
|
|
9
|
+
*/
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
11
|
+
/**
|
|
12
|
+
* Testo personalizzato per il pulsante di blocco
|
|
13
|
+
* Default: "Blocca condivisione"
|
|
14
|
+
*/
|
|
15
|
+
blockButtonLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Widget per gestire lo screen sharing.
|
|
19
|
+
* Mostra un indicatore quando lo schermo è sotto osservazione e permette di bloccare la condivisione.
|
|
20
|
+
* Il widget è responsive: su desktop mostra badge e pulsante separati, su mobile mostra un badge cliccabile compatto.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Nel tuo layout custom
|
|
24
|
+
* <ScreenSharingWidget />
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Con testo personalizzato
|
|
28
|
+
* <ScreenSharingWidget blockButtonLabel="Interrompi" />
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // Con dimensione maggiore
|
|
32
|
+
* <ScreenSharingWidget size="md" />
|
|
33
|
+
*/
|
|
34
|
+
export declare const ScreenSharingWidget: React.FC<ScreenSharingWidgetProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ScreenViewerModalProps {
|
|
3
|
+
opened: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
connectionId?: string;
|
|
6
|
+
userName?: string;
|
|
7
|
+
sessionHub: {
|
|
8
|
+
on: (eventName: string, handler: (...args: any[]) => void) => void;
|
|
9
|
+
off: (eventName: string, handler?: (...args: any[]) => void) => void;
|
|
10
|
+
invoke: <T = any>(methodName: string, ...args: any[]) => Promise<T>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Modal per visualizzare lo schermo condiviso di un utente in tempo reale
|
|
15
|
+
*/
|
|
16
|
+
export declare const ScreenViewerModal: React.FC<ScreenViewerModalProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface ScreenSharingContextValue {
|
|
3
|
+
isBeingWatched: boolean;
|
|
4
|
+
startSharing: () => void;
|
|
5
|
+
stopSharing: () => void;
|
|
6
|
+
isSupported: boolean;
|
|
7
|
+
error: string | null;
|
|
8
|
+
needsUserPermission: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface ScreenSharingProviderProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
sessionHub: {
|
|
13
|
+
on: (eventName: string, handler: (...args: any[]) => void) => void;
|
|
14
|
+
off: (eventName: string, handler?: (...args: any[]) => void) => void;
|
|
15
|
+
send: (methodName: string, ...args: any[]) => Promise<void>;
|
|
16
|
+
isConnected: (() => boolean) | boolean;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Provider che gestisce lo screen sharing a livello globale
|
|
21
|
+
* DEVE essere usato una sola volta nell'app per evitare richieste duplicate
|
|
22
|
+
*/
|
|
23
|
+
export declare const ScreenSharingProvider: React.FC<ScreenSharingProviderProps>;
|
|
24
|
+
/**
|
|
25
|
+
* Hook per accedere allo stato dello screen sharing
|
|
26
|
+
* Può essere usato in qualsiasi componente figlio del Provider
|
|
27
|
+
*/
|
|
28
|
+
export declare const useScreenSharingContext: () => ScreenSharingContextValue;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface ScreenSharingHook {
|
|
2
|
+
isBeingWatched: boolean;
|
|
3
|
+
startSharing: () => void;
|
|
4
|
+
stopSharing: () => void;
|
|
5
|
+
isSupported: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
needsUserPermission: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hook per gestire lo screen sharing lato utente usando getDisplayMedia
|
|
11
|
+
* Cattura nativa del browser - richiede permesso utente ma qualità perfetta
|
|
12
|
+
*/
|
|
13
|
+
export declare const useScreenSharing: (sessionHub: {
|
|
14
|
+
on: (eventName: string, handler: (...args: any[]) => void) => void;
|
|
15
|
+
off: (eventName: string, handler?: (...args: any[]) => void) => void;
|
|
16
|
+
send: (methodName: string, ...args: any[]) => Promise<void>;
|
|
17
|
+
isConnected: (() => boolean) | boolean;
|
|
18
|
+
}) => ScreenSharingHook;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to manage SessionHub WebSocket connection lifecycle
|
|
3
|
+
* @param shouldConnect - When true, starts the connection. Use this to delay connection until FluxoClient is initialized
|
|
4
|
+
*/
|
|
5
|
+
export declare const useSessionHub: (shouldConnect?: boolean) => {
|
|
6
|
+
on: (eventName: string, handler: (...args: any[]) => void) => void;
|
|
7
|
+
off: (eventName: string, handler?: (...args: any[]) => void) => void;
|
|
8
|
+
invoke: <T = any>(methodName: string, ...args: any[]) => Promise<T>;
|
|
9
|
+
send: (methodName: string, ...args: any[]) => Promise<void>;
|
|
10
|
+
getState: () => import("@microsoft/signalr").HubConnectionState;
|
|
11
|
+
isConnected: () => boolean;
|
|
12
|
+
connected: boolean;
|
|
13
|
+
reconnect: () => Promise<void>;
|
|
14
|
+
disconnect: () => Promise<void>;
|
|
15
|
+
hasBeenConnectedOnce: boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook personalizzato per tracciare i cambiamenti di pagina e titolo
|
|
3
|
+
* e inviare gli aggiornamenti al server via SessionHub
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePageTracker: (sessionHub: {
|
|
6
|
+
isConnected: () => boolean;
|
|
7
|
+
invoke: <T = any>(methodName: string, ...args: any[]) => Promise<T>;
|
|
8
|
+
}) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConnectedUsers(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppMenu } from "@fluxo-dev/api-client-base";
|
|
2
|
+
export interface MenuEditFormProps {
|
|
3
|
+
menu: AppMenu;
|
|
4
|
+
onUpdated: () => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function MenuEditForm(props: MenuEditFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DomainRole, User } from '@fluxo-dev/api-client-base';
|
|
2
|
+
export interface MenuImportFormProps {
|
|
3
|
+
menuDefinition: any;
|
|
4
|
+
domainRoles: DomainRole[];
|
|
5
|
+
users: User[];
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onImported: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function MenuImportForm(props: MenuImportFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ShellFrontend, ShellSlots } from '../../app';
|
|
1
2
|
import '@scalar/api-reference-react/style.css';
|
|
2
|
-
import { ShellFrontend } from "../../app";
|
|
3
3
|
export interface SettingsProps {
|
|
4
4
|
pluginEndpoint: string;
|
|
5
5
|
frontends: ShellFrontend[];
|
|
6
|
+
slots?: ShellSlots;
|
|
6
7
|
}
|
|
7
8
|
export declare function Settings(props: SettingsProps): import("react/jsx-runtime").JSX.Element;
|