@coolon/angular-ui-powerups 16.1.0-aplpha.145 → 16.1.0-aplpha.147

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,10 +1,9 @@
1
1
  import { Command } from "@coolon/pectin";
2
2
  import { InteractionContext } from "./interaction-context";
3
3
  import { InteractionContextProvider } from "./interaction-context-provider";
4
- export declare abstract class ActivityContext implements InteractionContextProvider {
4
+ export declare abstract class ActivityContext extends InteractionContextProvider {
5
5
  abstract readonly interactionContext: InteractionContext;
6
6
  abstract readonly confirmCommand: Command;
7
7
  abstract readonly cancelCommand: Command;
8
- abstract getInteractionContext(): InteractionContext;
9
8
  abstract onActivityReady(callback: () => void): void;
10
9
  }
@@ -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 - and all activity outlets automatically inject the INTERACTION_CONTEXT_PROVIDER
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
  }
@@ -27,7 +27,6 @@ import * as i0 from "@angular/core";
27
27
  * </aup-activity-actions>
28
28
  */
29
29
  export declare class ActivityActionsComponent extends DisposableComponent {
30
- protected readonly activityContext: ActivityContext;
31
30
  protected confirmCommandComponent: CommandComponent;
32
31
  protected cancelCommandComponent: CommandComponent;
33
32
  /**
@@ -48,12 +47,13 @@ export declare class ActivityActionsComponent extends DisposableComponent {
48
47
  layout: ActivityActionsComponent.Layout;
49
48
  align: ActivityActionsComponent.Align;
50
49
  alignContent: ActivityActionsComponent.AlignContent;
51
- constructor(activityContext: ActivityContext);
50
+ protected readonly activityContext: ActivityContext;
51
+ constructor();
52
52
  hasConfirmFace(): boolean;
53
53
  hasCancelFace(): boolean;
54
54
  focusConfirm(): void;
55
55
  focusCancel(): void;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<ActivityActionsComponent, [{ optional: true; }]>;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActivityActionsComponent, never>;
57
57
  static ɵcmp: i0.ɵɵComponentDeclaration<ActivityActionsComponent, "aup-activity-actions", never, { "confirmCommand": { "alias": "confirmCommand"; "required": false; }; "cancelCommand": { "alias": "cancelCommand"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "confirmFace": { "alias": "confirmFace"; "required": false; }; "cancelFace": { "alias": "cancelFace"; "required": false; }; "style": { "alias": "style"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "align": { "alias": "align"; "required": false; }; "alignContent": { "alias": "alignContent"; "required": false; }; }, {}, never, ["*"], false, never>;
58
58
  }
59
59
  export declare namespace ActivityActionsComponent {
@@ -1,6 +1,11 @@
1
- import { InjectionToken } from "@angular/core";
1
+ import { Activity } from "./activity";
2
2
  import { InteractionContext } from "./interaction-context";
3
- export declare const INTERACTION_CONTEXT_PROVIDER: InjectionToken<InteractionContextProvider>;
4
- export interface InteractionContextProvider {
5
- 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;
6
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-aplpha.145",
3
+ "version": "16.1.0-aplpha.147",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",