@vaadin/hilla-frontend 24.7.0-alpha9 → 24.7.0-beta2
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/Authentication.d.ts +53 -54
- package/Authentication.js +161 -145
- package/Authentication.js.map +1 -7
- package/Connect.d.ts +150 -146
- package/Connect.js +228 -177
- package/Connect.js.map +1 -7
- package/CookieManager.d.ts +2 -2
- package/CookieManager.js +5 -12
- package/CookieManager.js.map +1 -7
- package/CsrfUtils.d.ts +1 -13
- package/CsrfUtils.js +51 -51
- package/CsrfUtils.js.map +1 -7
- package/EndpointErrors.d.ts +73 -74
- package/EndpointErrors.js +108 -101
- package/EndpointErrors.js.map +1 -7
- package/FluxConnection.d.ts +51 -52
- package/FluxConnection.js +278 -259
- package/FluxConnection.js.map +1 -7
- package/FluxMessages.d.ts +14 -15
- package/FluxMessages.js +3 -6
- package/FluxMessages.js.map +1 -7
- package/index.d.ts +4 -5
- package/index.js +9 -15
- package/index.js.map +1 -7
- package/package.json +8 -28
- package/types.d.ts +17 -0
- package/Authentication.d.ts.map +0 -1
- package/Connect.d.ts.map +0 -1
- package/CookieManager.d.ts.map +0 -1
- package/CsrfUtils.d.ts.map +0 -1
- package/EndpointErrors.d.ts.map +0 -1
- package/FluxConnection.d.ts.map +0 -1
- package/FluxMessages.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
package/FluxConnection.d.ts
CHANGED
|
@@ -1,75 +1,74 @@
|
|
|
1
|
-
import type { Subscription } from
|
|
1
|
+
import type { Subscription } from "./Connect.js";
|
|
2
2
|
export declare enum State {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
ACTIVE = "active",
|
|
4
|
+
INACTIVE = "inactive",
|
|
5
|
+
RECONNECTING = "reconnecting",
|
|
6
6
|
}
|
|
7
7
|
type ActiveEvent = CustomEvent<{
|
|
8
|
-
|
|
8
|
+
active: boolean
|
|
9
9
|
}>;
|
|
10
10
|
interface EventMap {
|
|
11
|
-
|
|
11
|
+
"state-changed": ActiveEvent;
|
|
12
12
|
}
|
|
13
13
|
type ListenerType<T extends keyof EventMap> = ((this: FluxConnection, ev: EventMap[T]) => any) | {
|
|
14
|
-
|
|
14
|
+
handleEvent(ev: EventMap[T]): void
|
|
15
15
|
} | null;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Possible options for dealing with lost subscriptions after a websocket is reopened.
|
|
18
|
+
*/
|
|
19
19
|
export declare enum ActionOnLostSubscription {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The subscription should be resubscribed using the same server method and parameters.
|
|
22
|
+
*/
|
|
23
|
+
RESUBSCRIBE = "resubscribe",
|
|
24
|
+
/**
|
|
25
|
+
* The subscription should be removed.
|
|
26
|
+
*/
|
|
27
|
+
REMOVE = "remove",
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Possible states of a flux subscription.
|
|
31
|
+
*/
|
|
32
32
|
export declare enum FluxSubscriptionState {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The subscription is not connected and is trying to connect.
|
|
35
|
+
*/
|
|
36
|
+
CONNECTING = "connecting",
|
|
37
|
+
/**
|
|
38
|
+
* The subscription is connected and receiving updates.
|
|
39
|
+
*/
|
|
40
|
+
CONNECTED = "connected",
|
|
41
|
+
/**
|
|
42
|
+
* The subscription is closed and is not trying to reconnect.
|
|
43
|
+
*/
|
|
44
|
+
CLOSED = "closed",
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
* Event wrapper for flux subscription connection state change callback
|
|
48
|
+
*/
|
|
49
49
|
export type FluxSubscriptionStateChangeEvent = CustomEvent<{
|
|
50
|
-
|
|
50
|
+
state: FluxSubscriptionState
|
|
51
51
|
}>;
|
|
52
52
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
* A representation of the underlying persistent network connection used for subscribing to Flux type endpoint methods.
|
|
54
|
+
*/
|
|
55
55
|
export declare class FluxConnection extends EventTarget {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
#private;
|
|
57
|
+
state: State;
|
|
58
|
+
wasClosed: boolean;
|
|
59
|
+
constructor(connectPrefix: string, atmosphereOptions?: Partial<Atmosphere.Request>);
|
|
60
|
+
/**
|
|
61
|
+
* Subscribes to the flux returned by the given endpoint name + method name using the given parameters.
|
|
62
|
+
*
|
|
63
|
+
* @param endpointName - the endpoint to connect to
|
|
64
|
+
* @param methodName - the method in the endpoint to connect to
|
|
65
|
+
* @param parameters - the parameters to use
|
|
66
|
+
* @returns a subscription
|
|
67
|
+
*/
|
|
68
|
+
subscribe(endpointName: string, methodName: string, parameters?: unknown[]): Subscription<any>;
|
|
69
69
|
}
|
|
70
70
|
export interface FluxConnection {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
addEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
|
|
72
|
+
removeEventListener<T extends keyof EventMap>(type: T, listener: ListenerType<T>): void;
|
|
73
73
|
}
|
|
74
74
|
export {};
|
|
75
|
-
//# sourceMappingURL=FluxConnection.d.ts.map
|