@compass-framework/core 1.0.4 → 1.0.6

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,9 +1,8 @@
1
- import { XML } from "@compass-framework/library";
1
+ import {ArrayList, XML} from "@compass-framework/library";
2
2
  import { IWindow } from "./IWindow";
3
3
  import { Resources } from "./Resources";
4
4
  import { View } from "./View";
5
5
  import { ViewGroup } from "./ViewGroup";
6
- import { DecorView } from "./DecorView";
7
6
  import { WindowContext } from "./WindowContext";
8
7
  import { WindowManager } from "./WindowManager";
9
8
 
@@ -11,9 +10,12 @@ export declare class ApplicationWindow implements IWindow {
11
10
  public constructor();
12
11
  public constructor(context: WindowContext);
13
12
 
14
- public addContentView(view: View, params: ViewGroup.LayoutParams): void;
13
+ public findViewById(id: number): View;
14
+ public findViewById(id: string): View;
15
15
 
16
- public createViewQuery(): View.ViewQuery;
16
+ public findViewByTag(tag: string): View;
17
+
18
+ public findViewsByTag(tag: string): ArrayList<View>;
17
19
 
18
20
  public onAttach(context: WindowContext): void;
19
21
 
@@ -27,7 +29,7 @@ export declare class ApplicationWindow implements IWindow {
27
29
 
28
30
  public getLayoutParams(): WindowManager.LayoutParams;
29
31
 
30
- public getDecorView(): DecorView;
32
+ public getContentView(): ViewGroup;
31
33
 
32
34
  public getResources(): Resources;
33
35
 
@@ -1,12 +1,18 @@
1
- import { Interface, XML } from "@compass-framework/library";
2
- import { Resources } from "./Resources";
3
- import { View } from "./View";
4
- import { WindowContext } from "./WindowContext";
5
- import { WindowManager } from "./WindowManager";
1
+ import {ArrayList, Interface, XML} from "@compass-framework/library";
2
+ import {Resources} from "./Resources";
3
+ import {View} from "./View";
4
+ import {WindowContext} from "./WindowContext";
5
+ import {WindowManager} from "./WindowManager";
6
6
 
7
7
  export const IWindowInterface: Interface<IWindow>;
8
+
8
9
  export interface IWindow {
9
- createViewQuery(): View.ViewQuery;
10
+ findViewById(id: number): View;
11
+ findViewById(id: string): View;
12
+
13
+ findViewByTag(tag: string): View;
14
+
15
+ findViewsByTag(tag: string): ArrayList<View>;
10
16
 
11
17
  onAttach(context: WindowContext): void
12
18
 
@@ -1,4 +1,4 @@
1
- import { XML } from "@compass-framework/library";
1
+ import {ArrayList, XML} from "@compass-framework/library";
2
2
  import { Resources } from "./Resources";
3
3
  import { View } from "./View";
4
4
  import { IWindow } from "./IWindow";
@@ -8,17 +8,22 @@ import { WindowManager } from "./WindowManager";
8
8
  export declare class PopupWindow implements IWindow {
9
9
  public constructor();
10
10
 
11
- public onCreate(): void;
11
+ public findViewById(id: number): View;
12
+ public findViewById(id: string): View;
12
13
 
13
- public onStart(): void;
14
+ public findViewByTag(tag: string): View;
14
15
 
15
- public onResume(): void;
16
+ public findViewsByTag(tag: string): ArrayList<View>;
17
+
18
+ public onAttach(context: WindowContext): void;
16
19
 
17
- public onStop(): void;
20
+ public onCreate(): void;
21
+
22
+ public onResume(): void;
18
23
 
19
24
  public onDestroy(): void;
20
25
 
21
- public createViewQuery(): View.ViewQuery;
26
+ public onDetach(): void;
22
27
 
23
28
  public dismiss(): void;
24
29
 
@@ -26,7 +31,7 @@ export declare class PopupWindow implements IWindow {
26
31
 
27
32
  public update(x: number, y: number, width: number, height: number): void;
28
33
 
29
- public getContext(): WindowContext;
34
+ public getWindowContext(): WindowContext;
30
35
 
31
36
  public getResources(): Resources;
32
37
 
package/@types/View.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import {
2
- Runnable,
3
- List,
4
2
  Interface,
5
- Nullable,
3
+ Runnable,
4
+ ArrayList,
6
5
  } from "@compass-framework/library";
7
6
  import { Context } from "./Context";
8
7
  import { AttributeSet } from "./AttributeSet";
@@ -58,6 +57,13 @@ export declare class View implements Drawable.Callback {
58
57
 
59
58
  public draw(canvas: Canvas): void;
60
59
 
60
+ public findViewById(id: number): View;
61
+ public findViewById(id: string): View;
62
+
63
+ public findViewByTag(tag: string): View;
64
+
65
+ public findViewsByTag(tag: string): ArrayList<View>;
66
+
61
67
  public post(action:Runnable): boolean;
62
68
 
63
69
  public removeCallbacks(action: Runnable): boolean;
@@ -68,9 +74,6 @@ export declare class View implements Drawable.Callback {
68
74
 
69
75
  public requestFocus(): boolean;
70
76
 
71
- public createViewQuery(): View.ViewQuery;
72
- public createViewQuery(resources: Resources): View.ViewQuery;
73
-
74
77
  public clearFocus(): void;
75
78
 
76
79
  public addOnAttachStateChangeListener(listener:View.OnAttachStateChangeListener): void;
@@ -267,14 +270,6 @@ export declare namespace View {
267
270
  public getTransformation(): Transformation;
268
271
  }
269
272
 
270
- export class ViewQuery {
271
- public findViewById<T extends View>(id: string): Nullable<T>;
272
-
273
- public findViewByTag<T extends View>(tag: string): Nullable<T>;
274
-
275
- public findViewsWithTag<T extends View>(tag: string): List<T>;
276
- }
277
-
278
273
  export class MeasureSpec {
279
274
  public static MODE_SHIFT: number;
280
275
  public static MODE_MASK: number;
package/index.d.ts CHANGED
@@ -21,7 +21,6 @@ export * from "./@types/Bitmap";
21
21
  export * from "./@types/BitmapDrawable";
22
22
  export * from "./@types/BounceInterpolator";
23
23
  export * from "./@types/Button";
24
- export * from "./@types/DecorView";
25
24
  export * from "./@types/Canvas";
26
25
  export * from "./@types/Color";
27
26
  export * from "./@types/Context";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/core",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "@compass-framework/core public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",
@@ -1,5 +0,0 @@
1
- import { FrameLayout } from "./FrameLayout";
2
-
3
- export class DecorView extends FrameLayout {
4
-
5
- }