@coolon/angular-ui-powerups 13.2.1 → 13.4.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,7 +1,7 @@
1
1
  import * as i4 from '@angular/common';
2
2
  import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, SkipSelf, Self, ContentChildren, ComponentRef, Injector, PLATFORM_ID } from '@angular/core';
4
+ import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChild, ViewChildren, EventEmitter, Output, SkipSelf, Self, ContentChildren, ComponentRef, Injector, PLATFORM_ID } from '@angular/core';
5
5
  import * as i4$1 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
7
  import * as i1$8 from '@angular/material/form-field';
@@ -20,7 +20,7 @@ import { CdkScrollableModule } from '@angular/cdk/scrolling';
20
20
  import * as i2$1 from '@angular/material/autocomplete';
21
21
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
22
22
  import * as i1 from '@angular/material/button';
23
- import { MatButtonModule } from '@angular/material/button';
23
+ import { MatButton, MatButtonModule } from '@angular/material/button';
24
24
  import * as i1$9 from '@angular/material/checkbox';
25
25
  import { MatCheckboxModule } from '@angular/material/checkbox';
26
26
  import * as i2 from '@angular/material/divider';
@@ -1085,9 +1085,12 @@ class CommandComponent extends PopupAwareComponent {
1085
1085
  getFace() {
1086
1086
  return this.face;
1087
1087
  }
1088
+ requestFocus() {
1089
+ this.button.focus();
1090
+ }
1088
1091
  }
1089
1092
  CommandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CommandComponent, deps: [{ token: i0.ElementRef }, { token: POPUP_CONTAINER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1090
- CommandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CommandComponent, selector: "aup-command", inputs: { command: "command", faceModel: "faceModel", face: "face", busyFaceModel: "busyFaceModel", busyFace: "busyFace", alignFace: "alignFace" }, host: { properties: { "class": "this.alignFace" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"iconOnly$.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly$.value\">\n <ng-container [ngSwitch]=\"buttonStyle$.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}:host.centered button{text-align:center}:host.start button{text-align:start}:host.end button{text-align:end}button{flex:1}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
1093
+ CommandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CommandComponent, selector: "aup-command", inputs: { command: "command", faceModel: "faceModel", face: "face", busyFaceModel: "busyFaceModel", busyFace: "busyFace", alignFace: "alignFace" }, host: { properties: { "class": "this.alignFace" } }, viewQueries: [{ propertyName: "button", first: true, predicate: MatButton, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"iconOnly$.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly$.value\">\n <ng-container [ngSwitch]=\"buttonStyle$.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"color$.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltip$.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces$.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}:host.centered button{text-align:center}:host.start button{text-align:start}:host.end button{text-align:end}button{flex:1}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
1091
1094
  __decorate([
1092
1095
  TrackExternal(),
1093
1096
  __metadata("design:type", Command)
@@ -1133,6 +1136,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
1133
1136
  }, {
1134
1137
  type: HostBinding,
1135
1138
  args: ["class"]
1139
+ }], button: [{
1140
+ type: ViewChild,
1141
+ args: [MatButton]
1136
1142
  }] } });
1137
1143
 
1138
1144
  /**
@@ -5033,9 +5039,15 @@ class ActivityActionsComponent extends DisposableComponent {
5033
5039
  this.cancelCommand = activity.cancelCommand;
5034
5040
  this.cdr.detectChanges();
5035
5041
  }
5042
+ focusConfirm() {
5043
+ this.confirmCommandComponent.requestFocus();
5044
+ }
5045
+ focusCancel() {
5046
+ this.cancelCommandComponent.requestFocus();
5047
+ }
5036
5048
  }
5037
5049
  ActivityActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ActivityActionsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5038
- ActivityActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: { confirmCommand: "confirmCommand", cancelCommand: "cancelCommand", faces: "faces", confirmFace: "confirmFace", cancelFace: "cancelFace", style: "style", layout: "layout", align: "align" }, host: { properties: { "attr.layout": "this.layout", "attr.align": "this.align" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}\n"], components: [{ type: CommandComponent, selector: "aup-command", inputs: ["command", "faceModel", "face", "busyFaceModel", "busyFace", "alignFace"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5050
+ ActivityActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: { confirmCommand: "confirmCommand", cancelCommand: "cancelCommand", faces: "faces", confirmFace: "confirmFace", cancelFace: "cancelFace", style: "style", layout: "layout", align: "align" }, host: { properties: { "attr.layout": "this.layout", "attr.align": "this.align" } }, viewQueries: [{ propertyName: "confirmCommandComponent", first: true, predicate: ["confirmCommandComponent"], descendants: true }, { propertyName: "cancelCommandComponent", first: true, predicate: ["cancelCommandComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}\n"], components: [{ type: CommandComponent, selector: "aup-command", inputs: ["command", "faceModel", "face", "busyFaceModel", "busyFace", "alignFace"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5039
5051
  __decorate([
5040
5052
  TrackExternal(),
5041
5053
  __metadata("design:type", Command)
@@ -5046,8 +5058,14 @@ __decorate([
5046
5058
  ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
5047
5059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ActivityActionsComponent, decorators: [{
5048
5060
  type: Component,
5049
- args: [{ selector: 'aup-activity-actions', template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}\n"] }]
5050
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { confirmCommand: [{
5061
+ args: [{ selector: 'aup-activity-actions', template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command #confirmCommandComponent class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command #cancelCommandComponent class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n", styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap: var(--activity-actions-gap, 8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}\n"] }]
5062
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { confirmCommandComponent: [{
5063
+ type: ViewChild,
5064
+ args: ["confirmCommandComponent"]
5065
+ }], cancelCommandComponent: [{
5066
+ type: ViewChild,
5067
+ args: ["cancelCommandComponent"]
5068
+ }], confirmCommand: [{
5051
5069
  type: Input
5052
5070
  }], cancelCommand: [{
5053
5071
  type: Input
@@ -5082,31 +5100,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
5082
5100
  });
5083
5101
  })(ActivityActionsComponent || (ActivityActionsComponent = {}));
5084
5102
 
5085
- const ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
5103
+ const ACTIVITY_DATA = new InjectionToken("InteractionActivityData");
5086
5104
  class Activity extends DisposableComponent {
5087
5105
  constructor() {
5088
5106
  super();
5089
- this._busyModel = this.registerDisposable(new DelegatingValueModel().withDefault(false));
5090
- this._focusedModel = this.registerDisposable(new DelegatingValueModel());
5091
- this.class = 'aup-activity';
5107
+ this.activityReadyListeners = new EventListenerList();
5108
+ this._busy$ = this.registerDisposable(new DelegatingValueModel().withDefault(false));
5109
+ this._focused$ = this.registerDisposable(new DelegatingValueModel());
5110
+ this.class = "aup-activity";
5092
5111
  this.busyWhile(this.confirmCommand.busy);
5093
5112
  }
5094
5113
  get isFocused() {
5095
- return this._focusedModel.value;
5114
+ return this._focused$.value;
5096
5115
  }
5097
5116
  initialise(nestedInteractionContext, activityContext) {
5098
5117
  const { chain, when } = Dsl.disposeWith(this);
5099
5118
  assert$1.isNil(this._activityContext);
5100
5119
  this._activityContext = activityContext;
5101
5120
  this._interactionContext = nestedInteractionContext;
5102
- this._focusedModel.setDelegate(activityContext.focused);
5103
- when(this._focusedModel).becomesTruthy(() => {
5104
- this.onActivityReady();
5121
+ this._focused$.setDelegate(activityContext.focused);
5122
+ when(this._focused$).becomesTruthy(() => {
5123
+ this.notifyActivityReady();
5105
5124
  });
5106
5125
  }
5107
5126
  ngAfterViewInit() {
5108
- var _a;
5109
- (_a = this.activityActions) === null || _a === void 0 ? void 0 : _a.initCommands(this);
5127
+ if (this.activityActions) {
5128
+ this.initialiseActivityAction(this.activityActions);
5129
+ }
5130
+ }
5131
+ initialiseActivityAction(activityActions) {
5132
+ activityActions.initCommands(this);
5110
5133
  }
5111
5134
  get interactionContext() {
5112
5135
  assert$1.isTruthy(this.isInitialised());
@@ -5118,27 +5141,33 @@ class Activity extends DisposableComponent {
5118
5141
  cancel(error) {
5119
5142
  this._activityContext.onCancel(error);
5120
5143
  }
5121
- // @Trace()
5122
- onActivityReady() {
5144
+ notifyActivityReady() {
5145
+ this.activityReadyListeners.fire(l => l(this));
5123
5146
  }
5124
- get busy() {
5125
- return this._busyModel.readonly;
5147
+ onActivityReady(callback) {
5148
+ return this.activityReadyListeners.add(callback);
5126
5149
  }
5127
- get focused() {
5128
- return this._focusedModel.readonly;
5150
+ autoFocusOnActivityReady(focusable) {
5151
+ return this.onActivityReady(() => focusable.requestFocus());
5152
+ }
5153
+ get busy$() {
5154
+ return this._busy$.readonly;
5155
+ }
5156
+ get focused$() {
5157
+ return this._focused$.readonly;
5129
5158
  }
5130
5159
  busyWhile(busyModel) {
5131
- this._busyModel.setDelegate(busyModel);
5160
+ this._busy$.setDelegate(busyModel);
5132
5161
  }
5133
5162
  isBusy() {
5134
- return this._busyModel.value;
5163
+ return this._busy$.value;
5135
5164
  }
5136
5165
  isInitialised() {
5137
5166
  return !!this._activityContext;
5138
5167
  }
5139
5168
  }
5140
5169
  Activity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: Activity, deps: [], target: i0.ɵɵFactoryTarget.Component });
5141
- Activity.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: Activity, selector: "ng-component", host: { properties: { "class": "this.class", "attr.focused": "this.isFocused" } }, viewQueries: [{ propertyName: "activityActions", first: true, predicate: ActivityActionsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
5170
+ Activity.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: Activity, selector: "ng-component", host: { properties: { "class": "this.class", "attr.focused": "this.isFocused" } }, viewQueries: [{ propertyName: "activityActions", first: true, predicate: ActivityActionsComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "", isInline: true });
5142
5171
  __decorate([
5143
5172
  TrackExternal(),
5144
5173
  __metadata("design:type", Command)
@@ -5150,17 +5179,17 @@ __decorate([
5150
5179
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: Activity, decorators: [{
5151
5180
  type: Component,
5152
5181
  args: [{
5153
- template: ''
5182
+ template: ""
5154
5183
  }]
5155
5184
  }], ctorParameters: function () { return []; }, propDecorators: { activityActions: [{
5156
5185
  type: ViewChild,
5157
5186
  args: [ActivityActionsComponent]
5158
5187
  }], confirmCommand: [], cancelCommand: [], class: [{
5159
5188
  type: HostBinding,
5160
- args: ['class']
5189
+ args: ["class"]
5161
5190
  }], isFocused: [{
5162
5191
  type: HostBinding,
5163
- args: ['attr.focused']
5192
+ args: ["attr.focused"]
5164
5193
  }] } });
5165
5194
 
5166
5195
  var Alert;
@@ -5194,6 +5223,11 @@ class AbstractDialogComponent extends Activity {
5194
5223
  color: () => this.color || 'primary',
5195
5224
  style: () => 'raised'
5196
5225
  };
5226
+ this.onActivityReady(() => {
5227
+ if (this.activityActions) {
5228
+ this.isDestructive() ? this.activityActions.focusCancel() : this.activityActions.focusConfirm();
5229
+ }
5230
+ });
5197
5231
  }
5198
5232
  getConfig() {
5199
5233
  return lang$1.abstractMethod(this.constructor);
@@ -5479,7 +5513,7 @@ class ActivityRef {
5479
5513
  },
5480
5514
  focused: this.focusedModel.readonly
5481
5515
  });
5482
- this._activityBusy.setDelegate(this._activity.busy);
5516
+ this._activityBusy.setDelegate(this._activity.busy$);
5483
5517
  }
5484
5518
  finishActivity(resolveOrReject) {
5485
5519
  assert.isFalsey(this.isComplete());
@@ -5531,7 +5565,10 @@ class ActivityOutletComponent {
5531
5565
  loadActivity(activityRef) {
5532
5566
  const injector = Injector.create({
5533
5567
  providers: [
5534
- { provide: ACTIVITY_DATA, useValue: activityRef.activityData }
5568
+ {
5569
+ provide: ACTIVITY_DATA,
5570
+ useValue: activityRef.activityData
5571
+ }
5535
5572
  ],
5536
5573
  parent: this.injector
5537
5574
  });
@@ -8090,14 +8127,12 @@ class InputActivity extends Activity {
8090
8127
  this.cancel();
8091
8128
  });
8092
8129
  this.busyWhile(this.confirmCommand.busy);
8130
+ this.onActivityReady(() => this.valueModel.focusContext.requestFocus());
8093
8131
  }
8094
8132
  get layout() {
8095
8133
  var _a, _b;
8096
8134
  return (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.layout) !== null && _b !== void 0 ? _b : InputActivity.Layout.BLOCK;
8097
8135
  }
8098
- onActivityReady() {
8099
- this.valueModel.focusContext.requestFocus();
8100
- }
8101
8136
  get additionalCssClassName() {
8102
8137
  var _a;
8103
8138
  return (_a = this.data.cssClassName) !== null && _a !== void 0 ? _a : '';