@coolon/angular-ui-powerups 14.5.6 → 14.6.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/forms/autocomplete-input/autocomplete-input.component.mjs +6 -3
- package/esm2020/lib/components/forms/select-input/select-input.component.mjs +3 -3
- package/esm2020/lib/interaction/activity.mjs +3 -2
- package/esm2020/lib/interaction/components/input-activities/input-activity.mjs +16 -20
- package/esm2020/lib/interaction/components/input-activities/select-input-activity.mjs +8 -8
- package/esm2020/lib/interaction/components/input-activities/string-input-activity.mjs +5 -5
- package/fesm2015/coolon-angular-ui-powerups.mjs +33 -35
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +33 -33
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +2 -1
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -1
- package/lib/interaction/activity.d.ts +1 -0
- package/lib/interaction/components/input-activities/input-activity.d.ts +1 -2
- package/package.json +3 -3
- package/schematics/component/templates/component/__name@dasherize__.component.scss.template +0 -1
|
@@ -2,7 +2,7 @@ import { ObserversModule } from '@angular/cdk/observers';
|
|
|
2
2
|
import * as i1$1 from '@angular/common';
|
|
3
3
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ViewEncapsulation, InjectionToken, ViewChild, ViewChildren, EventEmitter, Output, SkipSelf, Self, ContentChildren, ComponentRef, Injector, PLATFORM_ID } from '@angular/core';
|
|
5
|
+
import { ElementRef, Directive, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ViewEncapsulation, InjectionToken, ViewChild, ViewChildren, EventEmitter, Output, SkipSelf, Self, ContentChildren, ComponentRef, Injector, PLATFORM_ID, inject } from '@angular/core';
|
|
6
6
|
import * as i2$4 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i3$1 from '@angular/material/form-field';
|
|
@@ -1877,6 +1877,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
1877
1877
|
class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
1878
1878
|
constructor() {
|
|
1879
1879
|
super();
|
|
1880
|
+
this.autoActiveFirstOption = true;
|
|
1880
1881
|
this.autoFilter = true;
|
|
1881
1882
|
this.inSearchUpdate$ = new Guard();
|
|
1882
1883
|
this.filterValue = new MutableValueModel();
|
|
@@ -1920,7 +1921,7 @@ class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
|
1920
1921
|
}
|
|
1921
1922
|
}
|
|
1922
1923
|
AutocompleteInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AutocompleteInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1923
|
-
AutocompleteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: AutocompleteInputComponent, selector: "aup-autocomplete-input", inputs: { rawTextContent$: "rawTextContent$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", autoFilter: "autoFilter", optionLabelFormat: "optionLabelFormat", filterFactory: "filterFactory" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], viewQueries: [{ propertyName: "matInputComponent", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\"\n [autoActiveFirstOption]=\"
|
|
1924
|
+
AutocompleteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: AutocompleteInputComponent, selector: "aup-autocomplete-input", inputs: { rawTextContent$: "rawTextContent$", optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", autoActiveFirstOption: "autoActiveFirstOption", autoFilter: "autoFilter", optionLabelFormat: "optionLabelFormat", filterFactory: "filterFactory" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], viewQueries: [{ propertyName: "matInputComponent", first: true, predicate: MatInput, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\"\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\n (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{formatOption(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{formatOption(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }] });
|
|
1924
1925
|
__decorate([
|
|
1925
1926
|
TrackExternal(),
|
|
1926
1927
|
__metadata("design:type", MutableValueModel)
|
|
@@ -1935,7 +1936,7 @@ __decorate([
|
|
|
1935
1936
|
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1936
1937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AutocompleteInputComponent, decorators: [{
|
|
1937
1938
|
type: Component,
|
|
1938
|
-
args: [{ selector: 'aup-autocomplete-input', template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\"\n [autoActiveFirstOption]=\"
|
|
1939
|
+
args: [{ selector: 'aup-autocomplete-input', template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\"\n [autoActiveFirstOption]=\"autoActiveFirstOption\"\n (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{formatOption(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div>{{placeholder}}</div>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{formatOption(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"] }]
|
|
1939
1940
|
}], ctorParameters: function () { return []; }, propDecorators: { rawTextContent$: [{
|
|
1940
1941
|
type: Input
|
|
1941
1942
|
}], optionsModel: [{
|
|
@@ -1946,6 +1947,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
1946
1947
|
type: Input
|
|
1947
1948
|
}], allowNil: [{
|
|
1948
1949
|
type: Input
|
|
1950
|
+
}], autoActiveFirstOption: [{
|
|
1951
|
+
type: Input
|
|
1949
1952
|
}], autoFilter: [{
|
|
1950
1953
|
type: Input
|
|
1951
1954
|
}], matInputComponent: [{
|
|
@@ -2082,7 +2085,7 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
2082
2085
|
}
|
|
2083
2086
|
}
|
|
2084
2087
|
SelectInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2085
|
-
SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectInputComponent, selector: "aup-select-input", inputs: { optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValueModel.value}\"></ng-container>\n </mat-select-trigger>\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
2088
|
+
SelectInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectInputComponent, selector: "aup-select-input", inputs: { optionsModel: "optionsModel", options: "options", optionLabel: "optionLabel", allowNil: "allowNil", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "selectedOptionTemplateRef", first: true, predicate: ["selectedOptionTemplate"], descendants: true }, { propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "nilOptionTemplateRef", first: true, predicate: ["nilOptionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValueModel.value}\"></ng-container>\n </mat-select-trigger>\n\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }] });
|
|
2086
2089
|
__decorate([
|
|
2087
2090
|
TrackExternal(),
|
|
2088
2091
|
__metadata("design:type", ListModel)
|
|
@@ -2093,7 +2096,7 @@ __decorate([
|
|
|
2093
2096
|
], SelectInputComponent.prototype, "options", void 0);
|
|
2094
2097
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
2095
2098
|
type: Component,
|
|
2096
|
-
args: [{ selector: 'aup-select-input', template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValueModel.value}\"></ng-container>\n </mat-select-trigger>\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"] }]
|
|
2099
|
+
args: [{ selector: 'aup-select-input', template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"componentValueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\" [ngTemplateOutletContext]=\"{ $implicit: componentValueModel.value}\"></ng-container>\n </mat-select-trigger>\n\n <mat-option *ngIf=\"allowNil\">\n <ng-container *ngIf=\"!nilOptionTemplateRef\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"nilOptionTemplateRef\" [ngTemplateOutlet]=\"nilOptionTemplateRef\"></ng-container>\n </mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n<div class=\"width-strut\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <div class=\"item\" *ngFor=\"let item of options\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"\n >\n </ng-container>\n </div>\n</div>\n", styles: [":host{display:inline-block}mat-form-field{width:100%}.width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:35px}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"] }]
|
|
2097
2100
|
}], ctorParameters: function () { return []; }, propDecorators: { optionsModel: [{
|
|
2098
2101
|
type: Input
|
|
2099
2102
|
}], options: [{
|
|
@@ -5242,6 +5245,7 @@ const ACTIVITY_DATA = new InjectionToken("InteractionActivityData");
|
|
|
5242
5245
|
class Activity extends DisposableComponent {
|
|
5243
5246
|
constructor() {
|
|
5244
5247
|
super();
|
|
5248
|
+
this.activityData = inject(ACTIVITY_DATA);
|
|
5245
5249
|
this.activityReadyListeners = new EventListenerList();
|
|
5246
5250
|
this._busy$ = this.registerDisposable(new DelegatingValueModel().withDefault(false));
|
|
5247
5251
|
this._focused$ = this.registerDisposable(new DelegatingValueModel());
|
|
@@ -8154,27 +8158,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
8154
8158
|
// we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
|
|
8155
8159
|
// @dynamic
|
|
8156
8160
|
class InputActivity extends Activity {
|
|
8157
|
-
constructor(
|
|
8161
|
+
constructor() {
|
|
8158
8162
|
super();
|
|
8159
|
-
this.data = data;
|
|
8160
8163
|
this.class = 'aup-input-activity';
|
|
8161
8164
|
const form = new DirtyTrackingForm();
|
|
8162
|
-
this.valueModel = form.valueModel(this.
|
|
8163
|
-
this.valueModel.validateUsing(
|
|
8165
|
+
this.valueModel = form.valueModel(this.activityData.initialValue);
|
|
8166
|
+
this.valueModel.validateUsing(this.activityData.validators || []);
|
|
8164
8167
|
// TODO: move to global configuration
|
|
8165
|
-
this.confirmFace =
|
|
8168
|
+
this.confirmFace = this.activityData.confirmFace ?? {
|
|
8166
8169
|
icon: () => 'mat:check'
|
|
8167
8170
|
};
|
|
8168
|
-
this.cancelFace =
|
|
8171
|
+
this.cancelFace = this.activityData.cancelFace ?? {
|
|
8169
8172
|
icon: () => 'mat:clear'
|
|
8170
8173
|
};
|
|
8171
8174
|
this.confirmCommand = Command.create(async () => {
|
|
8172
8175
|
if (this.valueModel.validate()) {
|
|
8173
|
-
if (
|
|
8176
|
+
if (this.activityData.save) {
|
|
8174
8177
|
const self = this;
|
|
8175
8178
|
try {
|
|
8176
8179
|
let allGood = true;
|
|
8177
|
-
const result = await
|
|
8180
|
+
const result = await this.activityData.save(this.valueModel.value, {
|
|
8178
8181
|
injectError(error) {
|
|
8179
8182
|
allGood = false;
|
|
8180
8183
|
self.valueModel.injectErrors([error]);
|
|
@@ -8200,10 +8203,10 @@ class InputActivity extends Activity {
|
|
|
8200
8203
|
this.onActivityReady(() => this.valueModel.focusContext.requestFocus());
|
|
8201
8204
|
}
|
|
8202
8205
|
get layout() {
|
|
8203
|
-
return this.
|
|
8206
|
+
return this.activityData?.layout ?? InputActivity.Layout.BLOCK;
|
|
8204
8207
|
}
|
|
8205
8208
|
get additionalCssClassName() {
|
|
8206
|
-
return this.
|
|
8209
|
+
return this.activityData.cssClassName ?? '';
|
|
8207
8210
|
}
|
|
8208
8211
|
onEscape() {
|
|
8209
8212
|
if (this.shouldCancelOnEscape() && this.cancelCommand.enabled.value) {
|
|
@@ -8211,19 +8214,16 @@ class InputActivity extends Activity {
|
|
|
8211
8214
|
}
|
|
8212
8215
|
}
|
|
8213
8216
|
shouldCancelOnEscape() {
|
|
8214
|
-
return isNil(this.
|
|
8215
|
-
|| this.
|
|
8217
|
+
return isNil(this.activityData.cancelOnEscape) // we default to true..
|
|
8218
|
+
|| this.activityData.cancelOnEscape;
|
|
8216
8219
|
}
|
|
8217
8220
|
}
|
|
8218
|
-
InputActivity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InputActivity, deps: [
|
|
8221
|
+
InputActivity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InputActivity, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8219
8222
|
InputActivity.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: InputActivity, selector: "ng-component", inputs: { layout: "layout" }, host: { listeners: { "keydown.escape": "onEscape()" }, properties: { "class": "this.additionalCssClassName", "attr.layout": "this.layout" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
8220
8223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: InputActivity, decorators: [{
|
|
8221
8224
|
type: Component,
|
|
8222
8225
|
args: [{ template: `` }]
|
|
8223
|
-
}], ctorParameters: function () { return [
|
|
8224
|
-
type: Inject,
|
|
8225
|
-
args: [ACTIVITY_DATA]
|
|
8226
|
-
}] }]; }, propDecorators: { class: [{
|
|
8226
|
+
}], ctorParameters: function () { return []; }, propDecorators: { class: [{
|
|
8227
8227
|
type: HostBinding,
|
|
8228
8228
|
args: ['class']
|
|
8229
8229
|
}], layout: [{
|
|
@@ -8250,8 +8250,8 @@ class StringInputActivity extends InputActivity {
|
|
|
8250
8250
|
StringInputActivity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: StringInputActivity, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
8251
8251
|
StringInputActivity.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: StringInputActivity, selector: "aup-string-input-activity", usesInheritance: true, ngImport: i0, template: `
|
|
8252
8252
|
<aup-string-input [valueModel]="valueModel"
|
|
8253
|
-
[label]="
|
|
8254
|
-
[placeholder]="
|
|
8253
|
+
[label]="activityData.label"
|
|
8254
|
+
[placeholder]="activityData.placeholder"
|
|
8255
8255
|
[command.enter]="confirmCommand"
|
|
8256
8256
|
[command.escape]="cancelCommand"></aup-string-input>
|
|
8257
8257
|
<aup-activity-actions [layout]="layout" align="end"
|
|
@@ -8265,8 +8265,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
8265
8265
|
selector: 'aup-string-input-activity',
|
|
8266
8266
|
template: `
|
|
8267
8267
|
<aup-string-input [valueModel]="valueModel"
|
|
8268
|
-
[label]="
|
|
8269
|
-
[placeholder]="
|
|
8268
|
+
[label]="activityData.label"
|
|
8269
|
+
[placeholder]="activityData.placeholder"
|
|
8270
8270
|
[command.enter]="confirmCommand"
|
|
8271
8271
|
[command.escape]="cancelCommand"></aup-string-input>
|
|
8272
8272
|
<aup-activity-actions [layout]="layout" align="end"
|
|
@@ -8281,21 +8281,21 @@ class SelectInputActivity extends InputActivity {
|
|
|
8281
8281
|
constructor() {
|
|
8282
8282
|
super(...arguments);
|
|
8283
8283
|
this.defaultOptionLabelFormat = (option) => {
|
|
8284
|
-
return this.
|
|
8284
|
+
return this.activityData.optionLabel ? option[this.activityData.optionLabel] : option;
|
|
8285
8285
|
};
|
|
8286
8286
|
}
|
|
8287
8287
|
get optionLabelFormat() {
|
|
8288
|
-
return this.
|
|
8288
|
+
return this.activityData.optionLabelFormat ?? this.defaultOptionLabelFormat;
|
|
8289
8289
|
}
|
|
8290
8290
|
get options() {
|
|
8291
|
-
return this.
|
|
8291
|
+
return this.activityData.optionsModel?.value || this.activityData.options;
|
|
8292
8292
|
}
|
|
8293
8293
|
}
|
|
8294
8294
|
SelectInputActivity.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectInputActivity, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
8295
8295
|
SelectInputActivity.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectInputActivity, selector: "aup-select-input-activity", usesInheritance: true, ngImport: i0, template: `
|
|
8296
8296
|
<aup-select-input [valueModel]="valueModel"
|
|
8297
|
-
[label]="
|
|
8298
|
-
[placeholder]="
|
|
8297
|
+
[label]="activityData.label"
|
|
8298
|
+
[placeholder]="activityData.placeholder"
|
|
8299
8299
|
[command.enter]="confirmCommand"
|
|
8300
8300
|
[command.escape]="cancelCommand"
|
|
8301
8301
|
[options]="options"
|
|
@@ -8312,8 +8312,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
8312
8312
|
selector: 'aup-select-input-activity',
|
|
8313
8313
|
template: `
|
|
8314
8314
|
<aup-select-input [valueModel]="valueModel"
|
|
8315
|
-
[label]="
|
|
8316
|
-
[placeholder]="
|
|
8315
|
+
[label]="activityData.label"
|
|
8316
|
+
[placeholder]="activityData.placeholder"
|
|
8317
8317
|
[command.enter]="confirmCommand"
|
|
8318
8318
|
[command.escape]="cancelCommand"
|
|
8319
8319
|
[options]="options"
|