@coolon/angular-ui-powerups 13.2.1 → 13.3.0

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,5 +1,6 @@
1
- import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
2
- import { BooleanValueModelChain, Command, ListModelChain, ValueModel, ValueModelChain } from '@coolon/pectin';
1
+ import { AfterViewInit, ElementRef, OnInit } from "@angular/core";
2
+ import { MatButton } from "@angular/material/button";
3
+ import { BooleanValueModelChain, Command, ListModelChain, ValueModel, ValueModelChain } from "@coolon/pectin";
3
4
  import { HorizontalAlignment } from '../../alignment';
4
5
  import { CommandFace } from '../command-face';
5
6
  import { PopupAwareComponent } from '../group/popup-aware.component';
@@ -16,6 +17,7 @@ export declare class CommandComponent extends PopupAwareComponent implements OnI
16
17
  busyFace: CommandFace;
17
18
  CommandFace: typeof CommandFace;
18
19
  alignFace: HorizontalAlignment;
20
+ protected button: MatButton;
19
21
  readonly faces$: ListModelChain<CommandFace>;
20
22
  readonly buttonStyle$: ValueModelChain<string>;
21
23
  readonly color$: ValueModelChain<string>;
@@ -27,6 +29,7 @@ export declare class CommandComponent extends PopupAwareComponent implements OnI
27
29
  ngOnInit(): void;
28
30
  ngAfterViewInit(): void;
29
31
  getFace(): CommandFace | undefined;
32
+ tryAndFocus(): void;
30
33
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandComponent, [null, { optional: true; }]>;
31
34
  static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "aup-command", never, { "command": "command"; "faceModel": "faceModel"; "face": "face"; "busyFaceModel": "busyFaceModel"; "busyFace": "busyFace"; "alignFace": "alignFace"; }, {}, never, never>;
32
35
  }
@@ -1,13 +1,15 @@
1
- import { AfterViewInit, InjectionToken } from '@angular/core';
2
- import { Command, ValueModel } from '@coolon/pectin';
3
- import { DisposableComponent } from '../components/disposable-component';
4
- import { ActivityActionsComponent } from './components/activity-actions/activity-actions.component';
5
- import { InteractionContext } from './interaction-context';
1
+ import { AfterViewInit, InjectionToken } from "@angular/core";
2
+ import { Command, Disposable, ValueModel } from "@coolon/pectin";
3
+ import { DisposableComponent } from "../components/disposable-component";
4
+ import { ActivityActionsComponent } from "./components/activity-actions/activity-actions.component";
5
+ import { InteractionContext } from "./interaction-context";
6
6
  import * as i0 from "@angular/core";
7
7
  export declare const ACTIVITY_DATA: InjectionToken<any>;
8
+ declare type OnActivityReadyParams<D, R, E = any> = (activity: Activity<D, R, E>) => void;
8
9
  export declare class Activity<D, R, E = any> extends DisposableComponent implements AfterViewInit {
9
- private readonly _busyModel;
10
- private _focusedModel;
10
+ private readonly activityReadyListeners;
11
+ private readonly _busy$;
12
+ private _focused$;
11
13
  private _activityContext;
12
14
  protected activityActions: ActivityActionsComponent;
13
15
  confirmCommand: Command<unknown>;
@@ -18,12 +20,14 @@ export declare class Activity<D, R, E = any> extends DisposableComponent impleme
18
20
  constructor();
19
21
  initialise(nestedInteractionContext: InteractionContext, activityContext: Activity.Context<R, E>): void;
20
22
  ngAfterViewInit(): void;
23
+ protected initialiseActivityAction(activityActions: ActivityActionsComponent): void;
21
24
  get interactionContext(): InteractionContext;
22
25
  done(result?: R): void;
23
26
  cancel(error?: E): void;
24
- onActivityReady(): void;
25
- get busy(): ValueModel<boolean>;
26
- get focused(): ValueModel<boolean>;
27
+ notifyActivityReady(): void;
28
+ onActivityReady(callback: OnActivityReadyParams<D, R, E>): Disposable;
29
+ get busy$(): ValueModel<boolean>;
30
+ get focused$(): ValueModel<boolean>;
27
31
  busyWhile(busyModel: ValueModel<boolean>): void;
28
32
  isBusy(): boolean;
29
33
  isInitialised(): boolean;
@@ -37,3 +41,4 @@ export declare namespace Activity {
37
41
  focused: ValueModel<boolean>;
38
42
  }
39
43
  }
44
+ export {};
@@ -1,7 +1,8 @@
1
- import { ChangeDetectorRef, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, OnInit } from "@angular/core";
2
2
  import { Command } from '@coolon/pectin';
3
3
  import { Enum } from 'typescript-string-enums';
4
4
  import { CommandFace } from '../../../components/commands/command-face';
5
+ import { CommandComponent } from "../../../components/commands/command/command.component";
5
6
  import { DisposableComponent } from '../../../components/disposable-component';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
@@ -27,6 +28,8 @@ import * as i0 from "@angular/core";
27
28
  */
28
29
  export declare class ActivityActionsComponent extends DisposableComponent implements OnInit {
29
30
  private readonly cdr;
31
+ protected confirmCommandComponent: CommandComponent;
32
+ protected cancelCommandComponent: CommandComponent;
30
33
  /**
31
34
  * @deprecated activity actions now use the confirm command of the activity automatically
32
35
  */
@@ -52,6 +55,8 @@ export declare class ActivityActionsComponent extends DisposableComponent implem
52
55
  confirmCommand: Command<unknown>;
53
56
  cancelCommand: Command<unknown>;
54
57
  }): void;
58
+ focusConfirm(): void;
59
+ focusCancel(): void;
55
60
  static ɵfac: i0.ɵɵFactoryDeclaration<ActivityActionsComponent, never>;
56
61
  static ɵcmp: i0.ɵɵComponentDeclaration<ActivityActionsComponent, "aup-activity-actions", never, { "confirmCommand": "confirmCommand"; "cancelCommand": "cancelCommand"; "faces": "faces"; "confirmFace": "confirmFace"; "cancelFace": "cancelFace"; "style": "style"; "layout": "layout"; "align": "align"; }, {}, never, ["*"]>;
57
62
  }
@@ -13,7 +13,6 @@ export declare class InputActivity<T, D extends InputActivity.Data<T> = InputAct
13
13
  readonly cancelFace: CommandFace;
14
14
  get layout(): InputActivity.Layout;
15
15
  constructor(data: D);
16
- onActivityReady(): void;
17
16
  get additionalCssClassName(): string;
18
17
  onEscape(): void;
19
18
  shouldCancelOnEscape(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "13.2.1",
3
+ "version": "13.3.0",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^13.2.3",