@luvio/lwc-luvio 0.138.1 → 0.138.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/es/es2018/lwcluvio.js +521 -521
- package/dist/es/es2018/{LWCGraphQLLuvioWireAdapter.d.ts → types/LWCGraphQLLuvioWireAdapter.d.ts} +56 -56
- package/dist/{umd/es2018 → es/es2018/types}/LWCInfiniteScrollingLuvioWireAdapter.d.ts +26 -26
- package/dist/{umd/es2018 → es/es2018/types}/LWCLuvioBindings.d.ts +4 -4
- package/dist/{umd/es5 → es/es2018/types}/LWCLuvioWireAdapter.d.ts +64 -64
- package/dist/es/es2018/{main.d.ts → types/main.d.ts} +8 -8
- package/dist/es/es2018/{utils → types/utils}/SnapshotState.d.ts +12 -12
- package/dist/es/es2018/{utils → types/utils}/constants.d.ts +5 -5
- package/dist/es/es2018/{utils → types/utils}/dataToTupleWeakMap.d.ts +2 -2
- package/dist/es/es2018/{utils → types/utils}/isPromise.d.ts +1 -1
- package/dist/es/es2018/{utils → types/utils}/language.d.ts +14 -14
- package/dist/{umd/es2018 → es/es2018/types}/utils/sanitize.d.ts +9 -9
- package/dist/{umd/es5 → es/es2018/types}/utils/throwAnnotatedError.d.ts +7 -7
- package/dist/umd/es2018/lwcluvio.js +521 -521
- package/dist/umd/{es5 → es2018/types}/LWCGraphQLLuvioWireAdapter.d.ts +56 -56
- package/dist/{es/es2018 → umd/es2018/types}/LWCInfiniteScrollingLuvioWireAdapter.d.ts +26 -26
- package/dist/umd/{es5 → es2018/types}/LWCLuvioBindings.d.ts +4 -4
- package/dist/umd/es2018/{LWCLuvioWireAdapter.d.ts → types/LWCLuvioWireAdapter.d.ts} +64 -64
- package/dist/umd/es2018/{main.d.ts → types/main.d.ts} +8 -8
- package/dist/umd/{es5 → es2018/types}/utils/SnapshotState.d.ts +12 -12
- package/dist/umd/es2018/{utils → types/utils}/constants.d.ts +5 -5
- package/dist/umd/es2018/{utils → types/utils}/dataToTupleWeakMap.d.ts +2 -2
- package/dist/umd/es2018/{utils → types/utils}/isPromise.d.ts +1 -1
- package/dist/umd/es2018/{utils → types/utils}/language.d.ts +14 -14
- package/dist/{es/es2018 → umd/es2018/types}/utils/sanitize.d.ts +9 -9
- package/dist/{es/es2018 → umd/es2018/types}/utils/throwAnnotatedError.d.ts +7 -7
- package/dist/umd/es5/lwcluvio.js +541 -541
- package/dist/umd/{es2018 → es5/types}/LWCGraphQLLuvioWireAdapter.d.ts +56 -56
- package/dist/umd/es5/{LWCInfiniteScrollingLuvioWireAdapter.d.ts → types/LWCInfiniteScrollingLuvioWireAdapter.d.ts} +26 -26
- package/dist/{es/es2018 → umd/es5/types}/LWCLuvioBindings.d.ts +4 -4
- package/dist/{es/es2018 → umd/es5/types}/LWCLuvioWireAdapter.d.ts +64 -64
- package/dist/umd/es5/{main.d.ts → types/main.d.ts} +8 -8
- package/dist/umd/{es2018 → es5/types}/utils/SnapshotState.d.ts +12 -12
- package/dist/umd/es5/{utils → types/utils}/constants.d.ts +5 -5
- package/dist/umd/es5/{utils → types/utils}/dataToTupleWeakMap.d.ts +2 -2
- package/dist/umd/es5/{utils → types/utils}/isPromise.d.ts +1 -1
- package/dist/umd/es5/{utils → types/utils}/language.d.ts +14 -14
- package/dist/umd/es5/{utils → types/utils}/sanitize.d.ts +9 -9
- package/dist/umd/{es2018 → es5/types}/utils/throwAnnotatedError.d.ts +7 -7
- package/package.json +7 -7
package/dist/es/es2018/{LWCGraphQLLuvioWireAdapter.d.ts → types/LWCGraphQLLuvioWireAdapter.d.ts}
RENAMED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import type { Adapter, Luvio } from '@luvio/engine';
|
|
2
|
-
import type { WireConfigValue, WireContextValue, DataCallback, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
-
import type { AstResolver, DocumentNode } from '@luvio/graphql-parser';
|
|
4
|
-
import { LWCLuvioWireAdapter } from './LWCLuvioWireAdapter';
|
|
5
|
-
import type { EmittableSnapshot } from './utils/SnapshotState';
|
|
6
|
-
export declare type GraphQLError = {
|
|
7
|
-
message: string;
|
|
8
|
-
locations?: Array<{
|
|
9
|
-
line: number;
|
|
10
|
-
column: number;
|
|
11
|
-
}>;
|
|
12
|
-
path?: Array<string | number>;
|
|
13
|
-
extensions?: Record<string, any>;
|
|
14
|
-
};
|
|
15
|
-
export interface GraphQLUserInput {
|
|
16
|
-
query?: object;
|
|
17
|
-
variables?: Record<string, string | number | boolean>;
|
|
18
|
-
operationName?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ResolvedGraphQLConfig extends GraphQLUserInput {
|
|
21
|
-
query?: DocumentNode;
|
|
22
|
-
}
|
|
23
|
-
export interface GraphQLBatchUserInput {
|
|
24
|
-
batchQuery: GraphQLUserInput[];
|
|
25
|
-
}
|
|
26
|
-
export declare type GraphQLInput = GraphQLUserInput | GraphQLBatchUserInput;
|
|
27
|
-
export declare type GraphQLResponse = {
|
|
28
|
-
data: any;
|
|
29
|
-
errors?: GraphQLError[];
|
|
30
|
-
} | {
|
|
31
|
-
errors: GraphQLError[];
|
|
32
|
-
};
|
|
33
|
-
export declare class LWCGraphQLLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
34
|
-
astResolver: AstResolver;
|
|
35
|
-
constructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, astResolver: AstResolver, callback: DataCallback);
|
|
36
|
-
update(config: WireConfigValue, _context?: WireContextValue): void;
|
|
37
|
-
/**
|
|
38
|
-
* Emits new values to the callback.
|
|
39
|
-
*
|
|
40
|
-
* @param snapshot Snapshot to be emitted, if omitted then undefineds will be emitted
|
|
41
|
-
*/
|
|
42
|
-
protected emit(snapshot?: EmittableSnapshot<GraphQLResponse>): void;
|
|
43
|
-
/**
|
|
44
|
-
* Coerce config before calling the adapter, preserve current behavior otherwise
|
|
45
|
-
*/
|
|
46
|
-
protected callAdapter(): void;
|
|
47
|
-
resolveQueryAst(config: GraphQLUserInput): ResolvedGraphQLConfig | undefined;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Wraps a luvio Adapter in a WireAdapterConstructor that conforms to https://rfcs.lwc.dev/rfcs/lwc/0000-wire-reform#wire-adapter-protocol.
|
|
51
|
-
*
|
|
52
|
-
* @param adapter Adapter
|
|
53
|
-
* @param name name to assign to the generated constructor
|
|
54
|
-
* @param luvio Luvio
|
|
55
|
-
*/
|
|
56
|
-
export declare function createGraphQLWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, astResolver: AstResolver): WireAdapterConstructor;
|
|
1
|
+
import type { Adapter, Luvio } from '@luvio/engine';
|
|
2
|
+
import type { WireConfigValue, WireContextValue, DataCallback, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
+
import type { AstResolver, DocumentNode } from '@luvio/graphql-parser';
|
|
4
|
+
import { LWCLuvioWireAdapter } from './LWCLuvioWireAdapter';
|
|
5
|
+
import type { EmittableSnapshot } from './utils/SnapshotState';
|
|
6
|
+
export declare type GraphQLError = {
|
|
7
|
+
message: string;
|
|
8
|
+
locations?: Array<{
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
}>;
|
|
12
|
+
path?: Array<string | number>;
|
|
13
|
+
extensions?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
export interface GraphQLUserInput {
|
|
16
|
+
query?: object;
|
|
17
|
+
variables?: Record<string, string | number | boolean>;
|
|
18
|
+
operationName?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ResolvedGraphQLConfig extends GraphQLUserInput {
|
|
21
|
+
query?: DocumentNode;
|
|
22
|
+
}
|
|
23
|
+
export interface GraphQLBatchUserInput {
|
|
24
|
+
batchQuery: GraphQLUserInput[];
|
|
25
|
+
}
|
|
26
|
+
export declare type GraphQLInput = GraphQLUserInput | GraphQLBatchUserInput;
|
|
27
|
+
export declare type GraphQLResponse = {
|
|
28
|
+
data: any;
|
|
29
|
+
errors?: GraphQLError[];
|
|
30
|
+
} | {
|
|
31
|
+
errors: GraphQLError[];
|
|
32
|
+
};
|
|
33
|
+
export declare class LWCGraphQLLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
34
|
+
astResolver: AstResolver;
|
|
35
|
+
constructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, astResolver: AstResolver, callback: DataCallback);
|
|
36
|
+
update(config: WireConfigValue, _context?: WireContextValue): void;
|
|
37
|
+
/**
|
|
38
|
+
* Emits new values to the callback.
|
|
39
|
+
*
|
|
40
|
+
* @param snapshot Snapshot to be emitted, if omitted then undefineds will be emitted
|
|
41
|
+
*/
|
|
42
|
+
protected emit(snapshot?: EmittableSnapshot<GraphQLResponse>): void;
|
|
43
|
+
/**
|
|
44
|
+
* Coerce config before calling the adapter, preserve current behavior otherwise
|
|
45
|
+
*/
|
|
46
|
+
protected callAdapter(): void;
|
|
47
|
+
resolveQueryAst(config: GraphQLUserInput): ResolvedGraphQLConfig | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Wraps a luvio Adapter in a WireAdapterConstructor that conforms to https://rfcs.lwc.dev/rfcs/lwc/0000-wire-reform#wire-adapter-protocol.
|
|
51
|
+
*
|
|
52
|
+
* @param adapter Adapter
|
|
53
|
+
* @param name name to assign to the generated constructor
|
|
54
|
+
* @param luvio Luvio
|
|
55
|
+
*/
|
|
56
|
+
export declare function createGraphQLWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, astResolver: AstResolver): WireAdapterConstructor;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { Adapter, Luvio } from '@luvio/engine';
|
|
2
|
-
import type { WireConfigValue, WireContextValue, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
-
import { LWCLuvioWireAdapter } from './LWCLuvioWireAdapter';
|
|
4
|
-
export declare class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
5
|
-
private connectTimestamp?;
|
|
6
|
-
/**
|
|
7
|
-
* Called when the component associated with the wire adapter is connected.
|
|
8
|
-
*/
|
|
9
|
-
connect(): void;
|
|
10
|
-
/**
|
|
11
|
-
* Called when the component associated with the wire adapter is disconnected.
|
|
12
|
-
*/
|
|
13
|
-
disconnect(): void;
|
|
14
|
-
/**
|
|
15
|
-
* Called when new or updated config is supplied to the wire adapter.
|
|
16
|
-
*
|
|
17
|
-
* @param config new config parameters for the wire adapter
|
|
18
|
-
* @param context context for the wire adapter
|
|
19
|
-
*/
|
|
20
|
-
update(config: WireConfigValue, context?: WireContextValue): void;
|
|
21
|
-
/**
|
|
22
|
-
* Calls the adapter if config has been set and the component is connected.
|
|
23
|
-
*/
|
|
24
|
-
private callAdapterWithContext;
|
|
25
|
-
}
|
|
26
|
-
export declare function createInfiniteScrollingWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio): WireAdapterConstructor;
|
|
1
|
+
import type { Adapter, Luvio } from '@luvio/engine';
|
|
2
|
+
import type { WireConfigValue, WireContextValue, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
+
import { LWCLuvioWireAdapter } from './LWCLuvioWireAdapter';
|
|
4
|
+
export declare class LWCInfinteScrollingLuvioWireAdapter extends LWCLuvioWireAdapter {
|
|
5
|
+
private connectTimestamp?;
|
|
6
|
+
/**
|
|
7
|
+
* Called when the component associated with the wire adapter is connected.
|
|
8
|
+
*/
|
|
9
|
+
connect(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Called when the component associated with the wire adapter is disconnected.
|
|
12
|
+
*/
|
|
13
|
+
disconnect(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Called when new or updated config is supplied to the wire adapter.
|
|
16
|
+
*
|
|
17
|
+
* @param config new config parameters for the wire adapter
|
|
18
|
+
* @param context context for the wire adapter
|
|
19
|
+
*/
|
|
20
|
+
update(config: WireConfigValue, context?: WireContextValue): void;
|
|
21
|
+
/**
|
|
22
|
+
* Calls the adapter if config has been set and the component is connected.
|
|
23
|
+
*/
|
|
24
|
+
private callAdapterWithContext;
|
|
25
|
+
}
|
|
26
|
+
export declare function createInfiniteScrollingWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio): WireAdapterConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Luvio } from '@luvio/engine';
|
|
2
|
-
import { dataToTupleWeakMap } from './utils/dataToTupleWeakMap';
|
|
3
|
-
export declare function bindWireRefresh(luvio: Luvio): <D>(data: D) => Promise<undefined> | undefined;
|
|
4
|
-
export declare function refreshData<D>(data: D, dataToTuple: typeof dataToTupleWeakMap, luvio: Luvio): Promise<undefined> | undefined;
|
|
1
|
+
import type { Luvio } from '@luvio/engine';
|
|
2
|
+
import { dataToTupleWeakMap } from './utils/dataToTupleWeakMap';
|
|
3
|
+
export declare function bindWireRefresh(luvio: Luvio): <D>(data: D) => Promise<undefined> | undefined;
|
|
4
|
+
export declare function refreshData<D>(data: D, dataToTuple: typeof dataToTupleWeakMap, luvio: Luvio): Promise<undefined> | undefined;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import type { Adapter, Luvio, Unsubscribe } from '@luvio/engine';
|
|
2
|
-
import type { WireConfigValue, WireContextValue, DataCallback, WireAdapter, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
-
import type { EmittableSnapshot } from './utils/SnapshotState';
|
|
4
|
-
export declare class LWCLuvioWireAdapter implements WireAdapter {
|
|
5
|
-
adapter: Adapter<unknown, unknown>;
|
|
6
|
-
name: string;
|
|
7
|
-
callback: DataCallback;
|
|
8
|
-
config?: unknown;
|
|
9
|
-
connected: boolean;
|
|
10
|
-
luvio: Luvio;
|
|
11
|
-
unsubscriber?: Unsubscribe;
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a new wire adapter instance for the given adapter.
|
|
14
|
-
*
|
|
15
|
-
* @param callback callback to be invoked with new values
|
|
16
|
-
*/
|
|
17
|
-
constructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, callback: DataCallback);
|
|
18
|
-
/**
|
|
19
|
-
* Called when the component associated with the wire adapter is connected.
|
|
20
|
-
*/
|
|
21
|
-
connect(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Called when the component associated with the wire adapter is disconnected.
|
|
24
|
-
*/
|
|
25
|
-
disconnect(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Called when new or updated config is supplied to the wire adapter.
|
|
28
|
-
*
|
|
29
|
-
* @param config new config parameters for the wire adapter
|
|
30
|
-
* @param _context not used
|
|
31
|
-
*/
|
|
32
|
-
update(config: WireConfigValue, _context?: WireContextValue): void;
|
|
33
|
-
/**
|
|
34
|
-
* Calls the adapter if config has been set and the component is connected.
|
|
35
|
-
*/
|
|
36
|
-
protected callAdapter(): void;
|
|
37
|
-
protected processAdapterResponse(snapshotOrPromise: ReturnType<Adapter<unknown, unknown>>): void;
|
|
38
|
-
/**
|
|
39
|
-
* Emits new values to the callback.
|
|
40
|
-
*
|
|
41
|
-
* @param snapshot Snapshot to be emitted, if omitted then undefineds will be emitted
|
|
42
|
-
*/
|
|
43
|
-
protected emit(snapshot?: EmittableSnapshot): void;
|
|
44
|
-
/**
|
|
45
|
-
* Subscribes this wire adapter to future changes to the specified snapshot. Any changes
|
|
46
|
-
* to the snapshot will be automatically emitted to the component.
|
|
47
|
-
*
|
|
48
|
-
* @param snapshot Snapshot
|
|
49
|
-
* @param subscriptionCallback callback
|
|
50
|
-
*/
|
|
51
|
-
private subscribe;
|
|
52
|
-
/**
|
|
53
|
-
* Deletes this wire adapter's snapshot subscription (if any).
|
|
54
|
-
*/
|
|
55
|
-
protected unsubscribe(): void;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Wraps a luvio Adapter in a WireAdapterConstructor that conforms to https://rfcs.lwc.dev/rfcs/lwc/0000-wire-reform#wire-adapter-protocol.
|
|
59
|
-
*
|
|
60
|
-
* @param adapter Adapter
|
|
61
|
-
* @param name name to assign to the generated constructor
|
|
62
|
-
* @param luvio Luvio
|
|
63
|
-
*/
|
|
64
|
-
export declare function createWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio): WireAdapterConstructor;
|
|
1
|
+
import type { Adapter, Luvio, Unsubscribe } from '@luvio/engine';
|
|
2
|
+
import type { WireConfigValue, WireContextValue, DataCallback, WireAdapter, WireAdapterConstructor } from '@lwc/engine-core';
|
|
3
|
+
import type { EmittableSnapshot } from './utils/SnapshotState';
|
|
4
|
+
export declare class LWCLuvioWireAdapter implements WireAdapter {
|
|
5
|
+
adapter: Adapter<unknown, unknown>;
|
|
6
|
+
name: string;
|
|
7
|
+
callback: DataCallback;
|
|
8
|
+
config?: unknown;
|
|
9
|
+
connected: boolean;
|
|
10
|
+
luvio: Luvio;
|
|
11
|
+
unsubscriber?: Unsubscribe;
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a new wire adapter instance for the given adapter.
|
|
14
|
+
*
|
|
15
|
+
* @param callback callback to be invoked with new values
|
|
16
|
+
*/
|
|
17
|
+
constructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio, callback: DataCallback);
|
|
18
|
+
/**
|
|
19
|
+
* Called when the component associated with the wire adapter is connected.
|
|
20
|
+
*/
|
|
21
|
+
connect(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the component associated with the wire adapter is disconnected.
|
|
24
|
+
*/
|
|
25
|
+
disconnect(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when new or updated config is supplied to the wire adapter.
|
|
28
|
+
*
|
|
29
|
+
* @param config new config parameters for the wire adapter
|
|
30
|
+
* @param _context not used
|
|
31
|
+
*/
|
|
32
|
+
update(config: WireConfigValue, _context?: WireContextValue): void;
|
|
33
|
+
/**
|
|
34
|
+
* Calls the adapter if config has been set and the component is connected.
|
|
35
|
+
*/
|
|
36
|
+
protected callAdapter(): void;
|
|
37
|
+
protected processAdapterResponse(snapshotOrPromise: ReturnType<Adapter<unknown, unknown>>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Emits new values to the callback.
|
|
40
|
+
*
|
|
41
|
+
* @param snapshot Snapshot to be emitted, if omitted then undefineds will be emitted
|
|
42
|
+
*/
|
|
43
|
+
protected emit(snapshot?: EmittableSnapshot): void;
|
|
44
|
+
/**
|
|
45
|
+
* Subscribes this wire adapter to future changes to the specified snapshot. Any changes
|
|
46
|
+
* to the snapshot will be automatically emitted to the component.
|
|
47
|
+
*
|
|
48
|
+
* @param snapshot Snapshot
|
|
49
|
+
* @param subscriptionCallback callback
|
|
50
|
+
*/
|
|
51
|
+
private subscribe;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes this wire adapter's snapshot subscription (if any).
|
|
54
|
+
*/
|
|
55
|
+
protected unsubscribe(): void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Wraps a luvio Adapter in a WireAdapterConstructor that conforms to https://rfcs.lwc.dev/rfcs/lwc/0000-wire-reform#wire-adapter-protocol.
|
|
59
|
+
*
|
|
60
|
+
* @param adapter Adapter
|
|
61
|
+
* @param name name to assign to the generated constructor
|
|
62
|
+
* @param luvio Luvio
|
|
63
|
+
*/
|
|
64
|
+
export declare function createWireAdapterConstructor(adapter: Adapter<unknown, unknown>, name: string, luvio: Luvio): WireAdapterConstructor;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR } from './utils/constants';
|
|
2
|
-
import { bindWireRefresh, refreshData } from './LWCLuvioBindings';
|
|
3
|
-
import { createWireAdapterConstructor } from './LWCLuvioWireAdapter';
|
|
4
|
-
import { createInfiniteScrollingWireAdapterConstructor } from './LWCInfiniteScrollingLuvioWireAdapter';
|
|
5
|
-
import { createGraphQLWireAdapterConstructor } from './LWCGraphQLLuvioWireAdapter';
|
|
6
|
-
import type { GraphQLError, GraphQLResponse, GraphQLBatchUserInput, GraphQLInput, GraphQLUserInput } from './LWCGraphQLLuvioWireAdapter';
|
|
7
|
-
export { createWireAdapterConstructor, createInfiniteScrollingWireAdapterConstructor, createGraphQLWireAdapterConstructor, bindWireRefresh, refreshData, REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, };
|
|
8
|
-
export type { GraphQLError, GraphQLResponse, GraphQLBatchUserInput, GraphQLUserInput, GraphQLInput, };
|
|
1
|
+
import { REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR } from './utils/constants';
|
|
2
|
+
import { bindWireRefresh, refreshData } from './LWCLuvioBindings';
|
|
3
|
+
import { createWireAdapterConstructor } from './LWCLuvioWireAdapter';
|
|
4
|
+
import { createInfiniteScrollingWireAdapterConstructor } from './LWCInfiniteScrollingLuvioWireAdapter';
|
|
5
|
+
import { createGraphQLWireAdapterConstructor } from './LWCGraphQLLuvioWireAdapter';
|
|
6
|
+
import type { GraphQLError, GraphQLResponse, GraphQLBatchUserInput, GraphQLInput, GraphQLUserInput } from './LWCGraphQLLuvioWireAdapter';
|
|
7
|
+
export { createWireAdapterConstructor, createInfiniteScrollingWireAdapterConstructor, createGraphQLWireAdapterConstructor, bindWireRefresh, refreshData, REFRESH_ADAPTER_EVENT, ADAPTER_UNFULFILLED_ERROR, };
|
|
8
|
+
export type { GraphQLError, GraphQLResponse, GraphQLBatchUserInput, GraphQLUserInput, GraphQLInput, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ErrorSnapshot, Snapshot, StaleSnapshot, FulfilledSnapshot, UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
-
export declare function isErrorSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is ErrorSnapshot;
|
|
3
|
-
export declare function isFulfilledSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is FulfilledSnapshot<unknown, unknown>;
|
|
4
|
-
export declare function isStaleSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is StaleSnapshot<unknown, unknown>;
|
|
5
|
-
export declare function isUnfulfilledSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is UnfulfilledSnapshot<unknown, unknown>;
|
|
6
|
-
export declare type EmittableSnapshot<T = unknown> = FulfilledSnapshot<T> | StaleSnapshot<T> | ErrorSnapshot;
|
|
7
|
-
/**
|
|
8
|
-
* Transform a Snapshot into a payload suitable for passing to a DataCallback.
|
|
9
|
-
*
|
|
10
|
-
* @param snapshot Snapshot
|
|
11
|
-
*/
|
|
12
|
-
export declare function snapshotToPayload(snapshot?: EmittableSnapshot): any;
|
|
1
|
+
import type { ErrorSnapshot, Snapshot, StaleSnapshot, FulfilledSnapshot, UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
+
export declare function isErrorSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is ErrorSnapshot;
|
|
3
|
+
export declare function isFulfilledSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is FulfilledSnapshot<unknown, unknown>;
|
|
4
|
+
export declare function isStaleSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is StaleSnapshot<unknown, unknown>;
|
|
5
|
+
export declare function isUnfulfilledSnapshot(snapshot: Snapshot<unknown, unknown>): snapshot is UnfulfilledSnapshot<unknown, unknown>;
|
|
6
|
+
export declare type EmittableSnapshot<T = unknown> = FulfilledSnapshot<T> | StaleSnapshot<T> | ErrorSnapshot;
|
|
7
|
+
/**
|
|
8
|
+
* Transform a Snapshot into a payload suitable for passing to a DataCallback.
|
|
9
|
+
*
|
|
10
|
+
* @param snapshot Snapshot
|
|
11
|
+
*/
|
|
12
|
+
export declare function snapshotToPayload(snapshot?: EmittableSnapshot): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const REFRESH_ADAPTER_EVENT = "refresh-adapter-event";
|
|
2
|
-
export declare const ADAPTER_UNFULFILLED_ERROR = "adapter-unfulfilled-error";
|
|
3
|
-
export declare const USERLAND_PROVISION_ERROR_MESSAGE = "LWC component's @wire target property or method threw an error during value provisioning. Original error:";
|
|
4
|
-
export declare const ADAPTER_SNAPSHOT_REJECTED_MESSAGE = "Luvio wire adapter Promise<Snapshot> rejected. Original error:";
|
|
5
|
-
export declare const USERLAND_GRAPHQL_PARSER_ERROR_MESSAGE = "Use `gql` parser to parse your \"query\" string";
|
|
1
|
+
export declare const REFRESH_ADAPTER_EVENT = "refresh-adapter-event";
|
|
2
|
+
export declare const ADAPTER_UNFULFILLED_ERROR = "adapter-unfulfilled-error";
|
|
3
|
+
export declare const USERLAND_PROVISION_ERROR_MESSAGE = "LWC component's @wire target property or method threw an error during value provisioning. Original error:";
|
|
4
|
+
export declare const ADAPTER_SNAPSHOT_REJECTED_MESSAGE = "Luvio wire adapter Promise<Snapshot> rejected. Original error:";
|
|
5
|
+
export declare const USERLAND_GRAPHQL_PARSER_ERROR_MESSAGE = "Use `gql` parser to parse your \"query\" string";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Snapshot } from '@luvio/engine';
|
|
2
|
-
export declare const dataToTupleWeakMap: WeakMap<any, [string, Snapshot<unknown, unknown> | undefined]>;
|
|
1
|
+
import type { Snapshot } from '@luvio/engine';
|
|
2
|
+
export declare const dataToTupleWeakMap: WeakMap<any, [string, Snapshot<unknown, unknown> | undefined]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isPromise<U>(value: Promise<U> | U): value is Promise<U>;
|
|
1
|
+
export declare function isPromise<U>(value: Promise<U> | U): value is Promise<U>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare const freeze: {
|
|
2
|
-
<T>(a: T[]): readonly T[];
|
|
3
|
-
<T_1 extends Function>(f: T_1): T_1;
|
|
4
|
-
<T_2>(o: T_2): Readonly<T_2>;
|
|
5
|
-
}, keys: {
|
|
6
|
-
(o: object): string[];
|
|
7
|
-
(o: {}): string[];
|
|
8
|
-
};
|
|
9
|
-
declare const isArray: (arg: any) => arg is any[];
|
|
10
|
-
declare const stringify: {
|
|
11
|
-
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
12
|
-
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
13
|
-
};
|
|
14
|
-
export { freeze as ObjectFreeze, keys as ObjectKeys, isArray as ArrayIsArray, stringify as JSONStringify, };
|
|
1
|
+
declare const freeze: {
|
|
2
|
+
<T>(a: T[]): readonly T[];
|
|
3
|
+
<T_1 extends Function>(f: T_1): T_1;
|
|
4
|
+
<T_2>(o: T_2): Readonly<T_2>;
|
|
5
|
+
}, keys: {
|
|
6
|
+
(o: object): string[];
|
|
7
|
+
(o: {}): string[];
|
|
8
|
+
};
|
|
9
|
+
declare const isArray: (arg: any) => arg is any[];
|
|
10
|
+
declare const stringify: {
|
|
11
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
12
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
13
|
+
};
|
|
14
|
+
export { freeze as ObjectFreeze, keys as ObjectKeys, isArray as ArrayIsArray, stringify as JSONStringify, };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a sanitized version of an object by recursively unwrapping the Proxies.
|
|
3
|
-
*
|
|
4
|
-
* In order to keep luvio performance optimal on IE11, we need to make sure that luvio code gets
|
|
5
|
-
* transformed by the es5-proxy-compat. At the same time we need to ensure that no ProxyCompat leaks
|
|
6
|
-
* into the luvio engine code nor into the adapters. All the data coming from LWC-land need to be
|
|
7
|
-
* sanitized first.
|
|
8
|
-
*/
|
|
9
|
-
export default function sanitize<T extends object>(obj: T): T;
|
|
1
|
+
/**
|
|
2
|
+
* Returns a sanitized version of an object by recursively unwrapping the Proxies.
|
|
3
|
+
*
|
|
4
|
+
* In order to keep luvio performance optimal on IE11, we need to make sure that luvio code gets
|
|
5
|
+
* transformed by the es5-proxy-compat. At the same time we need to ensure that no ProxyCompat leaks
|
|
6
|
+
* into the luvio engine code nor into the adapters. All the data coming from LWC-land need to be
|
|
7
|
+
* sanitized first.
|
|
8
|
+
*/
|
|
9
|
+
export default function sanitize<T extends object>(obj: T): T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* (Re)throws an error after adding a prefix to the message.
|
|
3
|
-
*
|
|
4
|
-
* @param error Error
|
|
5
|
-
* @param messagePrefix prefix to add to error's message
|
|
6
|
-
*/
|
|
7
|
-
export declare function throwAnnotatedError(error: unknown, messagePrefix: string): never;
|
|
1
|
+
/**
|
|
2
|
+
* (Re)throws an error after adding a prefix to the message.
|
|
3
|
+
*
|
|
4
|
+
* @param error Error
|
|
5
|
+
* @param messagePrefix prefix to add to error's message
|
|
6
|
+
*/
|
|
7
|
+
export declare function throwAnnotatedError(error: unknown, messagePrefix: string): never;
|