@fluxo-dev/shell 25.2.11 → 25.3.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.js +4795 -4363
- package/package.json +12 -12
- package/src/index.d.ts +1 -0
- package/src/lib/layouts/main/shell-session-provider.d.ts +2 -0
- package/src/lib/layouts/main/shell-session.d.ts +11 -1
- package/src/lib/locked-resource/index.d.ts +2 -0
- package/src/lib/locked-resource/locked-resource.d.ts +19 -0
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "25.2
|
|
3
|
+
"version": "25.3.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.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.3.2",
|
|
11
|
+
"@fluxo-dev/shell-bi": "^25.3.2",
|
|
12
|
+
"@fluxo-dev/shell-hub": "^25.3.2",
|
|
13
|
+
"@fluxo-dev/shell-korebi": "^25.3.2",
|
|
14
|
+
"@fluxo-dev/shell-mfe": "^25.3.2",
|
|
15
|
+
"@fluxo-dev/shell-printing": "^25.3.2",
|
|
16
|
+
"@fluxo-dev/shell-reporting": "^25.3.2",
|
|
17
|
+
"@fluxo-dev/shell-workflow": "^25.3.2",
|
|
18
|
+
"@fluxo-dev/shell-ravify": "^25.3.2",
|
|
19
|
+
"@fluxo-dev/state": "^25.3.2",
|
|
20
|
+
"@fluxo-dev/ui-components": "^25.3.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/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ 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
5
|
export { useSessionHub } from './lib/hooks/use-session-hub';
|
|
6
|
+
export { LockedResource, type LockedResourceProps } from './lib/locked-resource';
|
|
@@ -2,9 +2,11 @@ import { ShellSession } from "./shell-session";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
interface ShellSessionContextData {
|
|
4
4
|
addSession: (title: string, element: React.ReactElement | null, url: string, locationState?: any) => string;
|
|
5
|
+
addOrSwitchToSession: (title: string, element: React.ReactElement | null, url: string, locationState?: any) => string;
|
|
5
6
|
removeSession: (id: string) => void;
|
|
6
7
|
requestRemoveSession: (id: string, title: string) => void;
|
|
7
8
|
closeAllSessions: () => void;
|
|
9
|
+
refreshSession: (id: string) => void;
|
|
8
10
|
getSession: (id: string) => ShellSession | undefined;
|
|
9
11
|
sessions: () => ShellSession[];
|
|
10
12
|
updateSession: (id: string, title: string, element: React.ReactElement | null, url: string, locationState?: any) => void;
|
|
@@ -13,6 +13,13 @@ export declare class ShellSessionCollection {
|
|
|
13
13
|
setCurrentSession(id: string): void;
|
|
14
14
|
updateSession(id: string, title: string, element: React.ReactElement | null, url: string, locationState?: any): void;
|
|
15
15
|
getPreviuosSessionId(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Trova una sessione che corrisponde all'URL specificato.
|
|
18
|
+
* Il confronto è basato sul pathname, ignorando query params e hash.
|
|
19
|
+
* @param url - URL da cercare
|
|
20
|
+
* @returns La sessione trovata o undefined
|
|
21
|
+
*/
|
|
22
|
+
findSessionByUrl(url: string): ShellSession | undefined;
|
|
16
23
|
getNextSessionId(): string;
|
|
17
24
|
}
|
|
18
25
|
export declare class ShellSession {
|
|
@@ -21,11 +28,14 @@ export declare class ShellSession {
|
|
|
21
28
|
private _element;
|
|
22
29
|
private _url;
|
|
23
30
|
private _locationState;
|
|
24
|
-
|
|
31
|
+
private _mountKey;
|
|
32
|
+
constructor(title: string, element: React.ReactElement | null, url: string, locationState?: any, existingId?: string, mountKey?: string);
|
|
25
33
|
get id(): string;
|
|
26
34
|
get title(): string;
|
|
27
35
|
get element(): React.ReactElement | null;
|
|
28
36
|
get url(): string;
|
|
29
37
|
get locationState(): any;
|
|
38
|
+
get mountKey(): string;
|
|
30
39
|
updateSession(title: string, element: React.ReactElement | null, url: string, locationState?: any): void;
|
|
40
|
+
refresh(): void;
|
|
31
41
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface LockedResourceProps {
|
|
3
|
+
/** ID univoco della risorsa da bloccare */
|
|
4
|
+
resourceId: string;
|
|
5
|
+
/** Contenuto da mostrare se la risorsa non è bloccata */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Messaggio personalizzato da mostrare quando la risorsa è bloccata */
|
|
8
|
+
lockedMessage?: string;
|
|
9
|
+
/** Titolo personalizzato per l'errore */
|
|
10
|
+
lockedTitle?: string;
|
|
11
|
+
/** Callback chiamato quando la risorsa risulta bloccata */
|
|
12
|
+
onResourceLocked?: () => void;
|
|
13
|
+
/** Callback chiamato quando la risorsa viene sbloccata con successo */
|
|
14
|
+
onResourceUnlocked?: () => void;
|
|
15
|
+
/** Se true, mostra solo un warning invece di bloccare completamente il contenuto */
|
|
16
|
+
readOnlyMode?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function LockedResource({ resourceId, children, lockedMessage, lockedTitle, onResourceLocked, onResourceUnlocked, readOnlyMode, }: LockedResourceProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default LockedResource;
|