@odoo/owl 3.0.0-alpha.13 → 3.0.0-alpha.15
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/compile_templates.mjs +2443 -2435
- package/dist/owl.cjs.js +6476 -6381
- package/dist/owl.es.js +6475 -6379
- package/dist/owl.iife.js +6476 -6381
- package/dist/owl.iife.min.js +1 -1
- package/dist/types/common/owl_error.d.ts +3 -3
- package/dist/types/common/utils.d.ts +8 -8
- package/dist/types/compiler/code_generator.d.ts +150 -150
- package/dist/types/compiler/index.d.ts +13 -13
- package/dist/types/compiler/inline_expressions.d.ts +59 -59
- package/dist/types/compiler/parser.d.ts +171 -171
- package/dist/types/compiler/standalone/index.d.ts +2 -2
- package/dist/types/compiler/standalone/setup_jsdom.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/owl.d.ts +682 -672
- package/dist/types/runtime/app.d.ts +58 -57
- package/dist/types/runtime/blockdom/attributes.d.ts +6 -6
- package/dist/types/runtime/blockdom/block_compiler.d.ts +21 -21
- package/dist/types/runtime/blockdom/config.d.ts +8 -8
- package/dist/types/runtime/blockdom/event_catcher.d.ts +7 -7
- package/dist/types/runtime/blockdom/events.d.ts +8 -8
- package/dist/types/runtime/blockdom/html.d.ts +17 -17
- package/dist/types/runtime/blockdom/index.d.ts +26 -26
- package/dist/types/runtime/blockdom/list.d.ts +18 -18
- package/dist/types/runtime/blockdom/multi.d.ts +17 -17
- package/dist/types/runtime/blockdom/text.d.ts +26 -26
- package/dist/types/runtime/blockdom/toggler.d.ts +17 -17
- package/dist/types/runtime/component.d.ts +17 -18
- package/dist/types/runtime/component_node.d.ts +61 -61
- package/dist/types/runtime/event_handling.d.ts +1 -1
- package/dist/types/runtime/hooks.d.ts +34 -33
- package/dist/types/runtime/index.d.ts +43 -43
- package/dist/types/runtime/lifecycle_hooks.d.ts +10 -10
- package/dist/types/runtime/plugins.d.ts +36 -29
- package/dist/types/runtime/portal.d.ts +12 -12
- package/dist/types/runtime/props.d.ts +21 -17
- package/dist/types/runtime/reactivity/computations.d.ts +31 -31
- package/dist/types/runtime/reactivity/computed.d.ts +7 -7
- package/dist/types/runtime/reactivity/effect.d.ts +2 -2
- package/dist/types/runtime/reactivity/proxy.d.ts +48 -48
- package/dist/types/runtime/reactivity/signal.d.ts +18 -18
- package/dist/types/runtime/registry.d.ts +24 -20
- package/dist/types/runtime/rendering/error_handling.d.ts +13 -13
- package/dist/types/runtime/rendering/fibers.d.ts +37 -37
- package/dist/types/runtime/rendering/scheduler.d.ts +21 -21
- package/dist/types/runtime/rendering/template_helpers.d.ts +50 -50
- package/dist/types/runtime/resource.d.ts +17 -15
- package/dist/types/runtime/status.d.ts +9 -9
- package/dist/types/runtime/template_set.d.ts +39 -39
- package/dist/types/runtime/types.d.ts +62 -31
- package/dist/types/runtime/utils.d.ts +24 -24
- package/dist/types/runtime/validation.d.ts +19 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +13 -11
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
import { CustomDirectives } from ".";
|
|
2
|
-
export type EventHandlers = {
|
|
3
|
-
[eventName: string]: string;
|
|
4
|
-
};
|
|
5
|
-
export type Attrs = {
|
|
6
|
-
[attrs: string]: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const enum ASTType {
|
|
9
|
-
Text = 0,
|
|
10
|
-
Comment = 1,
|
|
11
|
-
DomNode = 2,
|
|
12
|
-
Multi = 3,
|
|
13
|
-
TIf = 4,
|
|
14
|
-
TSet = 5,
|
|
15
|
-
TCall = 6,
|
|
16
|
-
TOut = 7,
|
|
17
|
-
TForEach = 8,
|
|
18
|
-
TKey = 9,
|
|
19
|
-
TComponent = 10,
|
|
20
|
-
TDebug = 11,
|
|
21
|
-
TLog = 12,
|
|
22
|
-
TCallSlot = 13,
|
|
23
|
-
TCallBlock = 14,
|
|
24
|
-
TTranslation = 15,
|
|
25
|
-
TTranslationContext = 16,
|
|
26
|
-
TPortal = 17
|
|
27
|
-
}
|
|
28
|
-
export interface BaseAST {
|
|
29
|
-
type: ASTType;
|
|
30
|
-
hasNoRepresentation?: true;
|
|
31
|
-
}
|
|
32
|
-
export interface ASTText extends BaseAST {
|
|
33
|
-
type: ASTType.Text;
|
|
34
|
-
value: string;
|
|
35
|
-
}
|
|
36
|
-
export interface ASTComment extends BaseAST {
|
|
37
|
-
type: ASTType.Comment;
|
|
38
|
-
value: string;
|
|
39
|
-
}
|
|
40
|
-
interface TModelInfo {
|
|
41
|
-
expr: string;
|
|
42
|
-
targetAttr: string;
|
|
43
|
-
eventType: "change" | "click" | "input";
|
|
44
|
-
shouldTrim: boolean;
|
|
45
|
-
shouldNumberize: boolean;
|
|
46
|
-
hasDynamicChildren: boolean;
|
|
47
|
-
specialInitTargetAttr: string | null;
|
|
48
|
-
}
|
|
49
|
-
export interface ASTDomNode extends BaseAST {
|
|
50
|
-
type: ASTType.DomNode;
|
|
51
|
-
tag: string;
|
|
52
|
-
content: AST[];
|
|
53
|
-
attrs: Attrs | null;
|
|
54
|
-
attrsTranslationCtx: Attrs | null;
|
|
55
|
-
ref: string | null;
|
|
56
|
-
on: EventHandlers | null;
|
|
57
|
-
model: TModelInfo | null;
|
|
58
|
-
dynamicTag: string | null;
|
|
59
|
-
ns: string | null;
|
|
60
|
-
}
|
|
61
|
-
export interface ASTMulti extends BaseAST {
|
|
62
|
-
type: ASTType.Multi;
|
|
63
|
-
content: AST[];
|
|
64
|
-
}
|
|
65
|
-
export interface ASTTOut extends BaseAST {
|
|
66
|
-
type: ASTType.TOut;
|
|
67
|
-
expr: string;
|
|
68
|
-
body: AST[] | null;
|
|
69
|
-
}
|
|
70
|
-
export interface ASTTif extends BaseAST {
|
|
71
|
-
type: ASTType.TIf;
|
|
72
|
-
condition: string;
|
|
73
|
-
content: AST;
|
|
74
|
-
tElif: {
|
|
75
|
-
condition: string;
|
|
76
|
-
content: AST;
|
|
77
|
-
}[] | null;
|
|
78
|
-
tElse: AST | null;
|
|
79
|
-
}
|
|
80
|
-
export interface ASTTSet extends BaseAST {
|
|
81
|
-
type: ASTType.TSet;
|
|
82
|
-
name: string;
|
|
83
|
-
value: string | null;
|
|
84
|
-
defaultValue: string | null;
|
|
85
|
-
body: AST[] | null;
|
|
86
|
-
hasNoRepresentation: true;
|
|
87
|
-
}
|
|
88
|
-
export interface ASTTForEach extends BaseAST {
|
|
89
|
-
type: ASTType.TForEach;
|
|
90
|
-
collection: string;
|
|
91
|
-
elem: string;
|
|
92
|
-
body: AST;
|
|
93
|
-
memo: string;
|
|
94
|
-
hasNoFirst: boolean;
|
|
95
|
-
hasNoLast: boolean;
|
|
96
|
-
hasNoIndex: boolean;
|
|
97
|
-
hasNoValue: boolean;
|
|
98
|
-
key: string | null;
|
|
99
|
-
}
|
|
100
|
-
export interface ASTTKey extends BaseAST {
|
|
101
|
-
type: ASTType.TKey;
|
|
102
|
-
expr: string;
|
|
103
|
-
content: AST;
|
|
104
|
-
}
|
|
105
|
-
export interface ASTTCall extends BaseAST {
|
|
106
|
-
type: ASTType.TCall;
|
|
107
|
-
name: string;
|
|
108
|
-
body: AST[] | null;
|
|
109
|
-
context: string | null;
|
|
110
|
-
}
|
|
111
|
-
interface SlotDefinition {
|
|
112
|
-
content: AST | null;
|
|
113
|
-
scope: string | null;
|
|
114
|
-
on: EventHandlers | null;
|
|
115
|
-
attrs: Attrs | null;
|
|
116
|
-
attrsTranslationCtx: Attrs | null;
|
|
117
|
-
}
|
|
118
|
-
export interface ASTComponent extends BaseAST {
|
|
119
|
-
type: ASTType.TComponent;
|
|
120
|
-
name: string;
|
|
121
|
-
isDynamic: boolean;
|
|
122
|
-
dynamicProps: string | null;
|
|
123
|
-
on: EventHandlers | null;
|
|
124
|
-
props: {
|
|
125
|
-
[name: string]: string;
|
|
126
|
-
} | null;
|
|
127
|
-
propsTranslationCtx: {
|
|
128
|
-
[name: string]: string;
|
|
129
|
-
} | null;
|
|
130
|
-
slots: {
|
|
131
|
-
[name: string]: SlotDefinition;
|
|
132
|
-
} | null;
|
|
133
|
-
}
|
|
134
|
-
export interface ASTTCallSlot extends BaseAST {
|
|
135
|
-
type: ASTType.TCallSlot;
|
|
136
|
-
name: string;
|
|
137
|
-
attrs: Attrs | null;
|
|
138
|
-
attrsTranslationCtx: Attrs | null;
|
|
139
|
-
on: EventHandlers | null;
|
|
140
|
-
defaultContent: AST | null;
|
|
141
|
-
}
|
|
142
|
-
export interface ASTTCallBlock extends BaseAST {
|
|
143
|
-
type: ASTType.TCallBlock;
|
|
144
|
-
name: string;
|
|
145
|
-
}
|
|
146
|
-
export interface ASTDebug extends BaseAST {
|
|
147
|
-
type: ASTType.TDebug;
|
|
148
|
-
content: AST | null;
|
|
149
|
-
}
|
|
150
|
-
export interface ASTLog extends BaseAST {
|
|
151
|
-
type: ASTType.TLog;
|
|
152
|
-
expr: string;
|
|
153
|
-
content: AST | null;
|
|
154
|
-
}
|
|
155
|
-
export interface ASTTranslation extends BaseAST {
|
|
156
|
-
type: ASTType.TTranslation;
|
|
157
|
-
content: AST | null;
|
|
158
|
-
}
|
|
159
|
-
export interface ASTTranslationContext extends BaseAST {
|
|
160
|
-
type: ASTType.TTranslationContext;
|
|
161
|
-
content: AST | null;
|
|
162
|
-
translationCtx: string;
|
|
163
|
-
}
|
|
164
|
-
export interface ASTTPortal extends BaseAST {
|
|
165
|
-
type: ASTType.TPortal;
|
|
166
|
-
target: string;
|
|
167
|
-
content: AST;
|
|
168
|
-
}
|
|
169
|
-
export type AST = ASTText | ASTComment | ASTDomNode | ASTMulti | ASTTif | ASTTSet | ASTTCall | ASTTOut | ASTTForEach | ASTTKey | ASTComponent | ASTTCallSlot | ASTTCallBlock | ASTLog | ASTDebug | ASTTranslation | ASTTranslationContext | ASTTPortal;
|
|
170
|
-
export declare function parse(xml: string | Element, customDir?: CustomDirectives): AST;
|
|
171
|
-
export {};
|
|
1
|
+
import { CustomDirectives } from ".";
|
|
2
|
+
export type EventHandlers = {
|
|
3
|
+
[eventName: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export type Attrs = {
|
|
6
|
+
[attrs: string]: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const enum ASTType {
|
|
9
|
+
Text = 0,
|
|
10
|
+
Comment = 1,
|
|
11
|
+
DomNode = 2,
|
|
12
|
+
Multi = 3,
|
|
13
|
+
TIf = 4,
|
|
14
|
+
TSet = 5,
|
|
15
|
+
TCall = 6,
|
|
16
|
+
TOut = 7,
|
|
17
|
+
TForEach = 8,
|
|
18
|
+
TKey = 9,
|
|
19
|
+
TComponent = 10,
|
|
20
|
+
TDebug = 11,
|
|
21
|
+
TLog = 12,
|
|
22
|
+
TCallSlot = 13,
|
|
23
|
+
TCallBlock = 14,
|
|
24
|
+
TTranslation = 15,
|
|
25
|
+
TTranslationContext = 16,
|
|
26
|
+
TPortal = 17
|
|
27
|
+
}
|
|
28
|
+
export interface BaseAST {
|
|
29
|
+
type: ASTType;
|
|
30
|
+
hasNoRepresentation?: true;
|
|
31
|
+
}
|
|
32
|
+
export interface ASTText extends BaseAST {
|
|
33
|
+
type: ASTType.Text;
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ASTComment extends BaseAST {
|
|
37
|
+
type: ASTType.Comment;
|
|
38
|
+
value: string;
|
|
39
|
+
}
|
|
40
|
+
interface TModelInfo {
|
|
41
|
+
expr: string;
|
|
42
|
+
targetAttr: string;
|
|
43
|
+
eventType: "change" | "click" | "input";
|
|
44
|
+
shouldTrim: boolean;
|
|
45
|
+
shouldNumberize: boolean;
|
|
46
|
+
hasDynamicChildren: boolean;
|
|
47
|
+
specialInitTargetAttr: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface ASTDomNode extends BaseAST {
|
|
50
|
+
type: ASTType.DomNode;
|
|
51
|
+
tag: string;
|
|
52
|
+
content: AST[];
|
|
53
|
+
attrs: Attrs | null;
|
|
54
|
+
attrsTranslationCtx: Attrs | null;
|
|
55
|
+
ref: string | null;
|
|
56
|
+
on: EventHandlers | null;
|
|
57
|
+
model: TModelInfo | null;
|
|
58
|
+
dynamicTag: string | null;
|
|
59
|
+
ns: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface ASTMulti extends BaseAST {
|
|
62
|
+
type: ASTType.Multi;
|
|
63
|
+
content: AST[];
|
|
64
|
+
}
|
|
65
|
+
export interface ASTTOut extends BaseAST {
|
|
66
|
+
type: ASTType.TOut;
|
|
67
|
+
expr: string;
|
|
68
|
+
body: AST[] | null;
|
|
69
|
+
}
|
|
70
|
+
export interface ASTTif extends BaseAST {
|
|
71
|
+
type: ASTType.TIf;
|
|
72
|
+
condition: string;
|
|
73
|
+
content: AST;
|
|
74
|
+
tElif: {
|
|
75
|
+
condition: string;
|
|
76
|
+
content: AST;
|
|
77
|
+
}[] | null;
|
|
78
|
+
tElse: AST | null;
|
|
79
|
+
}
|
|
80
|
+
export interface ASTTSet extends BaseAST {
|
|
81
|
+
type: ASTType.TSet;
|
|
82
|
+
name: string;
|
|
83
|
+
value: string | null;
|
|
84
|
+
defaultValue: string | null;
|
|
85
|
+
body: AST[] | null;
|
|
86
|
+
hasNoRepresentation: true;
|
|
87
|
+
}
|
|
88
|
+
export interface ASTTForEach extends BaseAST {
|
|
89
|
+
type: ASTType.TForEach;
|
|
90
|
+
collection: string;
|
|
91
|
+
elem: string;
|
|
92
|
+
body: AST;
|
|
93
|
+
memo: string;
|
|
94
|
+
hasNoFirst: boolean;
|
|
95
|
+
hasNoLast: boolean;
|
|
96
|
+
hasNoIndex: boolean;
|
|
97
|
+
hasNoValue: boolean;
|
|
98
|
+
key: string | null;
|
|
99
|
+
}
|
|
100
|
+
export interface ASTTKey extends BaseAST {
|
|
101
|
+
type: ASTType.TKey;
|
|
102
|
+
expr: string;
|
|
103
|
+
content: AST;
|
|
104
|
+
}
|
|
105
|
+
export interface ASTTCall extends BaseAST {
|
|
106
|
+
type: ASTType.TCall;
|
|
107
|
+
name: string;
|
|
108
|
+
body: AST[] | null;
|
|
109
|
+
context: string | null;
|
|
110
|
+
}
|
|
111
|
+
interface SlotDefinition {
|
|
112
|
+
content: AST | null;
|
|
113
|
+
scope: string | null;
|
|
114
|
+
on: EventHandlers | null;
|
|
115
|
+
attrs: Attrs | null;
|
|
116
|
+
attrsTranslationCtx: Attrs | null;
|
|
117
|
+
}
|
|
118
|
+
export interface ASTComponent extends BaseAST {
|
|
119
|
+
type: ASTType.TComponent;
|
|
120
|
+
name: string;
|
|
121
|
+
isDynamic: boolean;
|
|
122
|
+
dynamicProps: string | null;
|
|
123
|
+
on: EventHandlers | null;
|
|
124
|
+
props: {
|
|
125
|
+
[name: string]: string;
|
|
126
|
+
} | null;
|
|
127
|
+
propsTranslationCtx: {
|
|
128
|
+
[name: string]: string;
|
|
129
|
+
} | null;
|
|
130
|
+
slots: {
|
|
131
|
+
[name: string]: SlotDefinition;
|
|
132
|
+
} | null;
|
|
133
|
+
}
|
|
134
|
+
export interface ASTTCallSlot extends BaseAST {
|
|
135
|
+
type: ASTType.TCallSlot;
|
|
136
|
+
name: string;
|
|
137
|
+
attrs: Attrs | null;
|
|
138
|
+
attrsTranslationCtx: Attrs | null;
|
|
139
|
+
on: EventHandlers | null;
|
|
140
|
+
defaultContent: AST | null;
|
|
141
|
+
}
|
|
142
|
+
export interface ASTTCallBlock extends BaseAST {
|
|
143
|
+
type: ASTType.TCallBlock;
|
|
144
|
+
name: string;
|
|
145
|
+
}
|
|
146
|
+
export interface ASTDebug extends BaseAST {
|
|
147
|
+
type: ASTType.TDebug;
|
|
148
|
+
content: AST | null;
|
|
149
|
+
}
|
|
150
|
+
export interface ASTLog extends BaseAST {
|
|
151
|
+
type: ASTType.TLog;
|
|
152
|
+
expr: string;
|
|
153
|
+
content: AST | null;
|
|
154
|
+
}
|
|
155
|
+
export interface ASTTranslation extends BaseAST {
|
|
156
|
+
type: ASTType.TTranslation;
|
|
157
|
+
content: AST | null;
|
|
158
|
+
}
|
|
159
|
+
export interface ASTTranslationContext extends BaseAST {
|
|
160
|
+
type: ASTType.TTranslationContext;
|
|
161
|
+
content: AST | null;
|
|
162
|
+
translationCtx: string;
|
|
163
|
+
}
|
|
164
|
+
export interface ASTTPortal extends BaseAST {
|
|
165
|
+
type: ASTType.TPortal;
|
|
166
|
+
target: string;
|
|
167
|
+
content: AST;
|
|
168
|
+
}
|
|
169
|
+
export type AST = ASTText | ASTComment | ASTDomNode | ASTMulti | ASTTif | ASTTSet | ASTTCall | ASTTOut | ASTTForEach | ASTTKey | ASTComponent | ASTTCallSlot | ASTTCallBlock | ASTLog | ASTDebug | ASTTranslation | ASTTranslationContext | ASTTPortal;
|
|
170
|
+
export declare function parse(xml: string | Element, customDir?: CustomDirectives): AST;
|
|
171
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./setup_jsdom";
|
|
2
|
-
export declare function compileTemplates(paths: string[]): Promise<string>;
|
|
1
|
+
import "./setup_jsdom";
|
|
2
|
+
export declare function compileTemplates(paths: string[]): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./runtime";
|
|
1
|
+
export * from "./runtime";
|