@compass-framework/core 1.0.5 → 1.0.7

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,4 +1,4 @@
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";
@@ -10,7 +10,12 @@ export declare class ApplicationWindow implements IWindow {
10
10
  public constructor();
11
11
  public constructor(context: WindowContext);
12
12
 
13
- public createViewQuery(): View.ViewQuery;
13
+ public findViewById(id: number): View;
14
+ public findViewById(id: string): View;
15
+
16
+ public findViewByTag(tag: string): View;
17
+
18
+ public findViewsByTag(tag: string): ArrayList<View>;
14
19
 
15
20
  public onAttach(context: WindowContext): void;
16
21
 
@@ -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
 
@@ -0,0 +1,5 @@
1
+ import {View} from "./View";
2
+
3
+ export declare class Slot extends View {
4
+ public replace(target: View): void
5
+ }
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;
@@ -143,6 +146,8 @@ export declare class View implements Drawable.Callback {
143
146
 
144
147
  public getScaleY(): number;
145
148
 
149
+ public getTag(): string;
150
+
146
151
  public getOverlay(): ViewOverlay;
147
152
 
148
153
  public getViewTreeObserver(): ViewTreeObserver;
@@ -193,6 +198,8 @@ export declare class View implements Drawable.Callback {
193
198
 
194
199
  public setVisibility(visibility: number): void;
195
200
 
201
+ public setTag(tag: string): void;
202
+
196
203
  public setOutlineProvider(provider: ViewOutlineProvider): void;
197
204
 
198
205
  public setFocusable(focusable: boolean): void;
@@ -267,14 +274,6 @@ export declare namespace View {
267
274
  public getTransformation(): Transformation;
268
275
  }
269
276
 
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
277
  export class MeasureSpec {
279
278
  public static MODE_SHIFT: number;
280
279
  public static MODE_MASK: number;
package/index.d.ts CHANGED
@@ -103,3 +103,4 @@ export * from './@types/CornerPathEffect';
103
103
  export * from './@types/DensityMetrics';
104
104
  export * from './@types/ApplicationFrameContext';
105
105
  export * from './@types/ResourcesInflater';
106
+ export * from './@types/Slot';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/core",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "@compass-framework/core public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",