@compass-framework/core 1.2.2 → 1.2.4
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.
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BiFunction, Class } from "@compass-framework/library";
|
|
2
|
-
import { View } from "./View";
|
|
3
2
|
import { Context } from "./Context";
|
|
3
|
+
import { View } from "./View";
|
|
4
4
|
import { AttributeSet } from "./AttributeSet";
|
|
5
5
|
|
|
6
6
|
export declare class XMLViewFactoryRegistry {
|
|
7
|
-
public hasViewFactory(name: string): boolean;
|
|
8
|
-
|
|
9
7
|
public registryViewFactory<T extends View>(name: string, factory: XMLViewFactoryRegistry.Factory<T>, overwrite?: boolean): XMLViewFactoryRegistry;
|
|
10
8
|
|
|
11
9
|
public removeViewFactory(name: string): XMLViewFactoryRegistry;
|
|
12
10
|
|
|
13
11
|
public registryViewClass<T extends View>(name: string, clazz: Class<T>, overwrite?: boolean): XMLViewFactoryRegistry;
|
|
14
12
|
|
|
13
|
+
public hasViewFactory(name: string): boolean;
|
|
14
|
+
|
|
15
15
|
public setDefaultAttribute(name: string, value: string): XMLViewFactoryRegistry;
|
|
16
16
|
|
|
17
17
|
public removeDefaultAttribute(name: string): XMLViewFactoryRegistry;
|
|
@@ -25,18 +25,24 @@ export declare namespace XMLViewFactoryRegistry {
|
|
|
25
25
|
export type Attribute = { [key: string]: string };
|
|
26
26
|
|
|
27
27
|
export interface Factory<T extends View> {
|
|
28
|
+
onRegistry(context: Context): void;
|
|
29
|
+
|
|
28
30
|
getView(context: Context, attrs: AttributeSet): T;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export class ViewFactory<T extends View> implements Factory<T> {
|
|
32
34
|
public constructor(clazz:Class<View>);
|
|
33
35
|
|
|
36
|
+
public onRegistry(context: Context): void;
|
|
37
|
+
|
|
34
38
|
public getView(context: Context, attrs: AttributeSet): T;
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
export class CustomFactory<T extends View> implements Factory<T> {
|
|
38
42
|
public constructor(callback: BiFunction<Context, AttributeSet, View>);
|
|
39
43
|
|
|
44
|
+
public onRegistry(context: Context): void;
|
|
45
|
+
|
|
40
46
|
public getView(context: Context, attrs: AttributeSet): T;
|
|
41
47
|
}
|
|
42
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compass-framework/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "@compass-framework/core public api",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@compass-framework/library": "1.0.
|
|
14
|
+
"@compass-framework/library": "1.0.5"
|
|
15
15
|
}
|
|
16
16
|
}
|