@elevasis/ui 1.28.0 → 1.28.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/dist/{chunk-KLG4H5NM.js → chunk-45MS3IAW.js} +4 -1
- package/dist/{chunk-7CJ5QBN2.js → chunk-BYZ7VTSH.js} +2 -2
- package/dist/{chunk-EBCIUZVV.js → chunk-EINVPEHK.js} +121 -4
- package/dist/{chunk-D25AE46Q.js → chunk-FW4S3Z5I.js} +1 -1
- package/dist/{chunk-S4S6K4MV.js → chunk-JQ4AKYUD.js} +2 -2
- package/dist/{chunk-ZUJ7WMGV.js → chunk-KP6LNTMH.js} +1 -1
- package/dist/{chunk-ZXBD5SBV.js → chunk-R2BQITMQ.js} +2 -2
- package/dist/{chunk-37NT4BNV.js → chunk-T2X3WHQS.js} +2 -2
- package/dist/{chunk-C4WOXS2C.js → chunk-ZWY3A6ZU.js} +41 -10
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +11 -11
- package/dist/features/dashboard/index.js +5 -5
- package/dist/features/monitoring/index.js +6 -6
- package/dist/features/operations/index.d.ts +21 -52
- package/dist/features/operations/index.js +6 -6
- package/dist/features/settings/index.js +5 -5
- package/dist/hooks/index.d.ts +351 -48
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/published.d.ts +351 -48
- package/dist/hooks/published.js +3 -3
- package/dist/index.d.ts +354 -50
- package/dist/index.js +4 -4
- package/dist/provider/index.d.ts +5 -46
- package/dist/provider/index.js +2 -2
- package/dist/provider/published.d.ts +5 -46
- package/dist/provider/published.js +1 -1
- package/dist/sse/index.d.ts +10 -2
- package/package.json +1 -1
|
@@ -296,51 +296,9 @@ interface FetchEventSourceWithTokenRefreshOptions {
|
|
|
296
296
|
onclose?: () => void;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
interface
|
|
300
|
-
/** Grace period in ms before closing idle connections. Defaults to 5000. */
|
|
301
|
-
closeGracePeriodMs?: number;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* SSE Connection Manager
|
|
305
|
-
*
|
|
306
|
-
* Ensures only ONE SSE connection exists per endpoint, preventing duplicate
|
|
307
|
-
* connections when components re-render or remount.
|
|
308
|
-
*
|
|
309
|
-
* Benefits:
|
|
310
|
-
* - Prevents resource waste from duplicate connections
|
|
311
|
-
* - Eliminates race conditions from overlapping connections
|
|
312
|
-
* - Automatically manages connection lifecycle
|
|
313
|
-
* - Shares single connection across multiple subscribers
|
|
314
|
-
*/
|
|
315
|
-
declare class SSEConnectionManager {
|
|
316
|
-
private connections;
|
|
317
|
-
private closeGracePeriodMs;
|
|
318
|
-
constructor(options?: SSEConnectionManagerOptions);
|
|
319
|
-
/**
|
|
320
|
-
* Subscribe to an SSE endpoint
|
|
321
|
-
*
|
|
322
|
-
* If a connection already exists for this endpoint, reuses it.
|
|
323
|
-
* Otherwise, creates a new connection.
|
|
324
|
-
*
|
|
325
|
-
* @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
|
|
326
|
-
* @param subscriberId - Unique identifier for this subscriber (usually component instance)
|
|
327
|
-
* @param options - SSE connection options
|
|
328
|
-
* @returns Unsubscribe function to call when component unmounts
|
|
329
|
-
*/
|
|
299
|
+
interface SSEConnectionManagerLike {
|
|
330
300
|
subscribe(key: string, subscriberId: string, options: Omit<FetchEventSourceWithTokenRefreshOptions, 'signal'>): () => void;
|
|
331
|
-
/**
|
|
332
|
-
* Unsubscribe from an SSE endpoint
|
|
333
|
-
*
|
|
334
|
-
* If this is the last subscriber, closes the connection after grace period.
|
|
335
|
-
*/
|
|
336
|
-
private unsubscribe;
|
|
337
|
-
/**
|
|
338
|
-
* Force close a connection and all its subscribers
|
|
339
|
-
*/
|
|
340
301
|
closeConnection(key: string): void;
|
|
341
|
-
/**
|
|
342
|
-
* Get current connection status
|
|
343
|
-
*/
|
|
344
302
|
getConnectionInfo(): Map<string, {
|
|
345
303
|
url: string;
|
|
346
304
|
subscribers: number;
|
|
@@ -377,7 +335,7 @@ interface ElevasisFeaturesProviderProps {
|
|
|
377
335
|
features: FeatureModule[];
|
|
378
336
|
timeRange?: TimeRange;
|
|
379
337
|
operationsApiUrl?: string;
|
|
380
|
-
operationsSSEManager?:
|
|
338
|
+
operationsSSEManager?: SSEConnectionManagerLike;
|
|
381
339
|
children: ReactNode;
|
|
382
340
|
}
|
|
383
341
|
interface ElevasisFeaturesContextValue {
|
|
@@ -386,12 +344,13 @@ interface ElevasisFeaturesContextValue {
|
|
|
386
344
|
allFeatures: FeatureModule[];
|
|
387
345
|
timeRange?: TimeRange;
|
|
388
346
|
operationsApiUrl?: string;
|
|
389
|
-
operationsSSEManager?:
|
|
347
|
+
operationsSSEManager?: SSEConnectionManagerLike;
|
|
390
348
|
isFeatureEnabled: (key: string) => boolean;
|
|
391
349
|
getFeature: (key: string) => FeatureModule | undefined;
|
|
392
350
|
}
|
|
393
351
|
|
|
394
352
|
declare function useElevasisFeatures(): ElevasisFeaturesContextValue;
|
|
353
|
+
declare function useOptionalElevasisFeatures(): ElevasisFeaturesContextValue | null;
|
|
395
354
|
declare function ElevasisFeaturesProvider({ features, timeRange, operationsApiUrl, operationsSSEManager, children }: ElevasisFeaturesProviderProps): react_jsx_runtime.JSX.Element;
|
|
396
355
|
|
|
397
356
|
declare function FeatureShell({ children }: {
|
|
@@ -439,5 +398,5 @@ declare function useElevasisServices(): ElevasisServiceContextValue;
|
|
|
439
398
|
*/
|
|
440
399
|
declare function ElevasisServiceProvider({ apiRequest, organizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;
|
|
441
400
|
|
|
442
|
-
export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter };
|
|
401
|
+
export { AppearanceProvider, ElevasisCoreProvider, ElevasisFeaturesProvider, ElevasisServiceProvider, FeatureShell, NotificationProvider, useAppearance, useElevasisFeatures, useElevasisServices, useNotificationAdapter, useOptionalElevasisFeatures };
|
|
443
402
|
export type { ApiKeyConfig, AppearanceConfig, AuthConfig, AuthKitConfig, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisFeaturesContextValue, ElevasisFeaturesProviderProps, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisTokenOverrides, FeatureModule, FeatureNavEntry, FeatureNavLink, FeatureRegistry, FeatureSidebarComponent, NotificationAdapter, WithSchemes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter } from '../chunk-
|
|
1
|
+
export { ElevasisCoreProvider, ElevasisFeaturesProvider, FeatureShell, NotificationProvider, useElevasisFeatures, useNotificationAdapter, useOptionalElevasisFeatures } from '../chunk-45MS3IAW.js';
|
|
2
2
|
import '../chunk-5COLSYBE.js';
|
|
3
3
|
import '../chunk-NVOCKXUQ.js';
|
|
4
4
|
import '../chunk-2IFYDILW.js';
|
package/dist/sse/index.d.ts
CHANGED
|
@@ -32,6 +32,14 @@ interface SSEConnectionManagerOptions {
|
|
|
32
32
|
/** Grace period in ms before closing idle connections. Defaults to 5000. */
|
|
33
33
|
closeGracePeriodMs?: number;
|
|
34
34
|
}
|
|
35
|
+
interface SSEConnectionManagerLike {
|
|
36
|
+
subscribe(key: string, subscriberId: string, options: Omit<FetchEventSourceWithTokenRefreshOptions, 'signal'>): () => void;
|
|
37
|
+
closeConnection(key: string): void;
|
|
38
|
+
getConnectionInfo(): Map<string, {
|
|
39
|
+
url: string;
|
|
40
|
+
subscribers: number;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
35
43
|
/**
|
|
36
44
|
* SSE Connection Manager
|
|
37
45
|
*
|
|
@@ -44,7 +52,7 @@ interface SSEConnectionManagerOptions {
|
|
|
44
52
|
* - Automatically manages connection lifecycle
|
|
45
53
|
* - Shares single connection across multiple subscribers
|
|
46
54
|
*/
|
|
47
|
-
declare class SSEConnectionManager {
|
|
55
|
+
declare class SSEConnectionManager implements SSEConnectionManagerLike {
|
|
48
56
|
private connections;
|
|
49
57
|
private closeGracePeriodMs;
|
|
50
58
|
constructor(options?: SSEConnectionManagerOptions);
|
|
@@ -80,4 +88,4 @@ declare class SSEConnectionManager {
|
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
export { SSEConnectionManager, fetchEventSourceWithTokenRefresh };
|
|
83
|
-
export type { FetchEventSourceWithTokenRefreshOptions, SSEConnectionManagerOptions };
|
|
91
|
+
export type { FetchEventSourceWithTokenRefreshOptions, SSEConnectionManagerLike, SSEConnectionManagerOptions };
|