@odoo/owl 2.0.1 → 2.0.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/owl.cjs.js +77 -79
- package/dist/owl.es.js +77 -79
- package/dist/owl.iife.js +77 -79
- package/dist/owl.iife.min.js +1 -1
- package/dist/types/owl.d.ts +62 -69
- package/dist/types/runtime/component_node.d.ts +2 -2
- package/dist/types/runtime/index.d.ts +0 -1
- package/dist/types/runtime/reactivity.d.ts +6 -12
- package/dist/types/runtime/template_helpers.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import { Callback } from "./utils";
|
|
2
|
-
export declare const TARGET: unique symbol;
|
|
3
|
-
declare const SKIP: unique symbol;
|
|
4
2
|
declare type Target = object;
|
|
5
|
-
|
|
6
|
-
[TARGET]: any;
|
|
7
|
-
};
|
|
8
|
-
export declare type NonReactive<T extends Target = Target> = T & {
|
|
9
|
-
[SKIP]: any;
|
|
10
|
-
};
|
|
3
|
+
declare type Reactive<T extends Target> = T;
|
|
11
4
|
/**
|
|
12
5
|
* Mark an object or array so that it is ignored by the reactivity system
|
|
13
6
|
*
|
|
14
7
|
* @param value the value to mark
|
|
15
8
|
* @returns the object itself
|
|
16
9
|
*/
|
|
17
|
-
export declare function markRaw<T extends Target>(value: T):
|
|
10
|
+
export declare function markRaw<T extends Target>(value: T): T;
|
|
18
11
|
/**
|
|
19
12
|
* Given a reactive objet, return the raw (non reactive) underlying object
|
|
20
13
|
*
|
|
21
14
|
* @param value a reactive value
|
|
22
15
|
* @returns the underlying value
|
|
23
16
|
*/
|
|
24
|
-
export declare function toRaw<T extends
|
|
17
|
+
export declare function toRaw<T extends Target, U extends Reactive<T>>(value: U | T): T;
|
|
25
18
|
/**
|
|
26
19
|
* Clears all subscriptions of the Reactives associated with a given callback.
|
|
27
20
|
*
|
|
@@ -32,6 +25,7 @@ export declare function getSubscriptions(callback: Callback): {
|
|
|
32
25
|
target: object;
|
|
33
26
|
keys: PropertyKey[];
|
|
34
27
|
}[];
|
|
28
|
+
export declare const targets: WeakMap<object, object>;
|
|
35
29
|
/**
|
|
36
30
|
* Creates a reactive proxy for an object. Reading data on the reactive object
|
|
37
31
|
* subscribes to changes to the data. Writing data on the object will cause the
|
|
@@ -46,7 +40,7 @@ export declare function getSubscriptions(callback: Callback): {
|
|
|
46
40
|
* Subscriptions:
|
|
47
41
|
* + Reading a property on an object will subscribe you to changes in the value
|
|
48
42
|
* of that property.
|
|
49
|
-
* + Accessing an object keys (eg with Object.keys or with `for..in`) will
|
|
43
|
+
* + Accessing an object's keys (eg with Object.keys or with `for..in`) will
|
|
50
44
|
* subscribe you to the creation/deletion of keys. Checking the presence of a
|
|
51
45
|
* key on the object with 'in' has the same effect.
|
|
52
46
|
* - getOwnPropertyDescriptor does not currently subscribe you to the property.
|
|
@@ -59,5 +53,5 @@ export declare function getSubscriptions(callback: Callback): {
|
|
|
59
53
|
* reactive has changed
|
|
60
54
|
* @returns a proxy that tracks changes to it
|
|
61
55
|
*/
|
|
62
|
-
export declare function reactive<T extends Target>(target: T, callback?: Callback):
|
|
56
|
+
export declare function reactive<T extends Target>(target: T, callback?: Callback): T;
|
|
63
57
|
export {};
|
|
@@ -8,7 +8,7 @@ import { OwlError } from "./error_handling";
|
|
|
8
8
|
*/
|
|
9
9
|
declare function withDefault(value: any, defaultValue: any): any;
|
|
10
10
|
declare function callSlot(ctx: any, parent: any, key: string, name: string, dynamic: boolean, extra: any, defaultContent?: (ctx: any, node: any, key: string) => BDom): BDom;
|
|
11
|
-
declare function capture(ctx: any): any;
|
|
11
|
+
declare function capture(ctx: any, component: any): any;
|
|
12
12
|
declare function withKey(elem: any, k: string): any;
|
|
13
13
|
declare function prepareList(collection: any): [any[], any[], number, any[]];
|
|
14
14
|
declare function setContextValue(ctx: {
|
|
@@ -27,7 +27,7 @@ declare class LazyValue {
|
|
|
27
27
|
toString(): any;
|
|
28
28
|
}
|
|
29
29
|
export declare function safeOutput(value: any, defaultValue?: any): ReturnType<typeof toggler>;
|
|
30
|
-
declare function bind(
|
|
30
|
+
declare function bind(component: any, fn: Function): Function;
|
|
31
31
|
declare type RefMap = {
|
|
32
32
|
[key: string]: HTMLElement | null;
|
|
33
33
|
};
|