@coolon/angular-ui-powerups 16.1.0-aplpha.144 → 16.1.0-aplpha.146

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,6 +1,7 @@
1
1
  import { Command } from "@coolon/pectin";
2
2
  import { InteractionContext } from "./interaction-context";
3
- export declare abstract class ActivityContext {
3
+ import { InteractionContextProvider } from "./interaction-context-provider";
4
+ export declare abstract class ActivityContext extends InteractionContextProvider {
4
5
  abstract readonly interactionContext: InteractionContext;
5
6
  abstract readonly confirmCommand: Command;
6
7
  abstract readonly cancelCommand: Command;
@@ -1,20 +1,12 @@
1
1
  import { InjectionToken } from "@angular/core";
2
- import { Command, Constructable, Disposable, ValueModel } from "@coolon/pectin";
2
+ import { Command, Disposable, ValueModel } from "@coolon/pectin";
3
3
  import { LoadableComponent } from "../components/loadable-component";
4
4
  import { InteractionContext } from "./interaction-context";
5
- import { InteractionContextProvider } from "./interaction-context-provider";
6
5
  import * as i0 from "@angular/core";
7
6
  export declare const ACTIVITY_DATA: InjectionToken<any>;
8
7
  type OnActivityReadyParams<D, R, E = any> = (activity: Activity<D, R, E>) => void;
9
- export declare class Activity<D, R, E = any> extends LoadableComponent implements InteractionContextProvider {
8
+ export declare class Activity<D, R, E = any> extends LoadableComponent {
10
9
  #private;
11
- /**
12
- * @deprecated, inject ActivityContext instead
13
- */
14
- static asInteractionContextProvider<A extends Activity<any, any>>(this: Constructable<A>): {
15
- provide: InjectionToken<InteractionContextProvider>;
16
- useExisting: Constructable<A>;
17
- };
18
10
  readonly activityData: D;
19
11
  private readonly activityReadyListeners;
20
12
  private readonly _busy$;
@@ -52,7 +44,6 @@ export declare class Activity<D, R, E = any> extends LoadableComponent implement
52
44
  get disableClose(): boolean;
53
45
  disableCloseWhile(condition: ValueModel<boolean>): void;
54
46
  isInitialised(): boolean;
55
- getInteractionContext(): InteractionContext;
56
47
  static ɵfac: i0.ɵɵFactoryDeclaration<Activity<any, any, any>, never>;
57
48
  static ɵcmp: i0.ɵɵComponentDeclaration<Activity<any, any, any>, "ng-component", never, {}, {}, never, never, false, never>;
58
49
  }
@@ -1,12 +1,11 @@
1
- import { InjectionToken } from "@angular/core";
1
+ import { Activity } from "./activity";
2
2
  import { InteractionContext } from "./interaction-context";
3
- /**
4
- * @deprecated, inject ActivityContext instead
5
- */
6
- export declare const INTERACTION_CONTEXT_PROVIDER: InjectionToken<InteractionContextProvider>;
7
- /**
8
- * @deprecated, inject ActivityContext instead
9
- */
10
- export interface InteractionContextProvider {
11
- getInteractionContext(): InteractionContext;
3
+ export declare abstract class InteractionContextProvider {
4
+ static forActivity(activity: Activity<any, any>): {
5
+ getInteractionContext(): InteractionContext;
6
+ };
7
+ static forInteractionContext(interactionContext: InteractionContext): {
8
+ getInteractionContext(): InteractionContext;
9
+ };
10
+ abstract getInteractionContext(): InteractionContext;
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-aplpha.144",
3
+ "version": "16.1.0-aplpha.146",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",