@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.
- package/esm2020/lib/components/commands/command/command.component.mjs +11 -4
- package/esm2020/lib/interaction/activity-ref.mjs +2 -2
- package/esm2020/lib/interaction/activity.mjs +39 -27
- package/esm2020/lib/interaction/components/abstract-confirm-dialog.component.mjs +1 -1
- package/esm2020/lib/interaction/components/abstract-dialog.component.mjs +6 -1
- package/esm2020/lib/interaction/components/activity-actions/activity-actions.component.mjs +18 -5
- package/esm2020/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.mjs +5 -2
- package/esm2020/lib/interaction/components/input-activities/input-activity.mjs +2 -4
- package/fesm2015/coolon-angular-ui-powerups.mjs +68 -33
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +68 -32
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +5 -2
- package/lib/interaction/activity.d.ts +18 -10
- package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +6 -1
- package/lib/interaction/components/input-activities/input-activity.d.ts +0 -1
- package/package.json +1 -1
|
@@ -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,
|
|
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';
|
|
@@ -1075,9 +1075,12 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
1075
1075
|
getFace() {
|
|
1076
1076
|
return this.face;
|
|
1077
1077
|
}
|
|
1078
|
+
requestFocus() {
|
|
1079
|
+
this.button.focus();
|
|
1080
|
+
}
|
|
1078
1081
|
}
|
|
1079
1082
|
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 });
|
|
1080
|
-
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]" }] });
|
|
1083
|
+
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]" }] });
|
|
1081
1084
|
__decorate([
|
|
1082
1085
|
TrackExternal(),
|
|
1083
1086
|
__metadata("design:type", Command)
|
|
@@ -1121,6 +1124,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
1121
1124
|
}, {
|
|
1122
1125
|
type: HostBinding,
|
|
1123
1126
|
args: ["class"]
|
|
1127
|
+
}], button: [{
|
|
1128
|
+
type: ViewChild,
|
|
1129
|
+
args: [MatButton]
|
|
1124
1130
|
}] } });
|
|
1125
1131
|
|
|
1126
1132
|
/**
|
|
@@ -4988,9 +4994,15 @@ class ActivityActionsComponent extends DisposableComponent {
|
|
|
4988
4994
|
this.cancelCommand = activity.cancelCommand;
|
|
4989
4995
|
this.cdr.detectChanges();
|
|
4990
4996
|
}
|
|
4997
|
+
focusConfirm() {
|
|
4998
|
+
this.confirmCommandComponent.requestFocus();
|
|
4999
|
+
}
|
|
5000
|
+
focusCancel() {
|
|
5001
|
+
this.cancelCommandComponent.requestFocus();
|
|
5002
|
+
}
|
|
4991
5003
|
}
|
|
4992
5004
|
ActivityActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ActivityActionsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4993
|
-
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"] }] });
|
|
5005
|
+
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"] }] });
|
|
4994
5006
|
__decorate([
|
|
4995
5007
|
TrackExternal(),
|
|
4996
5008
|
__metadata("design:type", Command)
|
|
@@ -5001,8 +5013,14 @@ __decorate([
|
|
|
5001
5013
|
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
5002
5014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ActivityActionsComponent, decorators: [{
|
|
5003
5015
|
type: Component,
|
|
5004
|
-
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"] }]
|
|
5005
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
5016
|
+
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"] }]
|
|
5017
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { confirmCommandComponent: [{
|
|
5018
|
+
type: ViewChild,
|
|
5019
|
+
args: ["confirmCommandComponent"]
|
|
5020
|
+
}], cancelCommandComponent: [{
|
|
5021
|
+
type: ViewChild,
|
|
5022
|
+
args: ["cancelCommandComponent"]
|
|
5023
|
+
}], confirmCommand: [{
|
|
5006
5024
|
type: Input
|
|
5007
5025
|
}], cancelCommand: [{
|
|
5008
5026
|
type: Input
|
|
@@ -5037,30 +5055,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
5037
5055
|
});
|
|
5038
5056
|
})(ActivityActionsComponent || (ActivityActionsComponent = {}));
|
|
5039
5057
|
|
|
5040
|
-
const ACTIVITY_DATA = new InjectionToken(
|
|
5058
|
+
const ACTIVITY_DATA = new InjectionToken("InteractionActivityData");
|
|
5041
5059
|
class Activity extends DisposableComponent {
|
|
5042
5060
|
constructor() {
|
|
5043
5061
|
super();
|
|
5044
|
-
this.
|
|
5045
|
-
this.
|
|
5046
|
-
this.
|
|
5062
|
+
this.activityReadyListeners = new EventListenerList();
|
|
5063
|
+
this._busy$ = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
5064
|
+
this._focused$ = this.registerDisposable(new DelegatingValueModel());
|
|
5065
|
+
this.class = "aup-activity";
|
|
5047
5066
|
this.busyWhile(this.confirmCommand.busy);
|
|
5048
5067
|
}
|
|
5049
5068
|
get isFocused() {
|
|
5050
|
-
return this.
|
|
5069
|
+
return this._focused$.value;
|
|
5051
5070
|
}
|
|
5052
5071
|
initialise(nestedInteractionContext, activityContext) {
|
|
5053
5072
|
const { chain, when } = Dsl.disposeWith(this);
|
|
5054
5073
|
assert$1.isNil(this._activityContext);
|
|
5055
5074
|
this._activityContext = activityContext;
|
|
5056
5075
|
this._interactionContext = nestedInteractionContext;
|
|
5057
|
-
this.
|
|
5058
|
-
when(this.
|
|
5059
|
-
this.
|
|
5076
|
+
this._focused$.setDelegate(activityContext.focused);
|
|
5077
|
+
when(this._focused$).becomesTruthy(() => {
|
|
5078
|
+
this.notifyActivityReady();
|
|
5060
5079
|
});
|
|
5061
5080
|
}
|
|
5062
5081
|
ngAfterViewInit() {
|
|
5063
|
-
this.activityActions
|
|
5082
|
+
if (this.activityActions) {
|
|
5083
|
+
this.initialiseActivityAction(this.activityActions);
|
|
5084
|
+
}
|
|
5085
|
+
}
|
|
5086
|
+
initialiseActivityAction(activityActions) {
|
|
5087
|
+
activityActions.initCommands(this);
|
|
5064
5088
|
}
|
|
5065
5089
|
get interactionContext() {
|
|
5066
5090
|
assert$1.isTruthy(this.isInitialised());
|
|
@@ -5072,27 +5096,33 @@ class Activity extends DisposableComponent {
|
|
|
5072
5096
|
cancel(error) {
|
|
5073
5097
|
this._activityContext.onCancel(error);
|
|
5074
5098
|
}
|
|
5075
|
-
|
|
5076
|
-
|
|
5099
|
+
notifyActivityReady() {
|
|
5100
|
+
this.activityReadyListeners.fire(l => l(this));
|
|
5077
5101
|
}
|
|
5078
|
-
|
|
5079
|
-
return this.
|
|
5102
|
+
onActivityReady(callback) {
|
|
5103
|
+
return this.activityReadyListeners.add(callback);
|
|
5080
5104
|
}
|
|
5081
|
-
|
|
5082
|
-
return this.
|
|
5105
|
+
autoFocusOnActivityReady(focusable) {
|
|
5106
|
+
return this.onActivityReady(() => focusable.requestFocus());
|
|
5107
|
+
}
|
|
5108
|
+
get busy$() {
|
|
5109
|
+
return this._busy$.readonly;
|
|
5110
|
+
}
|
|
5111
|
+
get focused$() {
|
|
5112
|
+
return this._focused$.readonly;
|
|
5083
5113
|
}
|
|
5084
5114
|
busyWhile(busyModel) {
|
|
5085
|
-
this.
|
|
5115
|
+
this._busy$.setDelegate(busyModel);
|
|
5086
5116
|
}
|
|
5087
5117
|
isBusy() {
|
|
5088
|
-
return this.
|
|
5118
|
+
return this._busy$.value;
|
|
5089
5119
|
}
|
|
5090
5120
|
isInitialised() {
|
|
5091
5121
|
return !!this._activityContext;
|
|
5092
5122
|
}
|
|
5093
5123
|
}
|
|
5094
5124
|
Activity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: Activity, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5095
|
-
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:
|
|
5125
|
+
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 });
|
|
5096
5126
|
__decorate([
|
|
5097
5127
|
TrackExternal(),
|
|
5098
5128
|
__metadata("design:type", Command)
|
|
@@ -5104,17 +5134,17 @@ __decorate([
|
|
|
5104
5134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: Activity, decorators: [{
|
|
5105
5135
|
type: Component,
|
|
5106
5136
|
args: [{
|
|
5107
|
-
template:
|
|
5137
|
+
template: ""
|
|
5108
5138
|
}]
|
|
5109
5139
|
}], ctorParameters: function () { return []; }, propDecorators: { activityActions: [{
|
|
5110
5140
|
type: ViewChild,
|
|
5111
5141
|
args: [ActivityActionsComponent]
|
|
5112
5142
|
}], confirmCommand: [], cancelCommand: [], class: [{
|
|
5113
5143
|
type: HostBinding,
|
|
5114
|
-
args: [
|
|
5144
|
+
args: ["class"]
|
|
5115
5145
|
}], isFocused: [{
|
|
5116
5146
|
type: HostBinding,
|
|
5117
|
-
args: [
|
|
5147
|
+
args: ["attr.focused"]
|
|
5118
5148
|
}] } });
|
|
5119
5149
|
|
|
5120
5150
|
var Alert;
|
|
@@ -5148,6 +5178,11 @@ class AbstractDialogComponent extends Activity {
|
|
|
5148
5178
|
color: () => this.color || 'primary',
|
|
5149
5179
|
style: () => 'raised'
|
|
5150
5180
|
};
|
|
5181
|
+
this.onActivityReady(() => {
|
|
5182
|
+
if (this.activityActions) {
|
|
5183
|
+
this.isDestructive() ? this.activityActions.focusCancel() : this.activityActions.focusConfirm();
|
|
5184
|
+
}
|
|
5185
|
+
});
|
|
5151
5186
|
}
|
|
5152
5187
|
getConfig() {
|
|
5153
5188
|
return lang$1.abstractMethod(this.constructor);
|
|
@@ -7130,7 +7165,7 @@ class ActivityRef {
|
|
|
7130
7165
|
},
|
|
7131
7166
|
focused: this.focusedModel.readonly
|
|
7132
7167
|
});
|
|
7133
|
-
this._activityBusy.setDelegate(this._activity.busy);
|
|
7168
|
+
this._activityBusy.setDelegate(this._activity.busy$);
|
|
7134
7169
|
}
|
|
7135
7170
|
finishActivity(resolveOrReject) {
|
|
7136
7171
|
assert.isFalsey(this.isComplete());
|
|
@@ -7182,7 +7217,10 @@ class ActivityOutletComponent {
|
|
|
7182
7217
|
loadActivity(activityRef) {
|
|
7183
7218
|
const injector = Injector.create({
|
|
7184
7219
|
providers: [
|
|
7185
|
-
{
|
|
7220
|
+
{
|
|
7221
|
+
provide: ACTIVITY_DATA,
|
|
7222
|
+
useValue: activityRef.activityData
|
|
7223
|
+
}
|
|
7186
7224
|
],
|
|
7187
7225
|
parent: this.injector
|
|
7188
7226
|
});
|
|
@@ -7991,13 +8029,11 @@ class InputActivity extends Activity {
|
|
|
7991
8029
|
this.cancel();
|
|
7992
8030
|
});
|
|
7993
8031
|
this.busyWhile(this.confirmCommand.busy);
|
|
8032
|
+
this.onActivityReady(() => this.valueModel.focusContext.requestFocus());
|
|
7994
8033
|
}
|
|
7995
8034
|
get layout() {
|
|
7996
8035
|
return this.data?.layout ?? InputActivity.Layout.BLOCK;
|
|
7997
8036
|
}
|
|
7998
|
-
onActivityReady() {
|
|
7999
|
-
this.valueModel.focusContext.requestFocus();
|
|
8000
|
-
}
|
|
8001
8037
|
get additionalCssClassName() {
|
|
8002
8038
|
return this.data.cssClassName ?? '';
|
|
8003
8039
|
}
|