@odoo/owl 3.0.0-alpha.33 → 3.0.0-alpha.34
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 +157 -79
- package/dist/owl.es.js +157 -79
- package/dist/owl.iife.js +157 -79
- package/dist/owl.iife.min.js +9 -9
- package/dist/types/owl.d.ts +24 -12
- package/package.json +4 -4
package/dist/types/owl.d.ts
CHANGED
|
@@ -163,11 +163,13 @@ export declare class Resource<T> {
|
|
|
163
163
|
export interface PluginConstructor {
|
|
164
164
|
new (...args: any[]): Plugin$1;
|
|
165
165
|
id: string;
|
|
166
|
+
sequence: number;
|
|
166
167
|
}
|
|
167
168
|
declare class Plugin$1 {
|
|
168
169
|
private static _shadowId;
|
|
169
170
|
static get id(): string;
|
|
170
171
|
static set id(shadowId: string);
|
|
172
|
+
static sequence: number;
|
|
171
173
|
__owl__: PluginManager;
|
|
172
174
|
constructor(manager: PluginManager);
|
|
173
175
|
setup(): void;
|
|
@@ -180,6 +182,7 @@ declare class PluginManager extends Scope {
|
|
|
180
182
|
config: Record<string, any>;
|
|
181
183
|
plugins: Record<string, Plugin$1>;
|
|
182
184
|
ready: Promise<void>;
|
|
185
|
+
private hasPendingReady;
|
|
183
186
|
constructor(app: any, options?: PluginManagerOptions);
|
|
184
187
|
destroy(): void;
|
|
185
188
|
getPluginById<T extends Plugin$1>(id: string): T | null;
|
|
@@ -350,7 +353,7 @@ export interface AsyncComputed<T> {
|
|
|
350
353
|
export declare function asyncComputed<T>(fetcher: (ctx: AsyncComputedContext) => Promise<T>, options?: AsyncComputedOptions<T>): AsyncComputed<T>;
|
|
351
354
|
export interface ValidationIssue {
|
|
352
355
|
message: string;
|
|
353
|
-
path?:
|
|
356
|
+
path?: string;
|
|
354
357
|
received?: any;
|
|
355
358
|
[K: string]: any;
|
|
356
359
|
}
|
|
@@ -499,6 +502,7 @@ declare class ComponentNode extends Scope implements VNode<ComponentNode> {
|
|
|
499
502
|
[key: string]: ComponentNode;
|
|
500
503
|
};
|
|
501
504
|
willUpdateProps: LifecycleHook[];
|
|
505
|
+
propsUpdated: LifecycleHook[];
|
|
502
506
|
willUnmount: LifecycleHook[];
|
|
503
507
|
mounted: LifecycleHook[];
|
|
504
508
|
willPatch: LifecycleHook[];
|
|
@@ -542,6 +546,9 @@ export declare class Component {
|
|
|
542
546
|
constructor(node: ComponentNode);
|
|
543
547
|
setup(): void;
|
|
544
548
|
}
|
|
549
|
+
declare function staticProp<T = any>(key: string): T;
|
|
550
|
+
declare function staticProp<T>(key: string, type: T): T;
|
|
551
|
+
declare function staticProp<T>(key: string, type: T, defaultValue: T): T;
|
|
545
552
|
declare const isProps: unique symbol;
|
|
546
553
|
export type WithDefaults<T, D> = T & Required<D>;
|
|
547
554
|
export type Props<T extends {}> = T & {
|
|
@@ -556,11 +563,15 @@ export type GetProps<T> = {
|
|
|
556
563
|
}[keyof T] extends (x: infer I) => void ? {
|
|
557
564
|
[K in keyof I]: I[K];
|
|
558
565
|
} : never;
|
|
559
|
-
export
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
566
|
+
export interface PropsFunction {
|
|
567
|
+
(): Props<Record<string, any>>;
|
|
568
|
+
<const Keys extends string[]>(keys: Keys): Props<ResolveObjectType<Keys>>;
|
|
569
|
+
<const Keys extends string[], Defaults>(keys: Keys, defaults: Defaults & GetPropsDefaults<KeyedObject<Keys>>): Props<WithDefaults<ResolveObjectType<Keys>, Defaults>>;
|
|
570
|
+
<Shape extends {}>(shape: Shape): Props<ResolveObjectType<Shape>>;
|
|
571
|
+
<Shape extends {}, Defaults>(shape: Shape, defaults: Defaults & GetPropsDefaults<Shape>): Props<WithDefaults<ResolveObjectType<Shape>, Defaults>>;
|
|
572
|
+
static: typeof staticProp;
|
|
573
|
+
}
|
|
574
|
+
export declare const props: PropsFunction;
|
|
564
575
|
declare class Scheduler {
|
|
565
576
|
static requestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
566
577
|
tasks: Set<RootFiber>;
|
|
@@ -664,7 +675,7 @@ export declare class Portal extends Component {
|
|
|
664
675
|
slots: {
|
|
665
676
|
default: any;
|
|
666
677
|
};
|
|
667
|
-
target:
|
|
678
|
+
target: any;
|
|
668
679
|
}>;
|
|
669
680
|
setup(): void;
|
|
670
681
|
}
|
|
@@ -681,9 +692,6 @@ export declare class Suspense extends Component {
|
|
|
681
692
|
private subRootMounted;
|
|
682
693
|
setup(): void;
|
|
683
694
|
}
|
|
684
|
-
export declare function prop<T = any>(key: string): T;
|
|
685
|
-
export declare function prop<T>(key: string, type: T): T;
|
|
686
|
-
export declare function prop<T>(key: string, type: T, defaultValue: T): T;
|
|
687
695
|
export type STATUS_DESCR = "new" | "started" | "mounted" | "cancelled" | "destroyed";
|
|
688
696
|
declare function status$1(entity: Component | Plugin$1): STATUS_DESCR;
|
|
689
697
|
export declare const useApp: () => App;
|
|
@@ -701,6 +709,7 @@ export declare const types: {
|
|
|
701
709
|
any: () => any;
|
|
702
710
|
array: {
|
|
703
711
|
(): any[];
|
|
712
|
+
<T>(): T[];
|
|
704
713
|
<T>(elementType: T): T[];
|
|
705
714
|
};
|
|
706
715
|
boolean: () => boolean;
|
|
@@ -709,14 +718,16 @@ export declare const types: {
|
|
|
709
718
|
function: {
|
|
710
719
|
(): (...parameters: any[]) => any;
|
|
711
720
|
<const P extends any[]>(parameters: P): (...parameters: P) => void;
|
|
721
|
+
<const P extends any[], R>(): (...parameters: P) => R;
|
|
712
722
|
<const P extends any[], R>(parameters: P, result: R): (...parameters: P) => R;
|
|
713
723
|
};
|
|
714
724
|
instanceOf: <T extends Constructor>(constructor: T) => InstanceType<T>;
|
|
715
725
|
literal: <const T extends LiteralTypes>(literal: T) => T;
|
|
716
|
-
number: () =>
|
|
726
|
+
number: <T extends number = number>() => T;
|
|
717
727
|
object: {
|
|
718
728
|
(): Record<string, any>;
|
|
719
729
|
<const Keys extends string[]>(keys: Keys): ResolveOptionalEntries<KeyedObject<Keys>>;
|
|
730
|
+
<Shape extends {}>(): ResolveOptionalEntries<Shape>;
|
|
720
731
|
<Shape extends {}>(shape: Shape): ResolveOptionalEntries<Shape>;
|
|
721
732
|
};
|
|
722
733
|
or: <T extends any[]>(types: T) => T[number];
|
|
@@ -735,13 +746,14 @@ export declare const types: {
|
|
|
735
746
|
selection: <const T extends LiteralTypes>(literals: T[]) => T;
|
|
736
747
|
signal: {
|
|
737
748
|
(): ReactiveValue<any>;
|
|
749
|
+
<T>(): ReactiveValue<T>;
|
|
738
750
|
<T>(type: T): ReactiveValue<T>;
|
|
739
751
|
};
|
|
740
752
|
strictObject: {
|
|
741
753
|
<const Keys extends string[]>(keys: Keys): ResolveOptionalEntries<KeyedObject<Keys>>;
|
|
742
754
|
<Shape extends {}>(shape: Shape): ResolveOptionalEntries<Shape>;
|
|
743
755
|
};
|
|
744
|
-
string: () =>
|
|
756
|
+
string: <T extends string = string>() => T;
|
|
745
757
|
tuple: <const T extends any[]>(types: T) => T;
|
|
746
758
|
};
|
|
747
759
|
export declare function providePlugins(pluginConstructors: PluginConstructor[] | Resource<PluginConstructor>, config?: Record<string, any>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/owl",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.34",
|
|
4
4
|
"description": "Odoo Web Library (OWL)",
|
|
5
5
|
"main": "dist/owl.cjs.js",
|
|
6
6
|
"module": "dist/owl.es.js",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/odoo/owl#readme",
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@odoo/owl-compiler": "3.0.0-alpha.
|
|
47
|
-
"@odoo/owl-core": "3.0.0-alpha.
|
|
48
|
-
"@odoo/owl-runtime": "3.0.0-alpha.
|
|
46
|
+
"@odoo/owl-compiler": "3.0.0-alpha.34",
|
|
47
|
+
"@odoo/owl-core": "3.0.0-alpha.34",
|
|
48
|
+
"@odoo/owl-runtime": "3.0.0-alpha.34",
|
|
49
49
|
"jsdom": "^25.0.1"
|
|
50
50
|
}
|
|
51
51
|
}
|