@fluxo-dev/shell 25.1.12 → 25.2.2
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.css +401 -17
- package/index.esm.js +17074 -4079
- package/package.json +12 -12
- package/src/lib/app.d.ts +8 -2
- package/src/lib/layouts/main/app-bar.d.ts +1 -1
- package/src/lib/layouts/main/app-layout.d.ts +3 -3
- package/src/lib/layouts/main/components/CloseSessionConfirmationModal.d.ts +10 -0
- package/src/lib/layouts/main/content.d.ts +1 -1
- package/src/lib/layouts/main/easter-eggs/RetroIntro.d.ts +10 -0
- package/src/lib/layouts/main/easter-eggs/arkanoid.d.ts +4 -0
- package/src/lib/layouts/main/easter-eggs/asteroids.d.ts +4 -0
- package/src/lib/layouts/main/easter-eggs/credits.d.ts +3 -0
- package/src/lib/layouts/main/easter-eggs/pong.d.ts +4 -0
- package/src/lib/layouts/main/easter-eggs/space-invaders.d.ts +4 -0
- package/src/lib/layouts/main/easter-eggs/tetris.d.ts +4 -0
- package/src/lib/layouts/main/hooks/index.d.ts +3 -0
- package/src/lib/layouts/main/hooks/useDocumentTitleManager.d.ts +3 -0
- package/src/lib/layouts/main/hooks/useScrollPositionManager.d.ts +6 -0
- package/src/lib/layouts/main/hooks/useSessionManager.d.ts +17 -0
- package/src/lib/layouts/main/session-persistence.service.d.ts +28 -0
- package/src/lib/layouts/main/shell-session-provider.d.ts +6 -3
- package/src/lib/layouts/main/shell-session.d.ts +7 -5
- package/src/lib/pages/login/user-profile.d.ts +2 -0
- package/src/lib/utils/security/protected-route.d.ts +4 -1
- package/src/lib/pages/login/change-password.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.2.2",
|
|
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.2.2",
|
|
11
|
+
"@fluxo-dev/shell-bi": "^25.2.2",
|
|
12
|
+
"@fluxo-dev/shell-hub": "^25.2.2",
|
|
13
|
+
"@fluxo-dev/shell-korebi": "^25.2.2",
|
|
14
|
+
"@fluxo-dev/shell-mfe": "^25.2.2",
|
|
15
|
+
"@fluxo-dev/shell-printing": "^25.2.2",
|
|
16
|
+
"@fluxo-dev/shell-reporting": "^25.2.2",
|
|
17
|
+
"@fluxo-dev/shell-workflow": "^25.2.2",
|
|
18
|
+
"@fluxo-dev/shell-ravify": "^25.2.2",
|
|
19
|
+
"@fluxo-dev/state": "^25.2.2",
|
|
20
|
+
"@fluxo-dev/ui-components": "^25.2.2",
|
|
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/lib/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EmbeddedModule, InitialConfiguration } from
|
|
2
|
+
import { EmbeddedModule, InitialConfiguration } 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';
|
|
@@ -18,6 +18,12 @@ export type ShellFrontend = {
|
|
|
18
18
|
* If true, the frontend will be rendered only if the user is an external user.
|
|
19
19
|
*/
|
|
20
20
|
external: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Optional properties for the admin layout. If you use custom layouts, this props will be ignored.
|
|
23
|
+
*/
|
|
24
|
+
adminLayoutProps?: {
|
|
25
|
+
ui?: ShellUI;
|
|
26
|
+
};
|
|
21
27
|
};
|
|
22
28
|
export declare enum ShellUINavigation {
|
|
23
29
|
Sidebar = 1,
|
|
@@ -29,6 +35,7 @@ export interface ShellUI {
|
|
|
29
35
|
security: {
|
|
30
36
|
showChangePassword: boolean;
|
|
31
37
|
};
|
|
38
|
+
withMultipleSessions?: boolean;
|
|
32
39
|
frontendSwitcher?: FrontendSwitcherUiProps;
|
|
33
40
|
}
|
|
34
41
|
export interface FluxoShellProps {
|
|
@@ -37,7 +44,6 @@ export interface FluxoShellProps {
|
|
|
37
44
|
frontends: ShellFrontend[];
|
|
38
45
|
clientInitialization: () => Promise<void>;
|
|
39
46
|
brandName?: string;
|
|
40
|
-
withMultipleSessions: boolean;
|
|
41
47
|
ui: ShellUI;
|
|
42
48
|
routing?: {
|
|
43
49
|
basename?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ShellUI } from
|
|
1
|
+
import { ShellFrontend, ShellUI } from '../../app';
|
|
2
2
|
import './horizontal-menu.css';
|
|
3
3
|
interface AppLayoutProps {
|
|
4
4
|
appVersion: string;
|
|
5
5
|
brandName: string;
|
|
6
|
-
withMultipleSessions: boolean;
|
|
7
6
|
ui: ShellUI;
|
|
7
|
+
frontends: ShellFrontend[];
|
|
8
8
|
}
|
|
9
9
|
export declare const useShellUI: () => ShellUI;
|
|
10
|
-
declare function AppLayout({ appVersion, brandName,
|
|
10
|
+
declare function AppLayout({ appVersion, brandName, ui, frontends }: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default AppLayout;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CloseSessionConfirmationModalProps {
|
|
3
|
+
opened: boolean;
|
|
4
|
+
onConfirm: () => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
sessionTitle: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const CloseSessionConfirmationModal: React.FC<CloseSessionConfirmationModalProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './intro-animations.css';
|
|
3
|
+
interface RetroIntroProps {
|
|
4
|
+
gameTitle: string;
|
|
5
|
+
gameSubtitle?: string;
|
|
6
|
+
onIntroComplete: () => void;
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const RetroIntro: React.FC<RetroIntroProps>;
|
|
10
|
+
export default RetroIntro;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface SessionManager {
|
|
2
|
+
withMultipleSessions: boolean;
|
|
3
|
+
sessionContext: {
|
|
4
|
+
addSession: (title: string, element: React.ReactElement | null, url: string) => string;
|
|
5
|
+
removeSession: (sessionId: string) => void;
|
|
6
|
+
setRemoveConfirmationHandler: (handler: (sessionId: string) => void) => void;
|
|
7
|
+
setCurrentSession: (sessionId: string) => void;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const useSessionManager: (withMultipleSessions: boolean, sessionContext: SessionManager["sessionContext"]) => {
|
|
11
|
+
confirmCloseModalOpen: boolean;
|
|
12
|
+
sessionToClose: string | null;
|
|
13
|
+
handleCloseTabRequest: (sessionId: string, event: React.MouseEvent) => void;
|
|
14
|
+
confirmCloseTab: () => void;
|
|
15
|
+
cancelCloseTab: () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ShellSessionCollection } from './shell-session';
|
|
2
|
+
export interface PersistedSessionData {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
locationState?: any;
|
|
7
|
+
}
|
|
8
|
+
export interface PersistedSessionCollection {
|
|
9
|
+
sessions: PersistedSessionData[];
|
|
10
|
+
currentSessionId: string | null;
|
|
11
|
+
frontendId: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class SessionPersistenceService {
|
|
14
|
+
private static readonly STORAGE_KEY;
|
|
15
|
+
/**
|
|
16
|
+
* Salva le sessioni nel localStorage per un frontend specifico
|
|
17
|
+
*/
|
|
18
|
+
static save(sessionCollection: ShellSessionCollection, frontendId: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Recupera le sessioni dal localStorage per un frontend specifico
|
|
21
|
+
*/
|
|
22
|
+
static load(frontendId: string): Promise<ShellSessionCollection | null>;
|
|
23
|
+
/**
|
|
24
|
+
* Rimuove le sessioni per un frontend specifico
|
|
25
|
+
*/
|
|
26
|
+
static clearSessionsForFrontend(frontendId: string): void;
|
|
27
|
+
private static get;
|
|
28
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { ShellSession } from "./shell-session";
|
|
2
2
|
import React from "react";
|
|
3
3
|
interface ShellSessionContextData {
|
|
4
|
-
addSession: (title: string, element: React.ReactElement | null, url: string) => string;
|
|
4
|
+
addSession: (title: string, element: React.ReactElement | null, url: string, locationState?: any) => string;
|
|
5
5
|
removeSession: (id: string) => void;
|
|
6
|
-
|
|
6
|
+
requestRemoveSession: (id: string, title: string) => void;
|
|
7
|
+
closeAllSessions: () => void;
|
|
8
|
+
getSession: (id: string) => ShellSession | undefined;
|
|
7
9
|
sessions: () => ShellSession[];
|
|
8
|
-
updateSession: (id: string, title: string, element: React.ReactElement | null, url: string) => void;
|
|
10
|
+
updateSession: (id: string, title: string, element: React.ReactElement | null, url: string, locationState?: any) => void;
|
|
9
11
|
getCurrentSessionId: () => string | null;
|
|
10
12
|
getCurrentSession: () => ShellSession | null | undefined;
|
|
11
13
|
setCurrentSession: (id: string) => void;
|
|
12
14
|
isCurrentSessionDisableable: () => boolean;
|
|
15
|
+
setRemoveConfirmationHandler: (handler: (id: string, title: string) => void) => void;
|
|
13
16
|
}
|
|
14
17
|
export declare const ShellSessionContext: React.Context<ShellSessionContextData>;
|
|
15
18
|
export declare function ShellSessionProvider(props: {
|
|
@@ -4,26 +4,28 @@ export declare class ShellSessionCollection {
|
|
|
4
4
|
private _currentSessionId;
|
|
5
5
|
constructor(sessions: ShellSession[] | undefined, currentSessionId: string | null);
|
|
6
6
|
get currentSession(): ShellSession | null | undefined;
|
|
7
|
-
addSession(title: string, element: React.ReactElement | null, url: string): ShellSession;
|
|
7
|
+
addSession(title: string, element: React.ReactElement | null, url: string, locationState?: any): ShellSession;
|
|
8
8
|
removeSession(id: string): void;
|
|
9
9
|
getSession(id: string): ShellSession | undefined;
|
|
10
10
|
get sessions(): ShellSession[];
|
|
11
11
|
getCurrentSessionId(): string | null;
|
|
12
12
|
getCurrentSession(): ShellSession | null | undefined;
|
|
13
13
|
setCurrentSession(id: string): void;
|
|
14
|
-
updateSession(id: string, title: string, element: React.ReactElement | null, url: string): void;
|
|
14
|
+
updateSession(id: string, title: string, element: React.ReactElement | null, url: string, locationState?: any): void;
|
|
15
15
|
getPreviuosSessionId(): string;
|
|
16
16
|
getNextSessionId(): string;
|
|
17
17
|
}
|
|
18
18
|
export declare class ShellSession {
|
|
19
|
-
private
|
|
19
|
+
private _id;
|
|
20
20
|
private _title;
|
|
21
21
|
private _element;
|
|
22
22
|
private _url;
|
|
23
|
-
|
|
23
|
+
private _locationState;
|
|
24
|
+
constructor(title: string, element: React.ReactElement | null, url: string, locationState?: any, existingId?: string);
|
|
24
25
|
get id(): string;
|
|
25
26
|
get title(): string;
|
|
26
27
|
get element(): React.ReactElement | null;
|
|
27
28
|
get url(): string;
|
|
28
|
-
|
|
29
|
+
get locationState(): any;
|
|
30
|
+
updateSession(title: string, element: React.ReactElement | null, url: string, locationState?: any): void;
|
|
29
31
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare function ProtectedRoute({ children }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
2
5
|
export default ProtectedRoute;
|