lwc 3.8.0 → 4.0.0
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.d.ts +15 -18
- package/package.json +16 -16
package/index.d.ts
CHANGED
|
@@ -207,9 +207,9 @@ declare module 'lwc' {
|
|
|
207
207
|
* @param config configuration object for the adapter
|
|
208
208
|
*/
|
|
209
209
|
export function wire<
|
|
210
|
-
Config extends StringKeyedRecord
|
|
211
|
-
Value
|
|
212
|
-
Context extends StringKeyedRecord =
|
|
210
|
+
Config extends StringKeyedRecord,
|
|
211
|
+
Value,
|
|
212
|
+
Context extends StringKeyedRecord = StringKeyedRecord
|
|
213
213
|
>(
|
|
214
214
|
adapter:
|
|
215
215
|
| WireAdapterConstructor<Config, Value, Context>
|
|
@@ -217,51 +217,48 @@ declare module 'lwc' {
|
|
|
217
217
|
config?: WireConfigValue<Config>
|
|
218
218
|
): PropertyDecorator;
|
|
219
219
|
|
|
220
|
-
type LegacyWireAdapterConstructor<Config
|
|
220
|
+
type LegacyWireAdapterConstructor<Config, Value> = (config?: Config) => Value;
|
|
221
221
|
type WireConfigValue<Config extends StringKeyedRecord = StringKeyedRecord> = {
|
|
222
222
|
// wire reactive variables are strings prefixed with '$' so the config value can just be string
|
|
223
223
|
[K in keyof Config]: Config[K] | string;
|
|
224
224
|
};
|
|
225
225
|
type ContextValue<Context extends StringKeyedRecord = StringKeyedRecord> = Context;
|
|
226
226
|
|
|
227
|
-
interface WireAdapter<
|
|
228
|
-
Config extends StringKeyedRecord = any,
|
|
229
|
-
Context extends StringKeyedRecord = any
|
|
230
|
-
> {
|
|
227
|
+
interface WireAdapter<Config extends StringKeyedRecord, Context extends StringKeyedRecord> {
|
|
231
228
|
update(config: WireConfigValue<Config>, context?: ContextValue<Context>): void;
|
|
232
229
|
connect(): void;
|
|
233
230
|
disconnect(): void;
|
|
234
231
|
}
|
|
235
232
|
|
|
236
|
-
type WireDataCallback<Value
|
|
233
|
+
type WireDataCallback<Value> = (value: Value) => void;
|
|
237
234
|
type WireAdapterSchemaValue = 'optional' | 'required';
|
|
238
235
|
|
|
239
|
-
interface ContextConsumer<Context extends StringKeyedRecord
|
|
236
|
+
interface ContextConsumer<Context extends StringKeyedRecord> {
|
|
240
237
|
provide(newContext: ContextValue<Context>): void;
|
|
241
238
|
}
|
|
242
239
|
|
|
243
|
-
interface ContextProviderOptions<Context extends StringKeyedRecord
|
|
240
|
+
interface ContextProviderOptions<Context extends StringKeyedRecord> {
|
|
244
241
|
consumerConnectedCallback: (consumer: ContextConsumer<Context>) => void;
|
|
245
242
|
consumerDisconnectedCallback?: (consumer: ContextConsumer<Context>) => void;
|
|
246
243
|
}
|
|
247
244
|
|
|
248
245
|
interface WireAdapterConstructor<
|
|
249
|
-
Config extends StringKeyedRecord
|
|
250
|
-
Value
|
|
251
|
-
Context extends StringKeyedRecord
|
|
246
|
+
Config extends StringKeyedRecord,
|
|
247
|
+
Value,
|
|
248
|
+
Context extends StringKeyedRecord
|
|
252
249
|
> {
|
|
253
250
|
new (callback: WireDataCallback<Value>): WireAdapter<Config, Context>;
|
|
254
251
|
configSchema?: Record<keyof Config, WireAdapterSchemaValue>;
|
|
255
252
|
contextSchema?: Record<keyof Context, WireAdapterSchemaValue>;
|
|
256
253
|
}
|
|
257
254
|
|
|
258
|
-
type Contextualizer<Context extends StringKeyedRecord
|
|
255
|
+
type Contextualizer<Context extends StringKeyedRecord> = (
|
|
259
256
|
elm: EventTarget,
|
|
260
257
|
options: ContextProviderOptions<Context>
|
|
261
258
|
) => void;
|
|
262
259
|
export function createContextProvider<
|
|
263
|
-
Config extends StringKeyedRecord
|
|
264
|
-
Value
|
|
265
|
-
Context extends StringKeyedRecord =
|
|
260
|
+
Config extends StringKeyedRecord,
|
|
261
|
+
Value,
|
|
262
|
+
Context extends StringKeyedRecord = StringKeyedRecord
|
|
266
263
|
>(config: WireAdapterConstructor<Config, Value, Context>): Contextualizer<Context>;
|
|
267
264
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lwc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Lightning Web Components (LWC)",
|
|
5
5
|
"homepage": "https://lwc.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"*.d.ts"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@lwc/aria-reflection": "
|
|
24
|
-
"@lwc/babel-plugin-component": "
|
|
25
|
-
"@lwc/compiler": "
|
|
26
|
-
"@lwc/engine-core": "
|
|
27
|
-
"@lwc/engine-dom": "
|
|
28
|
-
"@lwc/engine-server": "
|
|
29
|
-
"@lwc/errors": "
|
|
30
|
-
"@lwc/features": "
|
|
31
|
-
"@lwc/module-resolver": "
|
|
32
|
-
"@lwc/rollup-plugin": "
|
|
33
|
-
"@lwc/shared": "
|
|
34
|
-
"@lwc/style-compiler": "
|
|
35
|
-
"@lwc/synthetic-shadow": "
|
|
36
|
-
"@lwc/template-compiler": "
|
|
37
|
-
"@lwc/wire-service": "
|
|
23
|
+
"@lwc/aria-reflection": "4.0.0",
|
|
24
|
+
"@lwc/babel-plugin-component": "4.0.0",
|
|
25
|
+
"@lwc/compiler": "4.0.0",
|
|
26
|
+
"@lwc/engine-core": "4.0.0",
|
|
27
|
+
"@lwc/engine-dom": "4.0.0",
|
|
28
|
+
"@lwc/engine-server": "4.0.0",
|
|
29
|
+
"@lwc/errors": "4.0.0",
|
|
30
|
+
"@lwc/features": "4.0.0",
|
|
31
|
+
"@lwc/module-resolver": "4.0.0",
|
|
32
|
+
"@lwc/rollup-plugin": "4.0.0",
|
|
33
|
+
"@lwc/shared": "4.0.0",
|
|
34
|
+
"@lwc/style-compiler": "4.0.0",
|
|
35
|
+
"@lwc/synthetic-shadow": "4.0.0",
|
|
36
|
+
"@lwc/template-compiler": "4.0.0",
|
|
37
|
+
"@lwc/wire-service": "4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"lwc": {
|
|
40
40
|
"modules": [
|