@odoo/owl 3.0.0-alpha.13 → 3.0.0-alpha.14
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 +2442 -2435
- package/dist/owl.cjs.js +6459 -6381
- package/dist/owl.es.js +6459 -6379
- package/dist/owl.iife.js +6459 -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 +669 -671
- package/dist/types/runtime/app.d.ts +57 -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 +18 -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 +30 -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 +20 -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 +15 -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,57 +1,57 @@
|
|
|
1
|
-
import { ComponentConstructor } from "./component";
|
|
2
|
-
import { ComponentNode } from "./component_node";
|
|
3
|
-
import { handleError } from "./rendering/error_handling";
|
|
4
|
-
import { Fiber, MountOptions, RootFiber } from "./rendering/fibers";
|
|
5
|
-
import { Plugin, PluginManager } from "./plugins";
|
|
6
|
-
import {
|
|
7
|
-
import { Scheduler } from "./rendering/scheduler";
|
|
8
|
-
import { TemplateSet, TemplateSetConfig } from "./template_set";
|
|
9
|
-
import { validateTarget } from "./utils";
|
|
10
|
-
import { GetProps } from "./props";
|
|
11
|
-
type ComponentInstance<C extends ComponentConstructor> = C extends new (...args: any) => infer T ? T : never;
|
|
12
|
-
interface RootConfig<P> {
|
|
13
|
-
pluginManager?: PluginManager;
|
|
14
|
-
props?: P;
|
|
15
|
-
}
|
|
16
|
-
export interface AppConfig extends TemplateSetConfig {
|
|
17
|
-
name?: string;
|
|
18
|
-
plugins?: typeof Plugin[];
|
|
19
|
-
pluginManager?: PluginManager;
|
|
20
|
-
test?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare global {
|
|
23
|
-
interface Window {
|
|
24
|
-
__OWL_DEVTOOLS__: {
|
|
25
|
-
apps: Set<App>;
|
|
26
|
-
Fiber: typeof Fiber;
|
|
27
|
-
RootFiber: typeof RootFiber;
|
|
28
|
-
toRaw: typeof toRaw;
|
|
29
|
-
proxy: typeof
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
type MountTarget = HTMLElement | ShadowRoot;
|
|
34
|
-
interface Root<T extends ComponentConstructor> {
|
|
35
|
-
node: ComponentNode;
|
|
36
|
-
promise: Promise<ComponentInstance<T>>;
|
|
37
|
-
mount(target: MountTarget, options?: MountOptions): Promise<ComponentInstance<T>>;
|
|
38
|
-
destroy(): void;
|
|
39
|
-
}
|
|
40
|
-
export declare class App extends TemplateSet {
|
|
41
|
-
static validateTarget: typeof validateTarget;
|
|
42
|
-
static apps: Set<App>;
|
|
43
|
-
static version: string;
|
|
44
|
-
name: string;
|
|
45
|
-
scheduler: Scheduler;
|
|
46
|
-
roots: Set<Root<any>>;
|
|
47
|
-
pluginManager: PluginManager;
|
|
48
|
-
constructor(config?: AppConfig);
|
|
49
|
-
createRoot<T extends ComponentConstructor>(Root: T, config?: RootConfig<GetProps<ComponentInstance<T>>>): Root<T>;
|
|
50
|
-
makeNode<T extends ComponentConstructor>(Component: T, props: GetProps<ComponentInstance<T>>): ComponentNode;
|
|
51
|
-
mountNode(node: ComponentNode, target: HTMLElement | ShadowRoot, resolve: (c: any) => void, reject: (e: any) => void, options?: MountOptions): void;
|
|
52
|
-
destroy(): void;
|
|
53
|
-
createComponent<P extends Record<string, any>>(name: string | null, isStatic: boolean, hasSlotsProp: boolean, hasDynamicPropList: boolean, propList: string[]): (props: P, key: string, ctx: ComponentNode, parent: any, C: any) => any;
|
|
54
|
-
handleError(...args: Parameters<typeof handleError>): void;
|
|
55
|
-
}
|
|
56
|
-
export declare function mount<T extends ComponentConstructor>(C: T, target: MountTarget, config?: AppConfig & RootConfig<GetProps<ComponentInstance<T>>> & MountOptions): Promise<ComponentInstance<T>>;
|
|
57
|
-
export {};
|
|
1
|
+
import { ComponentConstructor } from "./component";
|
|
2
|
+
import { ComponentNode } from "./component_node";
|
|
3
|
+
import { handleError } from "./rendering/error_handling";
|
|
4
|
+
import { Fiber, MountOptions, RootFiber } from "./rendering/fibers";
|
|
5
|
+
import { Plugin, PluginManager } from "./plugins";
|
|
6
|
+
import { proxy, toRaw } from "./reactivity/proxy";
|
|
7
|
+
import { Scheduler } from "./rendering/scheduler";
|
|
8
|
+
import { TemplateSet, TemplateSetConfig } from "./template_set";
|
|
9
|
+
import { validateTarget } from "./utils";
|
|
10
|
+
import { GetProps } from "./props";
|
|
11
|
+
type ComponentInstance<C extends ComponentConstructor> = C extends new (...args: any) => infer T ? T : never;
|
|
12
|
+
interface RootConfig<P> {
|
|
13
|
+
pluginManager?: PluginManager;
|
|
14
|
+
props?: P;
|
|
15
|
+
}
|
|
16
|
+
export interface AppConfig extends TemplateSetConfig {
|
|
17
|
+
name?: string;
|
|
18
|
+
plugins?: (typeof Plugin)[];
|
|
19
|
+
pluginManager?: PluginManager;
|
|
20
|
+
test?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
__OWL_DEVTOOLS__: {
|
|
25
|
+
apps: Set<App>;
|
|
26
|
+
Fiber: typeof Fiber;
|
|
27
|
+
RootFiber: typeof RootFiber;
|
|
28
|
+
toRaw: typeof toRaw;
|
|
29
|
+
proxy: typeof proxy;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
type MountTarget = HTMLElement | ShadowRoot;
|
|
34
|
+
interface Root<T extends ComponentConstructor> {
|
|
35
|
+
node: ComponentNode;
|
|
36
|
+
promise: Promise<ComponentInstance<T>>;
|
|
37
|
+
mount(target: MountTarget, options?: MountOptions): Promise<ComponentInstance<T>>;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare class App extends TemplateSet {
|
|
41
|
+
static validateTarget: typeof validateTarget;
|
|
42
|
+
static apps: Set<App>;
|
|
43
|
+
static version: string;
|
|
44
|
+
name: string;
|
|
45
|
+
scheduler: Scheduler;
|
|
46
|
+
roots: Set<Root<any>>;
|
|
47
|
+
pluginManager: PluginManager;
|
|
48
|
+
constructor(config?: AppConfig);
|
|
49
|
+
createRoot<T extends ComponentConstructor>(Root: T, config?: RootConfig<GetProps<ComponentInstance<T>>>): Root<T>;
|
|
50
|
+
makeNode<T extends ComponentConstructor>(Component: T, props: GetProps<ComponentInstance<T>>): ComponentNode;
|
|
51
|
+
mountNode(node: ComponentNode, target: HTMLElement | ShadowRoot, resolve: (c: any) => void, reject: (e: any) => void, options?: MountOptions): void;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
createComponent<P extends Record<string, any>>(name: string | null, isStatic: boolean, hasSlotsProp: boolean, hasDynamicPropList: boolean, propList: string[]): (props: P, key: string, ctx: ComponentNode, parent: any, C: any) => any;
|
|
54
|
+
handleError(...args: Parameters<typeof handleError>): void;
|
|
55
|
+
}
|
|
56
|
+
export declare function mount<T extends ComponentConstructor>(C: T, target: MountTarget, config?: AppConfig & RootConfig<GetProps<ComponentInstance<T>>> & MountOptions): Promise<ComponentInstance<T>>;
|
|
57
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Setter } from "./block_compiler";
|
|
2
|
-
export declare function createAttrUpdater(attr: string): Setter<HTMLElement>;
|
|
3
|
-
export declare function attrsSetter(this: HTMLElement, attrs: any): void;
|
|
4
|
-
export declare function attrsUpdater(this: HTMLElement, attrs: any, oldAttrs: any): void;
|
|
5
|
-
export declare function setClass(this: HTMLElement, val: any): void;
|
|
6
|
-
export declare function updateClass(this: HTMLElement, val: any, oldVal: any): void;
|
|
1
|
+
import type { Setter } from "./block_compiler";
|
|
2
|
+
export declare function createAttrUpdater(attr: string): Setter<HTMLElement>;
|
|
3
|
+
export declare function attrsSetter(this: HTMLElement, attrs: any): void;
|
|
4
|
+
export declare function attrsUpdater(this: HTMLElement, attrs: any, oldAttrs: any): void;
|
|
5
|
+
export declare function setClass(this: HTMLElement, val: any): void;
|
|
6
|
+
export declare function updateClass(this: HTMLElement, val: any, oldVal: any): void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
type BlockType = (data?: any[], children?: VNode[]) => VNode;
|
|
3
|
-
/**
|
|
4
|
-
* Compiling blocks is a multi-step process:
|
|
5
|
-
*
|
|
6
|
-
* 1. build an IntermediateTree from the HTML element. This intermediate tree
|
|
7
|
-
* is a binary tree structure that encode dynamic info sub nodes, and the
|
|
8
|
-
* path required to reach them
|
|
9
|
-
* 2. process the tree to build a block context, which is an object that aggregate
|
|
10
|
-
* all dynamic info in a list, and also, all ref indexes.
|
|
11
|
-
* 3. process the context to build appropriate builder/setter functions
|
|
12
|
-
* 4. make a dynamic block class, which will efficiently collect references and
|
|
13
|
-
* create/update dynamic locations/children
|
|
14
|
-
*
|
|
15
|
-
* @param str
|
|
16
|
-
* @returns a new block type, that can build concrete blocks
|
|
17
|
-
*/
|
|
18
|
-
export declare function createBlock(str: string): BlockType;
|
|
19
|
-
export type Setter<T = any> = (this: T, value: any) => void;
|
|
20
|
-
export type Updater<T = any> = (this: T, value: any, oldVal: any) => void;
|
|
21
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
type BlockType = (data?: any[], children?: VNode[]) => VNode;
|
|
3
|
+
/**
|
|
4
|
+
* Compiling blocks is a multi-step process:
|
|
5
|
+
*
|
|
6
|
+
* 1. build an IntermediateTree from the HTML element. This intermediate tree
|
|
7
|
+
* is a binary tree structure that encode dynamic info sub nodes, and the
|
|
8
|
+
* path required to reach them
|
|
9
|
+
* 2. process the tree to build a block context, which is an object that aggregate
|
|
10
|
+
* all dynamic info in a list, and also, all ref indexes.
|
|
11
|
+
* 3. process the context to build appropriate builder/setter functions
|
|
12
|
+
* 4. make a dynamic block class, which will efficiently collect references and
|
|
13
|
+
* create/update dynamic locations/children
|
|
14
|
+
*
|
|
15
|
+
* @param str
|
|
16
|
+
* @returns a new block type, that can build concrete blocks
|
|
17
|
+
*/
|
|
18
|
+
export declare function createBlock(str: string): BlockType;
|
|
19
|
+
export type Setter<T = any> = (this: T, value: any) => void;
|
|
20
|
+
export type Updater<T = any> = (this: T, value: any, oldVal: any) => void;
|
|
21
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function filterOutModifiersFromData(dataList: any[]): {
|
|
2
|
-
modifiers: string[];
|
|
3
|
-
data: any[];
|
|
4
|
-
};
|
|
5
|
-
export declare const config: {
|
|
6
|
-
shouldNormalizeDom: boolean;
|
|
7
|
-
mainEventHandler: (data: any, ev: Event, currentTarget?: EventTarget | null) => boolean;
|
|
8
|
-
};
|
|
1
|
+
export declare function filterOutModifiersFromData(dataList: any[]): {
|
|
2
|
+
modifiers: string[];
|
|
3
|
+
data: any[];
|
|
4
|
+
};
|
|
5
|
+
export declare const config: {
|
|
6
|
+
shouldNormalizeDom: boolean;
|
|
7
|
+
mainEventHandler: (data: any, ev: Event, currentTarget?: EventTarget | null) => boolean;
|
|
8
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
type EventsSpec = {
|
|
3
|
-
[name: string]: number;
|
|
4
|
-
};
|
|
5
|
-
type Catcher = (child: VNode, handlers: any[]) => VNode;
|
|
6
|
-
export declare function createCatcher(eventsSpec: EventsSpec): Catcher;
|
|
7
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
type EventsSpec = {
|
|
3
|
+
[name: string]: number;
|
|
4
|
+
};
|
|
5
|
+
type Catcher = (child: VNode, handlers: any[]) => VNode;
|
|
6
|
+
export declare function createCatcher(eventsSpec: EventsSpec): Catcher;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type EventHandlerSetter = (this: HTMLElement, data: any) => void;
|
|
2
|
-
interface EventHandlerCreator {
|
|
3
|
-
setup: EventHandlerSetter;
|
|
4
|
-
update: EventHandlerSetter;
|
|
5
|
-
remove: (this: HTMLElement) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function createEventHandler(rawEvent: string): EventHandlerCreator;
|
|
8
|
-
export {};
|
|
1
|
+
type EventHandlerSetter = (this: HTMLElement, data: any) => void;
|
|
2
|
+
interface EventHandlerCreator {
|
|
3
|
+
setup: EventHandlerSetter;
|
|
4
|
+
update: EventHandlerSetter;
|
|
5
|
+
remove: (this: HTMLElement) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function createEventHandler(rawEvent: string): EventHandlerCreator;
|
|
8
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
declare class VHtml {
|
|
3
|
-
html: string;
|
|
4
|
-
parentEl?: HTMLElement | undefined;
|
|
5
|
-
content: ChildNode[];
|
|
6
|
-
constructor(html: string);
|
|
7
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
9
|
-
moveBeforeVNode(other: VHtml | null, afterNode: Node | null): void;
|
|
10
|
-
patch(other: VHtml): void;
|
|
11
|
-
beforeRemove(): void;
|
|
12
|
-
remove(): void;
|
|
13
|
-
firstNode(): Node;
|
|
14
|
-
toString(): string;
|
|
15
|
-
}
|
|
16
|
-
export declare function html(str: string): VNode<VHtml>;
|
|
17
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
declare class VHtml {
|
|
3
|
+
html: string;
|
|
4
|
+
parentEl?: HTMLElement | undefined;
|
|
5
|
+
content: ChildNode[];
|
|
6
|
+
constructor(html: string);
|
|
7
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
9
|
+
moveBeforeVNode(other: VHtml | null, afterNode: Node | null): void;
|
|
10
|
+
patch(other: VHtml): void;
|
|
11
|
+
beforeRemove(): void;
|
|
12
|
+
remove(): void;
|
|
13
|
+
firstNode(): Node;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
export declare function html(str: string): VNode<VHtml>;
|
|
17
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export { config } from "./config";
|
|
2
|
-
export { toggler } from "./toggler";
|
|
3
|
-
export { createBlock } from "./block_compiler";
|
|
4
|
-
export { list } from "./list";
|
|
5
|
-
export { multi } from "./multi";
|
|
6
|
-
export { text, comment } from "./text";
|
|
7
|
-
export { html } from "./html";
|
|
8
|
-
export { createCatcher } from "./event_catcher";
|
|
9
|
-
export interface VNode<T = any> {
|
|
10
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
11
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
12
|
-
moveBeforeVNode(other: T | null, afterNode: Node | null): void;
|
|
13
|
-
patch(other: T, withBeforeRemove: boolean): void;
|
|
14
|
-
beforeRemove(): void;
|
|
15
|
-
remove(): void;
|
|
16
|
-
firstNode(): Node | undefined;
|
|
17
|
-
el?: undefined | HTMLElement | Text;
|
|
18
|
-
parentEl?: undefined | HTMLElement;
|
|
19
|
-
isOnlyChild?: boolean | undefined;
|
|
20
|
-
key?: any;
|
|
21
|
-
}
|
|
22
|
-
export type BDom = VNode<any>;
|
|
23
|
-
export declare function mount(vnode: VNode, fixture: HTMLElement, afterNode?: Node | null): void;
|
|
24
|
-
export declare function patch(vnode1: VNode, vnode2: VNode, withBeforeRemove?: boolean): void;
|
|
25
|
-
export declare function remove(vnode: VNode, withBeforeRemove?: boolean): void;
|
|
26
|
-
export declare function withKey(vnode: VNode, key: any): VNode<any>;
|
|
1
|
+
export { config } from "./config";
|
|
2
|
+
export { toggler } from "./toggler";
|
|
3
|
+
export { createBlock } from "./block_compiler";
|
|
4
|
+
export { list } from "./list";
|
|
5
|
+
export { multi } from "./multi";
|
|
6
|
+
export { text, comment } from "./text";
|
|
7
|
+
export { html } from "./html";
|
|
8
|
+
export { createCatcher } from "./event_catcher";
|
|
9
|
+
export interface VNode<T = any> {
|
|
10
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
11
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
12
|
+
moveBeforeVNode(other: T | null, afterNode: Node | null): void;
|
|
13
|
+
patch(other: T, withBeforeRemove: boolean): void;
|
|
14
|
+
beforeRemove(): void;
|
|
15
|
+
remove(): void;
|
|
16
|
+
firstNode(): Node | undefined;
|
|
17
|
+
el?: undefined | HTMLElement | Text;
|
|
18
|
+
parentEl?: undefined | HTMLElement;
|
|
19
|
+
isOnlyChild?: boolean | undefined;
|
|
20
|
+
key?: any;
|
|
21
|
+
}
|
|
22
|
+
export type BDom = VNode<any>;
|
|
23
|
+
export declare function mount(vnode: VNode, fixture: HTMLElement, afterNode?: Node | null): void;
|
|
24
|
+
export declare function patch(vnode1: VNode, vnode2: VNode, withBeforeRemove?: boolean): void;
|
|
25
|
+
export declare function remove(vnode: VNode, withBeforeRemove?: boolean): void;
|
|
26
|
+
export declare function withKey(vnode: VNode, key: any): VNode<any>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
declare class VList {
|
|
3
|
-
children: VNode[];
|
|
4
|
-
anchor: Node | undefined;
|
|
5
|
-
parentEl?: HTMLElement | undefined;
|
|
6
|
-
isOnlyChild?: boolean | undefined;
|
|
7
|
-
constructor(children: VNode[]);
|
|
8
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
9
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
10
|
-
moveBeforeVNode(other: VList | null, afterNode: Node | null): void;
|
|
11
|
-
patch(other: VList, withBeforeRemove: boolean): void;
|
|
12
|
-
beforeRemove(): void;
|
|
13
|
-
remove(): void;
|
|
14
|
-
firstNode(): Node | undefined;
|
|
15
|
-
toString(): string;
|
|
16
|
-
}
|
|
17
|
-
export declare function list(children: VNode[]): VNode<VList>;
|
|
18
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
declare class VList {
|
|
3
|
+
children: VNode[];
|
|
4
|
+
anchor: Node | undefined;
|
|
5
|
+
parentEl?: HTMLElement | undefined;
|
|
6
|
+
isOnlyChild?: boolean | undefined;
|
|
7
|
+
constructor(children: VNode[]);
|
|
8
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
9
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
10
|
+
moveBeforeVNode(other: VList | null, afterNode: Node | null): void;
|
|
11
|
+
patch(other: VList, withBeforeRemove: boolean): void;
|
|
12
|
+
beforeRemove(): void;
|
|
13
|
+
remove(): void;
|
|
14
|
+
firstNode(): Node | undefined;
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare function list(children: VNode[]): VNode<VList>;
|
|
18
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
export declare class VMulti {
|
|
3
|
-
children: (VNode | undefined)[];
|
|
4
|
-
anchors?: Node[] | undefined;
|
|
5
|
-
parentEl?: HTMLElement | undefined;
|
|
6
|
-
isOnlyChild?: boolean | undefined;
|
|
7
|
-
constructor(children: (VNode | undefined)[]);
|
|
8
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
9
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
10
|
-
moveBeforeVNode(other: VMulti | null, afterNode: Node | null): void;
|
|
11
|
-
patch(other: VMulti, withBeforeRemove: boolean): void;
|
|
12
|
-
beforeRemove(): void;
|
|
13
|
-
remove(): void;
|
|
14
|
-
firstNode(): Node | undefined;
|
|
15
|
-
toString(): string;
|
|
16
|
-
}
|
|
17
|
-
export declare function multi(children: (VNode | undefined)[]): VNode<VMulti>;
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
export declare class VMulti {
|
|
3
|
+
children: (VNode | undefined)[];
|
|
4
|
+
anchors?: Node[] | undefined;
|
|
5
|
+
parentEl?: HTMLElement | undefined;
|
|
6
|
+
isOnlyChild?: boolean | undefined;
|
|
7
|
+
constructor(children: (VNode | undefined)[]);
|
|
8
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
9
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
10
|
+
moveBeforeVNode(other: VMulti | null, afterNode: Node | null): void;
|
|
11
|
+
patch(other: VMulti, withBeforeRemove: boolean): void;
|
|
12
|
+
beforeRemove(): void;
|
|
13
|
+
remove(): void;
|
|
14
|
+
firstNode(): Node | undefined;
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare function multi(children: (VNode | undefined)[]): VNode<VMulti>;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
declare abstract class VSimpleNode {
|
|
3
|
-
text: string | String;
|
|
4
|
-
parentEl?: HTMLElement | undefined;
|
|
5
|
-
el?: any;
|
|
6
|
-
constructor(text: string | String);
|
|
7
|
-
mountNode(node: Node, parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
9
|
-
moveBeforeVNode(other: VText | null, afterNode: Node | null): void;
|
|
10
|
-
beforeRemove(): void;
|
|
11
|
-
remove(): void;
|
|
12
|
-
firstNode(): Node;
|
|
13
|
-
toString(): string | String;
|
|
14
|
-
}
|
|
15
|
-
declare class VText extends VSimpleNode {
|
|
16
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
17
|
-
patch(other: VText): void;
|
|
18
|
-
}
|
|
19
|
-
declare class VComment extends VSimpleNode {
|
|
20
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
21
|
-
patch(): void;
|
|
22
|
-
}
|
|
23
|
-
export declare function text(str: string | String): VNode<VText>;
|
|
24
|
-
export declare function comment(str: string): VNode<VComment>;
|
|
25
|
-
export declare function toText(value: any): string;
|
|
26
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
declare abstract class VSimpleNode {
|
|
3
|
+
text: string | String;
|
|
4
|
+
parentEl?: HTMLElement | undefined;
|
|
5
|
+
el?: any;
|
|
6
|
+
constructor(text: string | String);
|
|
7
|
+
mountNode(node: Node, parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement | undefined): void;
|
|
9
|
+
moveBeforeVNode(other: VText | null, afterNode: Node | null): void;
|
|
10
|
+
beforeRemove(): void;
|
|
11
|
+
remove(): void;
|
|
12
|
+
firstNode(): Node;
|
|
13
|
+
toString(): string | String;
|
|
14
|
+
}
|
|
15
|
+
declare class VText extends VSimpleNode {
|
|
16
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
17
|
+
patch(other: VText): void;
|
|
18
|
+
}
|
|
19
|
+
declare class VComment extends VSimpleNode {
|
|
20
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
21
|
+
patch(): void;
|
|
22
|
+
}
|
|
23
|
+
export declare function text(str: string | String): VNode<VText>;
|
|
24
|
+
export declare function comment(str: string): VNode<VComment>;
|
|
25
|
+
export declare function toText(value: any): string;
|
|
26
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { VNode } from "./index";
|
|
2
|
-
declare class VToggler {
|
|
3
|
-
key: string;
|
|
4
|
-
child: VNode;
|
|
5
|
-
parentEl?: HTMLElement | undefined;
|
|
6
|
-
constructor(key: string, child: VNode);
|
|
7
|
-
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
9
|
-
moveBeforeVNode(other: VToggler | null, afterNode: Node | null): void;
|
|
10
|
-
patch(other: VToggler, withBeforeRemove: boolean): void;
|
|
11
|
-
beforeRemove(): void;
|
|
12
|
-
remove(): void;
|
|
13
|
-
firstNode(): Node | undefined;
|
|
14
|
-
toString(): string;
|
|
15
|
-
}
|
|
16
|
-
export declare function toggler(key: string, child: VNode): VNode<VToggler>;
|
|
17
|
-
export {};
|
|
1
|
+
import type { VNode } from "./index";
|
|
2
|
+
declare class VToggler {
|
|
3
|
+
key: string;
|
|
4
|
+
child: VNode;
|
|
5
|
+
parentEl?: HTMLElement | undefined;
|
|
6
|
+
constructor(key: string, child: VNode);
|
|
7
|
+
mount(parent: HTMLElement, afterNode: Node | null): void;
|
|
8
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
9
|
+
moveBeforeVNode(other: VToggler | null, afterNode: Node | null): void;
|
|
10
|
+
patch(other: VToggler, withBeforeRemove: boolean): void;
|
|
11
|
+
beforeRemove(): void;
|
|
12
|
+
remove(): void;
|
|
13
|
+
firstNode(): Node | undefined;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
export declare function toggler(key: string, child: VNode): VNode<VToggler>;
|
|
17
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { ComponentNode } from "./component_node";
|
|
2
|
-
interface StaticComponentProperties {
|
|
3
|
-
template: string;
|
|
4
|
-
components?: {
|
|
5
|
-
[componentName: string]: ComponentConstructor;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface ComponentConstructor extends StaticComponentProperties {
|
|
9
|
-
new (node: ComponentNode): Component;
|
|
10
|
-
}
|
|
11
|
-
export declare class Component {
|
|
12
|
-
static template: string;
|
|
13
|
-
__owl__: ComponentNode;
|
|
14
|
-
constructor(node: ComponentNode);
|
|
15
|
-
setup(): void;
|
|
16
|
-
render(deep?: boolean): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import type { ComponentNode } from "./component_node";
|
|
2
|
+
interface StaticComponentProperties {
|
|
3
|
+
template: string;
|
|
4
|
+
components?: {
|
|
5
|
+
[componentName: string]: ComponentConstructor;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface ComponentConstructor extends StaticComponentProperties {
|
|
9
|
+
new (node: ComponentNode): Component;
|
|
10
|
+
}
|
|
11
|
+
export declare class Component {
|
|
12
|
+
static template: string;
|
|
13
|
+
__owl__: ComponentNode;
|
|
14
|
+
constructor(node: ComponentNode);
|
|
15
|
+
setup(): void;
|
|
16
|
+
render(deep?: boolean): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import type { App } from "./app";
|
|
2
|
-
import { BDom, VNode } from "./blockdom";
|
|
3
|
-
import { Component, ComponentConstructor } from "./component";
|
|
4
|
-
import { PluginManager } from "./plugins";
|
|
5
|
-
import { Computation } from "./reactivity/computations";
|
|
6
|
-
import { Fiber, MountFiber, MountOptions } from "./rendering/fibers";
|
|
7
|
-
import { STATUS } from "./status";
|
|
8
|
-
export declare function saveCurrent(): () => void;
|
|
9
|
-
export declare function getCurrent(): ComponentNode;
|
|
10
|
-
export declare function useComponent(): Component;
|
|
11
|
-
type LifecycleHook = Function;
|
|
12
|
-
export declare class ComponentNode implements VNode<ComponentNode> {
|
|
13
|
-
el?: HTMLElement | Text | undefined;
|
|
14
|
-
app: App;
|
|
15
|
-
fiber: Fiber | null;
|
|
16
|
-
component: Component;
|
|
17
|
-
bdom: BDom | null;
|
|
18
|
-
status: STATUS;
|
|
19
|
-
forceNextRender: boolean;
|
|
20
|
-
parentKey: string | null;
|
|
21
|
-
name: string;
|
|
22
|
-
props: Record<string, any>;
|
|
23
|
-
renderFn: Function;
|
|
24
|
-
parent: ComponentNode | null;
|
|
25
|
-
children: {
|
|
26
|
-
[key: string]: ComponentNode;
|
|
27
|
-
};
|
|
28
|
-
willStart: LifecycleHook[];
|
|
29
|
-
willUpdateProps: LifecycleHook[];
|
|
30
|
-
willUnmount: LifecycleHook[];
|
|
31
|
-
mounted: LifecycleHook[];
|
|
32
|
-
willPatch: LifecycleHook[];
|
|
33
|
-
patched: LifecycleHook[];
|
|
34
|
-
willDestroy: LifecycleHook[];
|
|
35
|
-
signalComputation: Computation;
|
|
36
|
-
pluginManager: PluginManager;
|
|
37
|
-
constructor(C: ComponentConstructor, props: Record<string, any>, app: App, parent: ComponentNode | null, parentKey: string | null);
|
|
38
|
-
mountComponent(target: any, options?: MountOptions): void;
|
|
39
|
-
initiateRender(fiber: Fiber | MountFiber): Promise<void>;
|
|
40
|
-
render(deep: boolean): Promise<void>;
|
|
41
|
-
cancel(): void;
|
|
42
|
-
_cancel(): void;
|
|
43
|
-
destroy(): void;
|
|
44
|
-
_destroy(): void;
|
|
45
|
-
updateAndRender(props: Record<string, any>, parentFiber: Fiber): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Finds a child that has dom that is not yet updated, and update it. This
|
|
48
|
-
* method is meant to be used only in the context of repatching the dom after
|
|
49
|
-
* a mounted hook failed and was handled.
|
|
50
|
-
*/
|
|
51
|
-
updateDom(): void;
|
|
52
|
-
firstNode(): Node | undefined;
|
|
53
|
-
mount(parent: HTMLElement, anchor: ChildNode): void;
|
|
54
|
-
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
55
|
-
moveBeforeVNode(other: ComponentNode | null, afterNode: Node | null): void;
|
|
56
|
-
patch(): void;
|
|
57
|
-
_patch(): void;
|
|
58
|
-
beforeRemove(): void;
|
|
59
|
-
remove(): void;
|
|
60
|
-
}
|
|
61
|
-
export {};
|
|
1
|
+
import type { App } from "./app";
|
|
2
|
+
import { BDom, VNode } from "./blockdom";
|
|
3
|
+
import { Component, ComponentConstructor } from "./component";
|
|
4
|
+
import { PluginManager } from "./plugins";
|
|
5
|
+
import { Computation } from "./reactivity/computations";
|
|
6
|
+
import { Fiber, MountFiber, MountOptions } from "./rendering/fibers";
|
|
7
|
+
import { STATUS } from "./status";
|
|
8
|
+
export declare function saveCurrent(): () => void;
|
|
9
|
+
export declare function getCurrent(): ComponentNode;
|
|
10
|
+
export declare function useComponent(): Component;
|
|
11
|
+
type LifecycleHook = Function;
|
|
12
|
+
export declare class ComponentNode implements VNode<ComponentNode> {
|
|
13
|
+
el?: HTMLElement | Text | undefined;
|
|
14
|
+
app: App;
|
|
15
|
+
fiber: Fiber | null;
|
|
16
|
+
component: Component;
|
|
17
|
+
bdom: BDom | null;
|
|
18
|
+
status: STATUS;
|
|
19
|
+
forceNextRender: boolean;
|
|
20
|
+
parentKey: string | null;
|
|
21
|
+
name: string;
|
|
22
|
+
props: Record<string, any>;
|
|
23
|
+
renderFn: Function;
|
|
24
|
+
parent: ComponentNode | null;
|
|
25
|
+
children: {
|
|
26
|
+
[key: string]: ComponentNode;
|
|
27
|
+
};
|
|
28
|
+
willStart: LifecycleHook[];
|
|
29
|
+
willUpdateProps: LifecycleHook[];
|
|
30
|
+
willUnmount: LifecycleHook[];
|
|
31
|
+
mounted: LifecycleHook[];
|
|
32
|
+
willPatch: LifecycleHook[];
|
|
33
|
+
patched: LifecycleHook[];
|
|
34
|
+
willDestroy: LifecycleHook[];
|
|
35
|
+
signalComputation: Computation;
|
|
36
|
+
pluginManager: PluginManager;
|
|
37
|
+
constructor(C: ComponentConstructor, props: Record<string, any>, app: App, parent: ComponentNode | null, parentKey: string | null);
|
|
38
|
+
mountComponent(target: any, options?: MountOptions): void;
|
|
39
|
+
initiateRender(fiber: Fiber | MountFiber): Promise<void>;
|
|
40
|
+
render(deep: boolean): Promise<void>;
|
|
41
|
+
cancel(): void;
|
|
42
|
+
_cancel(): void;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
_destroy(): void;
|
|
45
|
+
updateAndRender(props: Record<string, any>, parentFiber: Fiber): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Finds a child that has dom that is not yet updated, and update it. This
|
|
48
|
+
* method is meant to be used only in the context of repatching the dom after
|
|
49
|
+
* a mounted hook failed and was handled.
|
|
50
|
+
*/
|
|
51
|
+
updateDom(): void;
|
|
52
|
+
firstNode(): Node | undefined;
|
|
53
|
+
mount(parent: HTMLElement, anchor: ChildNode): void;
|
|
54
|
+
moveBeforeDOMNode(node: Node | null, parent?: HTMLElement): void;
|
|
55
|
+
moveBeforeVNode(other: ComponentNode | null, afterNode: Node | null): void;
|
|
56
|
+
patch(): void;
|
|
57
|
+
_patch(): void;
|
|
58
|
+
beforeRemove(): void;
|
|
59
|
+
remove(): void;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mainEventHandler: (data: any, ev: Event, currentTarget?: EventTarget | null) => boolean;
|
|
1
|
+
export declare const mainEventHandler: (data: any, ev: Event, currentTarget?: EventTarget | null) => boolean;
|