@coolon/angular-ui-powerups 16.1.0-alpha.283 → 16.1.0-alpha.285
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/assets/form.scss +17 -0
- package/assets/place.scss +7 -0
- package/esm2022/lib/components/forms/autocomplete-input/autocomplete-input.component.mjs +2 -2
- package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs +2 -2
- package/esm2022/lib/components/forms/number-input/number-input.component.mjs +2 -2
- package/esm2022/lib/components/forms/select-input/select-input.component.mjs +2 -2
- package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +44 -5
- package/fesm2022/coolon-angular-ui-powerups.mjs +50 -11
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +45 -1
- package/package.json +1 -1
package/assets/form.scss
CHANGED
|
@@ -123,6 +123,23 @@
|
|
|
123
123
|
> * {
|
|
124
124
|
overflow: hidden;
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
// A hint is supplementary text and must not decide how wide the control is. The band is a
|
|
128
|
+
// child of the field, so its max-content counted towards the field's, and in any
|
|
129
|
+
// content-sized track (a `justify-items: start` grid cell, an inline-block, a
|
|
130
|
+
// `flex: 0 0 auto` item) the field grew to seat the whole hint on one or two lines instead
|
|
131
|
+
// of staying at the width the control itself needs — a 212px select rendered 266px wide
|
|
132
|
+
// because of the sentence underneath it.
|
|
133
|
+
//
|
|
134
|
+
// width: 0 takes the band out of that intrinsic measurement; min-width: 100% then fills the
|
|
135
|
+
// field once its width is settled from the control alone. No circularity: the field never
|
|
136
|
+
// measures the band, so there is nothing for the band's own width to depend on.
|
|
137
|
+
//
|
|
138
|
+
// The hint still wraps — it always did — it just wraps to the control's width now rather
|
|
139
|
+
// than widening it. Errors sit in the same band and get the same treatment, which is the
|
|
140
|
+
// same argument: a long validation message should not resize the field it belongs to.
|
|
141
|
+
width: 0;
|
|
142
|
+
min-width: 100%;
|
|
126
143
|
}
|
|
127
144
|
|
|
128
145
|
// Material fades the subscript wrapper in via its own transitionMessages trigger, but only
|
package/assets/place.scss
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
@mixin apply-theme($color-config, $typography-config) {
|
|
5
5
|
|
|
6
|
+
// Tabbed place navigation: selected label and folder top line follow the app's primary colour.
|
|
7
|
+
// A preset, not the public token, so consumers can still override --aup-tab-nav-accent.
|
|
8
|
+
:root {
|
|
9
|
+
--aup-tab-nav-theme-accent: #{mat.get-color-from-palette(map.get($color-config, primary), 500)};
|
|
10
|
+
--aup-tab-nav-theme-accent-soft: #{mat.get-color-from-palette(map.get($color-config, primary), 50)};
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
//// Define a dark theme
|
|
7
14
|
//$dark-theme: mat.define-dark-theme((
|
|
8
15
|
// color: (
|
|
@@ -83,7 +83,7 @@ export class AutocompleteInputComponent extends AbstractValueInputComponent {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AutocompleteInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AutocompleteInputComponent, selector: "aup-autocomplete-input", inputs: { rawTextContent$: "rawTextContent$", options$: "options$", 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 [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i9.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AutocompleteInputComponent, selector: "aup-autocomplete-input", inputs: { rawTextContent$: "rawTextContent$", options$: "options$", 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 [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i9.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
87
87
|
}
|
|
88
88
|
__decorate([
|
|
89
89
|
Proxify(),
|
|
@@ -99,7 +99,7 @@ __decorate([
|
|
|
99
99
|
], AutocompleteInputComponent.prototype, "options", null);
|
|
100
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AutocompleteInputComponent, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
|
-
args: [{ selector: 'aup-autocomplete-input', template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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"] }]
|
|
102
|
+
args: [{ selector: 'aup-autocomplete-input', template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}\n"] }]
|
|
103
103
|
}], ctorParameters: function () { return []; }, propDecorators: { rawTextContent$: [{
|
|
104
104
|
type: Input
|
|
105
105
|
}], options$: [{
|
package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs
CHANGED
|
@@ -55,7 +55,7 @@ export class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
55
55
|
})).writeRight();
|
|
56
56
|
}
|
|
57
57
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: MultipleSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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\">{{optionLabelFormat(item)}}</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:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
58
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: MultipleSelectInputComponent, selector: "aup-multiple-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", optionLabelFormat: "optionLabelFormat" }, queries: [{ propertyName: "optionTemplateRef", first: true, predicate: ["optionTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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\">{{optionLabelFormat(item)}}</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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
59
59
|
}
|
|
60
60
|
__decorate([
|
|
61
61
|
Proxify(),
|
|
@@ -67,7 +67,7 @@ __decorate([
|
|
|
67
67
|
], MultipleSelectInputComponent.prototype, "options", null);
|
|
68
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: MultipleSelectInputComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
70
|
-
args: [{ selector: 'aup-multiple-select-input', template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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\">{{optionLabelFormat(item)}}</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:30px}\n"] }]
|
|
70
|
+
args: [{ selector: 'aup-multiple-select-input', template: "<mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [ngModel]=\"componentList$.value\"\n (ngModelChange)=\"selectAll($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of options$.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=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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\">{{optionLabelFormat(item)}}</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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:30px}\n"] }]
|
|
71
71
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
72
72
|
type: Input
|
|
73
73
|
}], options: [{
|
|
@@ -171,7 +171,7 @@ export class NumberInputComponent extends AbstractValueInputComponent {
|
|
|
171
171
|
this.componentValue$.value = value;
|
|
172
172
|
}
|
|
173
173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: NumberInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
174
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: NumberInputComponent, selector: "aup-number-input", inputs: { autocomplete: "autocomplete", min$: "min$", min: "min", max$: "max$", max: "max", significantDigits$: "significantDigits$", significantDigits: "significantDigits", density: "density" }, host: { properties: { "class.touch": "this.touchDensity", "class.aup-steppers-disabled": "this.steppersDisabled", "class.aup-steppers-error": "this.steppersInError" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"stepped-field\">\n <!-- Each density emits the buttons in the order the eye reads them: desktop field \u2192 increment\n (top) \u2192 decrement (bottom), touch decrement \u2192 field \u2192 increment. That started out as a Tab\n fix and the buttons have since left the tab order, but DOM order still wants to match visual\n order \u2014 it is the reading order anyone gets who unhides them, and a CSS-only reorder would\n leave the two permanently disagreeing. -->\n <ng-container *ngIf=\"touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <!-- role is the implicit one for type=number, but stating it is not redundant in practice:\n Chrome's accessibility tree reports a bare number input as a textbox and only reports\n spinbutton once the role is spelled out. aria-valuenow/min/max are deliberately absent \u2014\n the native value, min and max already surface through, and a hand-synced mirror of them\n would be one more thing to get wrong. -->\n <input type=\"number\"\n role=\"spinbutton\"\n matInput\n (keydown)=\"onKeyDown($event)\"\n (wheel)=\"onWheel($event)\"\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\n </mat-form-field>\n\n <!-- Desktop's two buttons share this box: one outline, one divider between them. Touch dissolves\n it with `display: contents` and gives each button its own box, so it holds increment alone. -->\n <section class=\"steppers\" data-cy=\"steppers\">\n <ng-container [ngTemplateOutlet]=\"incrementStepper\"></ng-container>\n <ng-container *ngIf=\"!touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n </section>\n\n</div>\n\n<!-- Floors the control's width at the label's, the same trick aup-select-input uses for its options.\n Zero height and visibility:hidden, so it costs nothing but width.\n\n A SIBLING of .stepped-field, never a child: inside the flex row it becomes a third item and adds\n its width to the field's instead of setting a floor under it \u2014 the control came out ~170px too\n wide and the label fitted only by accident.\n\n It reserves the steppers' span because the row hands them their width before the field sees any,\n so a floor that only covered the label would still leave the field short of it.\n\n Inert wherever there is no label to measure, which includes every table cell editor: those are\n built without one, so the *ngIf leaves the strut empty and it contributes nothing. -->\n<div class=\"width-strut\" aria-hidden=\"true\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n</div>\n\n<ng-template #incrementStepper>\n <button type=\"button\"\n class=\"stepper increment\"\n data-cy=\"increment\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"incrementCommand\">+</button>\n</ng-template>\n\n<ng-template #decrementStepper>\n <button type=\"button\"\n class=\"stepper decrement\"\n data-cy=\"decrement\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"decrementCommand\">−</button>\n</ng-template>\n", styles: [":host{--stepper-width: 32px;--stepper-span: var(--stepper-width);--stepper-height: 44px;--stepper-outline: var(--mdc-outlined-text-field-outline-color, #dadce0);--stepper-radius: 4px;--stepper-glyph: #5f6368;--stepper-glyph-size: 15px;--stepper-glyph-disabled: #bdc1c6;--stepper-hover: #f1f3f4;--stepper-pressed: #e8eaed}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host .stepped-field{display:flex;flex-direction:row;align-items:flex-start}:host mat-form-field{flex:1 1 auto;min-width:0}:host section.steppers{flex:0 0 auto;display:flex;flex-direction:column;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline);border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0;overflow:hidden}:host button.stepper{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background-color:transparent;cursor:pointer;color:var(--stepper-glyph);font-size:var(--stepper-glyph-size);line-height:1}:host button.stepper:hover:not([disabled]){background-color:var(--stepper-hover)}:host button.stepper:active:not([disabled]){background-color:var(--stepper-pressed)}:host button.stepper[disabled]{color:var(--stepper-glyph-disabled);cursor:default;pointer-events:none}:host button.stepper:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host .stepper+.stepper{border-top:1px solid var(--stepper-outline)}:host ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0;border-bottom-right-radius:0}:host .width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:0;padding-right:calc(var(--stepper-span) + 35px)}:host .width-strut mat-label{font-size:75%}:host .width-strut>.item{font-size:16px;padding-left:0}:host .width-strut mat-label{font-size:calc(var(--mdc-outlined-text-field-label-text-size, 16px) * .75);font-family:var(--mdc-outlined-text-field-label-text-font, inherit);font-weight:var(--mdc-outlined-text-field-label-text-weight, inherit);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, normal)}:host ::ng-deep .mdc-notched-outline .mdc-floating-label--float-above{text-overflow:ellipsis}:host ::ng-deep .mdc-floating-label{text-overflow:ellipsis}:host-context(.aup-cell-renderer) .width-strut{display:none}:host(.dense){--stepper-height: 37px;--stepper-glyph-size: 14px}:host(.touch){--stepper-width: var(--stepper-height);--stepper-span: calc(var(--stepper-height) * 2);--stepper-glyph-size: 22px;--mat-form-field-container-text-size: 18px}:host(.touch) section.steppers{display:contents}:host(.touch) button.stepper{flex:0 0 auto;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline)}:host(.touch) button.stepper.decrement{border-right:none;border-radius:var(--stepper-radius) 0 0 var(--stepper-radius)}:host(.touch) button.stepper.increment{border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0}:host(.touch) ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-bottom-left-radius:0}:host:has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-hover-outline-color, rgba(0, 0, 0, .87))}:host:has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host:has(.mdc-text-field--focused) section.steppers{border-width:2px}:host(.touch):has(.mdc-text-field--focused) button.stepper{border-width:2px}:host(.aup-steppers-error){--stepper-outline: var(--mdc-outlined-text-field-error-outline-color, #f44336)}:host(.aup-steppers-error):has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-error-hover-outline-color, #f44336)}:host(.aup-steppers-error):has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-error-focus-outline-color, #f44336)}:host(.aup-steppers-disabled){--stepper-outline: var(--mdc-outlined-text-field-disabled-outline-color, rgba(0, 0, 0, .06))}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i6.CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: NumberInputComponent, selector: "aup-number-input", inputs: { autocomplete: "autocomplete", min$: "min$", min: "min", max$: "max$", max: "max", significantDigits$: "significantDigits$", significantDigits: "significantDigits", density: "density" }, host: { properties: { "class.touch": "this.touchDensity", "class.aup-steppers-disabled": "this.steppersDisabled", "class.aup-steppers-error": "this.steppersInError" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"stepped-field\">\n <!-- Each density emits the buttons in the order the eye reads them: desktop field \u2192 increment\n (top) \u2192 decrement (bottom), touch decrement \u2192 field \u2192 increment. That started out as a Tab\n fix and the buttons have since left the tab order, but DOM order still wants to match visual\n order \u2014 it is the reading order anyone gets who unhides them, and a CSS-only reorder would\n leave the two permanently disagreeing. -->\n <ng-container *ngIf=\"touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <!-- role is the implicit one for type=number, but stating it is not redundant in practice:\n Chrome's accessibility tree reports a bare number input as a textbox and only reports\n spinbutton once the role is spelled out. aria-valuenow/min/max are deliberately absent \u2014\n the native value, min and max already surface through, and a hand-synced mirror of them\n would be one more thing to get wrong. -->\n <input type=\"number\"\n role=\"spinbutton\"\n matInput\n (keydown)=\"onKeyDown($event)\"\n (wheel)=\"onWheel($event)\"\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\n </mat-form-field>\n\n <!-- Desktop's two buttons share this box: one outline, one divider between them. Touch dissolves\n it with `display: contents` and gives each button its own box, so it holds increment alone. -->\n <section class=\"steppers\" data-cy=\"steppers\">\n <ng-container [ngTemplateOutlet]=\"incrementStepper\"></ng-container>\n <ng-container *ngIf=\"!touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n </section>\n\n</div>\n\n<!-- Floors the control's width at the label's, the same trick aup-select-input uses for its options.\n Zero height and visibility:hidden, so it costs nothing but width.\n\n A SIBLING of .stepped-field, never a child: inside the flex row it becomes a third item and adds\n its width to the field's instead of setting a floor under it \u2014 the control came out ~170px too\n wide and the label fitted only by accident.\n\n It reserves the steppers' span because the row hands them their width before the field sees any,\n so a floor that only covered the label would still leave the field short of it.\n\n Inert wherever there is no label to measure, which includes every table cell editor: those are\n built without one, so the *ngIf leaves the strut empty and it contributes nothing. -->\n<div class=\"width-strut\" aria-hidden=\"true\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n</div>\n\n<ng-template #incrementStepper>\n <button type=\"button\"\n class=\"stepper increment\"\n data-cy=\"increment\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"incrementCommand\">+</button>\n</ng-template>\n\n<ng-template #decrementStepper>\n <button type=\"button\"\n class=\"stepper decrement\"\n data-cy=\"decrement\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"decrementCommand\">−</button>\n</ng-template>\n", styles: [":host{--stepper-width: 32px;--stepper-span: var(--stepper-width);--stepper-height: 44px;--stepper-outline: var(--mdc-outlined-text-field-outline-color, #dadce0);--stepper-radius: 4px;--stepper-glyph: #5f6368;--stepper-glyph-size: 15px;--stepper-glyph-disabled: #bdc1c6;--stepper-hover: #f1f3f4;--stepper-pressed: #e8eaed}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host .stepped-field{display:flex;flex-direction:row;align-items:flex-start}:host mat-form-field{flex:1 1 auto;min-width:0}:host section.steppers{flex:0 0 auto;display:flex;flex-direction:column;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline);border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0;overflow:hidden}:host button.stepper{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background-color:transparent;cursor:pointer;color:var(--stepper-glyph);font-size:var(--stepper-glyph-size);line-height:1}:host button.stepper:hover:not([disabled]){background-color:var(--stepper-hover)}:host button.stepper:active:not([disabled]){background-color:var(--stepper-pressed)}:host button.stepper[disabled]{color:var(--stepper-glyph-disabled);cursor:default;pointer-events:none}:host button.stepper:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host .stepper+.stepper{border-top:1px solid var(--stepper-outline)}:host ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0;border-bottom-right-radius:0}:host .width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:0;white-space:nowrap;padding-right:calc(var(--stepper-span) + 35px)}:host .width-strut mat-label{font-size:75%}:host .width-strut>.item{font-size:16px;padding-left:0}:host .width-strut mat-label{font-size:calc(var(--mdc-outlined-text-field-label-text-size, 16px) * .75);font-family:var(--mdc-outlined-text-field-label-text-font, inherit);font-weight:var(--mdc-outlined-text-field-label-text-weight, inherit);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, normal)}:host ::ng-deep .mdc-notched-outline .mdc-floating-label--float-above{text-overflow:ellipsis}:host ::ng-deep .mdc-floating-label{text-overflow:ellipsis}:host-context(.aup-cell-renderer) .width-strut{display:none}:host(.dense){--stepper-height: 37px;--stepper-glyph-size: 14px}:host(.touch){--stepper-width: var(--stepper-height);--stepper-span: calc(var(--stepper-height) * 2);--stepper-glyph-size: 22px;--mat-form-field-container-text-size: 18px}:host(.touch) section.steppers{display:contents}:host(.touch) button.stepper{flex:0 0 auto;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline)}:host(.touch) button.stepper.decrement{border-right:none;border-radius:var(--stepper-radius) 0 0 var(--stepper-radius)}:host(.touch) button.stepper.increment{border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0}:host(.touch) ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-bottom-left-radius:0}:host:has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-hover-outline-color, rgba(0, 0, 0, .87))}:host:has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host:has(.mdc-text-field--focused) section.steppers{border-width:2px}:host(.touch):has(.mdc-text-field--focused) button.stepper{border-width:2px}:host(.aup-steppers-error){--stepper-outline: var(--mdc-outlined-text-field-error-outline-color, #f44336)}:host(.aup-steppers-error):has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-error-hover-outline-color, #f44336)}:host(.aup-steppers-error):has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-error-focus-outline-color, #f44336)}:host(.aup-steppers-disabled){--stepper-outline: var(--mdc-outlined-text-field-disabled-outline-color, rgba(0, 0, 0, .06))}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i6.CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: i8.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
175
175
|
}
|
|
176
176
|
__decorate([
|
|
177
177
|
Proxify(),
|
|
@@ -199,7 +199,7 @@ __decorate([
|
|
|
199
199
|
], NumberInputComponent.prototype, "significantDigits", null);
|
|
200
200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: NumberInputComponent, decorators: [{
|
|
201
201
|
type: Component,
|
|
202
|
-
args: [{ selector: 'aup-number-input', template: "<div class=\"stepped-field\">\n <!-- Each density emits the buttons in the order the eye reads them: desktop field \u2192 increment\n (top) \u2192 decrement (bottom), touch decrement \u2192 field \u2192 increment. That started out as a Tab\n fix and the buttons have since left the tab order, but DOM order still wants to match visual\n order \u2014 it is the reading order anyone gets who unhides them, and a CSS-only reorder would\n leave the two permanently disagreeing. -->\n <ng-container *ngIf=\"touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <!-- role is the implicit one for type=number, but stating it is not redundant in practice:\n Chrome's accessibility tree reports a bare number input as a textbox and only reports\n spinbutton once the role is spelled out. aria-valuenow/min/max are deliberately absent \u2014\n the native value, min and max already surface through, and a hand-synced mirror of them\n would be one more thing to get wrong. -->\n <input type=\"number\"\n role=\"spinbutton\"\n matInput\n (keydown)=\"onKeyDown($event)\"\n (wheel)=\"onWheel($event)\"\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\n </mat-form-field>\n\n <!-- Desktop's two buttons share this box: one outline, one divider between them. Touch dissolves\n it with `display: contents` and gives each button its own box, so it holds increment alone. -->\n <section class=\"steppers\" data-cy=\"steppers\">\n <ng-container [ngTemplateOutlet]=\"incrementStepper\"></ng-container>\n <ng-container *ngIf=\"!touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n </section>\n\n</div>\n\n<!-- Floors the control's width at the label's, the same trick aup-select-input uses for its options.\n Zero height and visibility:hidden, so it costs nothing but width.\n\n A SIBLING of .stepped-field, never a child: inside the flex row it becomes a third item and adds\n its width to the field's instead of setting a floor under it \u2014 the control came out ~170px too\n wide and the label fitted only by accident.\n\n It reserves the steppers' span because the row hands them their width before the field sees any,\n so a floor that only covered the label would still leave the field short of it.\n\n Inert wherever there is no label to measure, which includes every table cell editor: those are\n built without one, so the *ngIf leaves the strut empty and it contributes nothing. -->\n<div class=\"width-strut\" aria-hidden=\"true\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n</div>\n\n<ng-template #incrementStepper>\n <button type=\"button\"\n class=\"stepper increment\"\n data-cy=\"increment\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"incrementCommand\">+</button>\n</ng-template>\n\n<ng-template #decrementStepper>\n <button type=\"button\"\n class=\"stepper decrement\"\n data-cy=\"decrement\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"decrementCommand\">−</button>\n</ng-template>\n", styles: [":host{--stepper-width: 32px;--stepper-span: var(--stepper-width);--stepper-height: 44px;--stepper-outline: var(--mdc-outlined-text-field-outline-color, #dadce0);--stepper-radius: 4px;--stepper-glyph: #5f6368;--stepper-glyph-size: 15px;--stepper-glyph-disabled: #bdc1c6;--stepper-hover: #f1f3f4;--stepper-pressed: #e8eaed}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host .stepped-field{display:flex;flex-direction:row;align-items:flex-start}:host mat-form-field{flex:1 1 auto;min-width:0}:host section.steppers{flex:0 0 auto;display:flex;flex-direction:column;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline);border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0;overflow:hidden}:host button.stepper{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background-color:transparent;cursor:pointer;color:var(--stepper-glyph);font-size:var(--stepper-glyph-size);line-height:1}:host button.stepper:hover:not([disabled]){background-color:var(--stepper-hover)}:host button.stepper:active:not([disabled]){background-color:var(--stepper-pressed)}:host button.stepper[disabled]{color:var(--stepper-glyph-disabled);cursor:default;pointer-events:none}:host button.stepper:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host .stepper+.stepper{border-top:1px solid var(--stepper-outline)}:host ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0;border-bottom-right-radius:0}:host .width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:0;padding-right:calc(var(--stepper-span) + 35px)}:host .width-strut mat-label{font-size:75%}:host .width-strut>.item{font-size:16px;padding-left:0}:host .width-strut mat-label{font-size:calc(var(--mdc-outlined-text-field-label-text-size, 16px) * .75);font-family:var(--mdc-outlined-text-field-label-text-font, inherit);font-weight:var(--mdc-outlined-text-field-label-text-weight, inherit);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, normal)}:host ::ng-deep .mdc-notched-outline .mdc-floating-label--float-above{text-overflow:ellipsis}:host ::ng-deep .mdc-floating-label{text-overflow:ellipsis}:host-context(.aup-cell-renderer) .width-strut{display:none}:host(.dense){--stepper-height: 37px;--stepper-glyph-size: 14px}:host(.touch){--stepper-width: var(--stepper-height);--stepper-span: calc(var(--stepper-height) * 2);--stepper-glyph-size: 22px;--mat-form-field-container-text-size: 18px}:host(.touch) section.steppers{display:contents}:host(.touch) button.stepper{flex:0 0 auto;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline)}:host(.touch) button.stepper.decrement{border-right:none;border-radius:var(--stepper-radius) 0 0 var(--stepper-radius)}:host(.touch) button.stepper.increment{border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0}:host(.touch) ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-bottom-left-radius:0}:host:has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-hover-outline-color, rgba(0, 0, 0, .87))}:host:has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host:has(.mdc-text-field--focused) section.steppers{border-width:2px}:host(.touch):has(.mdc-text-field--focused) button.stepper{border-width:2px}:host(.aup-steppers-error){--stepper-outline: var(--mdc-outlined-text-field-error-outline-color, #f44336)}:host(.aup-steppers-error):has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-error-hover-outline-color, #f44336)}:host(.aup-steppers-error):has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-error-focus-outline-color, #f44336)}:host(.aup-steppers-disabled){--stepper-outline: var(--mdc-outlined-text-field-disabled-outline-color, rgba(0, 0, 0, .06))}\n"] }]
|
|
202
|
+
args: [{ selector: 'aup-number-input', template: "<div class=\"stepped-field\">\n <!-- Each density emits the buttons in the order the eye reads them: desktop field \u2192 increment\n (top) \u2192 decrement (bottom), touch decrement \u2192 field \u2192 increment. That started out as a Tab\n fix and the buttons have since left the tab order, but DOM order still wants to match visual\n order \u2014 it is the reading order anyone gets who unhides them, and a CSS-only reorder would\n leave the two permanently disagreeing. -->\n <ng-container *ngIf=\"touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <!-- role is the implicit one for type=number, but stating it is not redundant in practice:\n Chrome's accessibility tree reports a bare number input as a textbox and only reports\n spinbutton once the role is spelled out. aria-valuenow/min/max are deliberately absent \u2014\n the native value, min and max already surface through, and a hand-synced mirror of them\n would be one more thing to get wrong. -->\n <input type=\"number\"\n role=\"spinbutton\"\n matInput\n (keydown)=\"onKeyDown($event)\"\n (wheel)=\"onWheel($event)\"\n placeholder=\"{{placeholder}}\"\n [attr.autocomplete]=\"autocomplete\"\n [ngModel]=\"displayValue$.value\"\n (ngModelChange)=\"onValueChange($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n [size]=\"4\"\n [step]=\"step$.value\"\n >\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\n </mat-form-field>\n\n <!-- Desktop's two buttons share this box: one outline, one divider between them. Touch dissolves\n it with `display: contents` and gives each button its own box, so it holds increment alone. -->\n <section class=\"steppers\" data-cy=\"steppers\">\n <ng-container [ngTemplateOutlet]=\"incrementStepper\"></ng-container>\n <ng-container *ngIf=\"!touchDensity\" [ngTemplateOutlet]=\"decrementStepper\"></ng-container>\n </section>\n\n</div>\n\n<!-- Floors the control's width at the label's, the same trick aup-select-input uses for its options.\n Zero height and visibility:hidden, so it costs nothing but width.\n\n A SIBLING of .stepped-field, never a child: inside the flex row it becomes a third item and adds\n its width to the field's instead of setting a floor under it \u2014 the control came out ~170px too\n wide and the label fitted only by accident.\n\n It reserves the steppers' span because the row hands them their width before the field sees any,\n so a floor that only covered the label would still leave the field short of it.\n\n Inert wherever there is no label to measure, which includes every table cell editor: those are\n built without one, so the *ngIf leaves the strut empty and it contributes nothing. -->\n<div class=\"width-strut\" aria-hidden=\"true\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n</div>\n\n<ng-template #incrementStepper>\n <button type=\"button\"\n class=\"stepper increment\"\n data-cy=\"increment\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"incrementCommand\">+</button>\n</ng-template>\n\n<ng-template #decrementStepper>\n <button type=\"button\"\n class=\"stepper decrement\"\n data-cy=\"decrement\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n (mousedown)=\"onStepperPress($event)\"\n [pectinCommand]=\"decrementCommand\">−</button>\n</ng-template>\n", styles: [":host{--stepper-width: 32px;--stepper-span: var(--stepper-width);--stepper-height: 44px;--stepper-outline: var(--mdc-outlined-text-field-outline-color, #dadce0);--stepper-radius: 4px;--stepper-glyph: #5f6368;--stepper-glyph-size: 15px;--stepper-glyph-disabled: #bdc1c6;--stepper-hover: #f1f3f4;--stepper-pressed: #e8eaed}:host input[type=number]{appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}:host .stepped-field{display:flex;flex-direction:row;align-items:flex-start}:host mat-form-field{flex:1 1 auto;min-width:0}:host section.steppers{flex:0 0 auto;display:flex;flex-direction:column;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline);border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0;overflow:hidden}:host button.stepper{flex:1;display:flex;align-items:center;justify-content:center;padding:0;border:none;background-color:transparent;cursor:pointer;color:var(--stepper-glyph);font-size:var(--stepper-glyph-size);line-height:1}:host button.stepper:hover:not([disabled]){background-color:var(--stepper-hover)}:host button.stepper:active:not([disabled]){background-color:var(--stepper-pressed)}:host button.stepper[disabled]{color:var(--stepper-glyph-disabled);cursor:default;pointer-events:none}:host button.stepper:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host .stepper+.stepper{border-top:1px solid var(--stepper-outline)}:host ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0;border-bottom-right-radius:0}:host .width-strut{display:block;height:0;max-height:0;width:auto;visibility:hidden;overflow:hidden;padding-right:0;white-space:nowrap;padding-right:calc(var(--stepper-span) + 35px)}:host .width-strut mat-label{font-size:75%}:host .width-strut>.item{font-size:16px;padding-left:0}:host .width-strut mat-label{font-size:calc(var(--mdc-outlined-text-field-label-text-size, 16px) * .75);font-family:var(--mdc-outlined-text-field-label-text-font, inherit);font-weight:var(--mdc-outlined-text-field-label-text-weight, inherit);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, normal)}:host ::ng-deep .mdc-notched-outline .mdc-floating-label--float-above{text-overflow:ellipsis}:host ::ng-deep .mdc-floating-label{text-overflow:ellipsis}:host-context(.aup-cell-renderer) .width-strut{display:none}:host(.dense){--stepper-height: 37px;--stepper-glyph-size: 14px}:host(.touch){--stepper-width: var(--stepper-height);--stepper-span: calc(var(--stepper-height) * 2);--stepper-glyph-size: 22px;--mat-form-field-container-text-size: 18px}:host(.touch) section.steppers{display:contents}:host(.touch) button.stepper{flex:0 0 auto;box-sizing:border-box;width:var(--stepper-width);height:var(--stepper-height);border:1px solid var(--stepper-outline)}:host(.touch) button.stepper.decrement{border-right:none;border-radius:var(--stepper-radius) 0 0 var(--stepper-radius)}:host(.touch) button.stepper.increment{border-left:none;border-radius:0 var(--stepper-radius) var(--stepper-radius) 0}:host(.touch) ::ng-deep .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-bottom-left-radius:0}:host:has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-hover-outline-color, rgba(0, 0, 0, .87))}:host:has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-focus-outline-color, #3f51b5)}:host:has(.mdc-text-field--focused) section.steppers{border-width:2px}:host(.touch):has(.mdc-text-field--focused) button.stepper{border-width:2px}:host(.aup-steppers-error){--stepper-outline: var(--mdc-outlined-text-field-error-outline-color, #f44336)}:host(.aup-steppers-error):has(.mat-mdc-text-field-wrapper:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover){--stepper-outline: var(--mdc-outlined-text-field-error-hover-outline-color, #f44336)}:host(.aup-steppers-error):has(.mdc-text-field--focused){--stepper-outline: var(--mdc-outlined-text-field-error-focus-outline-color, #f44336)}:host(.aup-steppers-disabled){--stepper-outline: var(--mdc-outlined-text-field-disabled-outline-color, rgba(0, 0, 0, .06))}\n"] }]
|
|
203
203
|
}], ctorParameters: function () { return []; }, propDecorators: { autocomplete: [{
|
|
204
204
|
type: Input
|
|
205
205
|
}], min$: [{
|
|
@@ -335,7 +335,7 @@ export class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
338
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", allowNil$: "allowNil$", allowNil: "allowNil", appearance: "appearance", optionLabelFormat: "optionLabelFormat", searchable: "searchable", searchPlaceholder: "searchPlaceholder", noResultsText: "noResultsText", searchText$: "searchText$", optionSearchText: "optionSearchText", filterFactory: "filterFactory" }, host: { properties: { "class.appearance-button": "this.buttonAppearance" } }, 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 }], viewQueries: [{ propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "matSelect", first: true, predicate: MatSelect, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\nTwo shells, one select. The parts Angular resolves by DECLARATION - mat-select's content queries\nfor <mat-select-trigger> and <mat-option>, mat-form-field's for its control, and the element\ninjector mat-select reads MAT_FORM_FIELD from - do not follow an <ng-template> to where\nngTemplateOutlet inserts it, so the triggers, the nil row and the option list are declared in place\nin each shell. Only the pieces nothing queries are shared: the search box, the no-results row and\nthe footer projection. Keep the two <mat-select> blocks in step; the spec asserts both render the\nsame options and honour the same templates.\n-->\n\n<ng-template #searchBox>\n <div class=\"aup-select-search\" *ngIf=\"searchable\"\n (keydown)=\"onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\">\n <aup-icon class=\"aup-select-search__icon\" icon=\"mat:search\"></aup-icon>\n <!--\n Deliberately a bare input: matInput outside a mat-form-field is a MatFormFieldControl with no\n host, and aup-search-input drags in a whole form field (label slot, subscript row,\n .aup-input-component density) that has no business inside a dropdown panel.\n [value]/(input) rather than ngModel avoids a missing-name error inside a host <form>.\n -->\n <input #searchInput type=\"text\" class=\"aup-select-search__input\"\n data-cy=\"select-search\"\n autocomplete=\"off\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value || ''\"\n (input)=\"onSearchInput($event)\">\n <button type=\"button\" class=\"aup-select-search__clear\" tabindex=\"-1\"\n *ngIf=\"searchText$.value\" data-cy=\"select-search-clear\"\n (click)=\"clearSearch()\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #noResults>\n <!--\n A plain div, NOT a mat-option: a mat-option here would be selectable, and would keep\n MatSelect._canOpen() satisfied with a row that means \"nothing\".\n -->\n <div class=\"aup-select-search__no-results\" data-cy=\"select-no-results\"\n *ngIf=\"searchable && noMatches$.value\">{{noResultsText}}</div>\n</ng-template>\n\n<!-- Declared once so the projection has one home; stamped into whichever shell renders. -->\n<ng-template #footer>\n <ng-content select=\"[select-option-footer]\"></ng-content>\n</ng-template>\n\n<ng-container *ngIf=\"!buttonAppearance; else buttonShell\">\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"fieldPanelWidth\"\n >\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <!--\n Deliberately outside the filter: the nil option is a clear-the-selection affordance, not one of\n the data options, so it stays available while searching (and keeps MatSelect._canOpen() happy).\n -->\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"></ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #buttonShell>\n <!--\n The box is a WRAPPER around the select, not the select's own element, and it provides\n MAT_FORM_FIELD: mat-select anchors its panel to the form field's origin, and without one falls\n back to its inner trigger div - which sits inside the box's padding, so the panel would open a\n padding's width in from the box's edge. See SelectOverlayOriginDirective. No width strut: a\n button that stretches to its longest option is not a button; the panel, sized to content by the\n null panelWidth, carries the long text instead.\n -->\n <span class=\"aup-select-button\" aupSelectOverlayOrigin data-cy=\"select-button\">\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"null\"\n panelClass=\"aup-select-button-panel\"\n >\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n </span>\n</ng-template>\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}.aup-select-search{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;gap:4px;margin:-8px 0 4px;padding:8px 12px;background:var(--mat-select-panel-background-color, #fff);border-bottom:1px solid rgba(0,0,0,.12)}.aup-select-search .aup-select-search__input{flex:1 1 auto;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.aup-select-search .aup-select-search__clear{flex:0 0 auto;display:inline-flex;padding:0;border:none;background:transparent;cursor:pointer;color:inherit}.aup-select-search__no-results{padding:8px 16px;opacity:.6;font-style:italic}mat-option.aup-select-option--filtered{display:none}:host(.appearance-button){display:inline-flex}.aup-select-button{display:inline-flex;align-items:center;align-self:flex-start;box-sizing:border-box;min-width:10rem;height:36px;padding:0 12px;border:1px solid rgba(0,0,0,.24);border-radius:4px;background:var(--mat-select-panel-background-color, #fff);cursor:pointer}.aup-select-button:has(mat-select:focus-visible){outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}.aup-select-button:has(.mat-mdc-select-disabled){opacity:.5;cursor:default}.aup-select-button>mat-select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "directive", type: i8.SelectOverlayOriginDirective, selector: "[aupSelectOverlayOrigin]" }, { kind: "component", type: i9.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
338
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SelectInputComponent, selector: "aup-select-input", inputs: { options$: "options$", options: "options", optionLabel: "optionLabel", allowNil$: "allowNil$", allowNil: "allowNil", appearance: "appearance", optionLabelFormat: "optionLabelFormat", searchable: "searchable", searchPlaceholder: "searchPlaceholder", noResultsText: "noResultsText", searchText$: "searchText$", optionSearchText: "optionSearchText", filterFactory: "filterFactory" }, host: { properties: { "class.appearance-button": "this.buttonAppearance" } }, 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 }], viewQueries: [{ propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "matSelect", first: true, predicate: MatSelect, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\nTwo shells, one select. The parts Angular resolves by DECLARATION - mat-select's content queries\nfor <mat-select-trigger> and <mat-option>, mat-form-field's for its control, and the element\ninjector mat-select reads MAT_FORM_FIELD from - do not follow an <ng-template> to where\nngTemplateOutlet inserts it, so the triggers, the nil row and the option list are declared in place\nin each shell. Only the pieces nothing queries are shared: the search box, the no-results row and\nthe footer projection. Keep the two <mat-select> blocks in step; the spec asserts both render the\nsame options and honour the same templates.\n-->\n\n<ng-template #searchBox>\n <div class=\"aup-select-search\" *ngIf=\"searchable\"\n (keydown)=\"onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\">\n <aup-icon class=\"aup-select-search__icon\" icon=\"mat:search\"></aup-icon>\n <!--\n Deliberately a bare input: matInput outside a mat-form-field is a MatFormFieldControl with no\n host, and aup-search-input drags in a whole form field (label slot, subscript row,\n .aup-input-component density) that has no business inside a dropdown panel.\n [value]/(input) rather than ngModel avoids a missing-name error inside a host <form>.\n -->\n <input #searchInput type=\"text\" class=\"aup-select-search__input\"\n data-cy=\"select-search\"\n autocomplete=\"off\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value || ''\"\n (input)=\"onSearchInput($event)\">\n <button type=\"button\" class=\"aup-select-search__clear\" tabindex=\"-1\"\n *ngIf=\"searchText$.value\" data-cy=\"select-search-clear\"\n (click)=\"clearSearch()\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #noResults>\n <!--\n A plain div, NOT a mat-option: a mat-option here would be selectable, and would keep\n MatSelect._canOpen() satisfied with a row that means \"nothing\".\n -->\n <div class=\"aup-select-search__no-results\" data-cy=\"select-no-results\"\n *ngIf=\"searchable && noMatches$.value\">{{noResultsText}}</div>\n</ng-template>\n\n<!-- Declared once so the projection has one home; stamped into whichever shell renders. -->\n<ng-template #footer>\n <ng-content select=\"[select-option-footer]\"></ng-content>\n</ng-template>\n\n<ng-container *ngIf=\"!buttonAppearance; else buttonShell\">\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"fieldPanelWidth\"\n >\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <!--\n Deliberately outside the filter: the nil option is a clear-the-selection affordance, not one of\n the data options, so it stays available while searching (and keeps MatSelect._canOpen() happy).\n -->\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"></ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #buttonShell>\n <!--\n The box is a WRAPPER around the select, not the select's own element, and it provides\n MAT_FORM_FIELD: mat-select anchors its panel to the form field's origin, and without one falls\n back to its inner trigger div - which sits inside the box's padding, so the panel would open a\n padding's width in from the box's edge. See SelectOverlayOriginDirective. No width strut: a\n button that stretches to its longest option is not a button; the panel, sized to content by the\n null panelWidth, carries the long text instead.\n -->\n <span class=\"aup-select-button\" aupSelectOverlayOrigin data-cy=\"select-button\">\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"null\"\n panelClass=\"aup-select-button-panel\"\n >\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n </span>\n</ng-template>\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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}.aup-select-search{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;gap:4px;margin:-8px 0 4px;padding:8px 12px;background:var(--mat-select-panel-background-color, #fff);border-bottom:1px solid rgba(0,0,0,.12)}.aup-select-search .aup-select-search__input{flex:1 1 auto;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.aup-select-search .aup-select-search__clear{flex:0 0 auto;display:inline-flex;padding:0;border:none;background:transparent;cursor:pointer;color:inherit}.aup-select-search__no-results{padding:8px 16px;opacity:.6;font-style:italic}mat-option.aup-select-option--filtered{display:none}:host(.appearance-button){display:inline-flex}.aup-select-button{display:inline-flex;align-items:center;align-self:flex-start;box-sizing:border-box;min-width:10rem;height:36px;padding:0 12px;border:1px solid rgba(0,0,0,.24);border-radius:4px;background:var(--mat-select-panel-background-color, #fff);cursor:pointer}.aup-select-button:has(mat-select:focus-visible){outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}.aup-select-button:has(.mat-mdc-select-disabled){opacity:.5;cursor:default}.aup-select-button>mat-select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: i7.FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "directive", type: i8.SelectOverlayOriginDirective, selector: "[aupSelectOverlayOrigin]" }, { kind: "component", type: i9.IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
339
339
|
}
|
|
340
340
|
__decorate([
|
|
341
341
|
Proxify(),
|
|
@@ -359,7 +359,7 @@ __decorate([
|
|
|
359
359
|
], SelectInputComponent.prototype, "searchText$", null);
|
|
360
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
361
361
|
type: Component,
|
|
362
|
-
args: [{ selector: 'aup-select-input', template: "<!--\nTwo shells, one select. The parts Angular resolves by DECLARATION - mat-select's content queries\nfor <mat-select-trigger> and <mat-option>, mat-form-field's for its control, and the element\ninjector mat-select reads MAT_FORM_FIELD from - do not follow an <ng-template> to where\nngTemplateOutlet inserts it, so the triggers, the nil row and the option list are declared in place\nin each shell. Only the pieces nothing queries are shared: the search box, the no-results row and\nthe footer projection. Keep the two <mat-select> blocks in step; the spec asserts both render the\nsame options and honour the same templates.\n-->\n\n<ng-template #searchBox>\n <div class=\"aup-select-search\" *ngIf=\"searchable\"\n (keydown)=\"onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\">\n <aup-icon class=\"aup-select-search__icon\" icon=\"mat:search\"></aup-icon>\n <!--\n Deliberately a bare input: matInput outside a mat-form-field is a MatFormFieldControl with no\n host, and aup-search-input drags in a whole form field (label slot, subscript row,\n .aup-input-component density) that has no business inside a dropdown panel.\n [value]/(input) rather than ngModel avoids a missing-name error inside a host <form>.\n -->\n <input #searchInput type=\"text\" class=\"aup-select-search__input\"\n data-cy=\"select-search\"\n autocomplete=\"off\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value || ''\"\n (input)=\"onSearchInput($event)\">\n <button type=\"button\" class=\"aup-select-search__clear\" tabindex=\"-1\"\n *ngIf=\"searchText$.value\" data-cy=\"select-search-clear\"\n (click)=\"clearSearch()\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #noResults>\n <!--\n A plain div, NOT a mat-option: a mat-option here would be selectable, and would keep\n MatSelect._canOpen() satisfied with a row that means \"nothing\".\n -->\n <div class=\"aup-select-search__no-results\" data-cy=\"select-no-results\"\n *ngIf=\"searchable && noMatches$.value\">{{noResultsText}}</div>\n</ng-template>\n\n<!-- Declared once so the projection has one home; stamped into whichever shell renders. -->\n<ng-template #footer>\n <ng-content select=\"[select-option-footer]\"></ng-content>\n</ng-template>\n\n<ng-container *ngIf=\"!buttonAppearance; else buttonShell\">\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"fieldPanelWidth\"\n >\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <!--\n Deliberately outside the filter: the nil option is a clear-the-selection affordance, not one of\n the data options, so it stays available while searching (and keeps MatSelect._canOpen() happy).\n -->\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"></ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #buttonShell>\n <!--\n The box is a WRAPPER around the select, not the select's own element, and it provides\n MAT_FORM_FIELD: mat-select anchors its panel to the form field's origin, and without one falls\n back to its inner trigger div - which sits inside the box's padding, so the panel would open a\n padding's width in from the box's edge. See SelectOverlayOriginDirective. No width strut: a\n button that stretches to its longest option is not a button; the panel, sized to content by the\n null panelWidth, carries the long text instead.\n -->\n <span class=\"aup-select-button\" aupSelectOverlayOrigin data-cy=\"select-button\">\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"null\"\n panelClass=\"aup-select-button-panel\"\n >\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n </span>\n</ng-template>\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}.aup-select-search{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;gap:4px;margin:-8px 0 4px;padding:8px 12px;background:var(--mat-select-panel-background-color, #fff);border-bottom:1px solid rgba(0,0,0,.12)}.aup-select-search .aup-select-search__input{flex:1 1 auto;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.aup-select-search .aup-select-search__clear{flex:0 0 auto;display:inline-flex;padding:0;border:none;background:transparent;cursor:pointer;color:inherit}.aup-select-search__no-results{padding:8px 16px;opacity:.6;font-style:italic}mat-option.aup-select-option--filtered{display:none}:host(.appearance-button){display:inline-flex}.aup-select-button{display:inline-flex;align-items:center;align-self:flex-start;box-sizing:border-box;min-width:10rem;height:36px;padding:0 12px;border:1px solid rgba(0,0,0,.24);border-radius:4px;background:var(--mat-select-panel-background-color, #fff);cursor:pointer}.aup-select-button:has(mat-select:focus-visible){outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}.aup-select-button:has(.mat-mdc-select-disabled){opacity:.5;cursor:default}.aup-select-button>mat-select{width:100%}\n"] }]
|
|
362
|
+
args: [{ selector: 'aup-select-input', template: "<!--\nTwo shells, one select. The parts Angular resolves by DECLARATION - mat-select's content queries\nfor <mat-select-trigger> and <mat-option>, mat-form-field's for its control, and the element\ninjector mat-select reads MAT_FORM_FIELD from - do not follow an <ng-template> to where\nngTemplateOutlet inserts it, so the triggers, the nil row and the option list are declared in place\nin each shell. Only the pieces nothing queries are shared: the search box, the no-results row and\nthe footer projection. Keep the two <mat-select> blocks in step; the spec asserts both render the\nsame options and honour the same templates.\n-->\n\n<ng-template #searchBox>\n <div class=\"aup-select-search\" *ngIf=\"searchable\"\n (keydown)=\"onSearchKeydown($event)\"\n (click)=\"$event.stopPropagation()\">\n <aup-icon class=\"aup-select-search__icon\" icon=\"mat:search\"></aup-icon>\n <!--\n Deliberately a bare input: matInput outside a mat-form-field is a MatFormFieldControl with no\n host, and aup-search-input drags in a whole form field (label slot, subscript row,\n .aup-input-component density) that has no business inside a dropdown panel.\n [value]/(input) rather than ngModel avoids a missing-name error inside a host <form>.\n -->\n <input #searchInput type=\"text\" class=\"aup-select-search__input\"\n data-cy=\"select-search\"\n autocomplete=\"off\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value || ''\"\n (input)=\"onSearchInput($event)\">\n <button type=\"button\" class=\"aup-select-search__clear\" tabindex=\"-1\"\n *ngIf=\"searchText$.value\" data-cy=\"select-search-clear\"\n (click)=\"clearSearch()\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #noResults>\n <!--\n A plain div, NOT a mat-option: a mat-option here would be selectable, and would keep\n MatSelect._canOpen() satisfied with a row that means \"nothing\".\n -->\n <div class=\"aup-select-search__no-results\" data-cy=\"select-no-results\"\n *ngIf=\"searchable && noMatches$.value\">{{noResultsText}}</div>\n</ng-template>\n\n<!-- Declared once so the projection has one home; stamped into whichever shell renders. -->\n<ng-template #footer>\n <ng-content select=\"[select-option-footer]\"></ng-content>\n</ng-template>\n\n<ng-container *ngIf=\"!buttonAppearance; else buttonShell\">\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"fieldPanelWidth\"\n >\n <!--\n TODO: dave has a scenario where the selected item isn't rendering that I can't reproduce so we explicity render it..\n It typically happens because the ngModel value isn't the one contained in the list - this means our source model\n identifyOf function has changed and our id$/lookup$/componentValue$ are out of sync.\n We get around this for now by explicity rendering the component value.\n Please Note: I haven't been able to reproduce this\n -->\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <!--\n Deliberately outside the filter: the nil option is a clear-the-selection affordance, not one of\n the data options, so it stays available while searching (and keeps MatSelect._canOpen() happy).\n -->\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n <span matSuffix class=\"aup-validation-icon\" *ngIf=\"popupMessage\">\n <aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon>\n </span>\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 cookedOptions$.value\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(item)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: 0 }\"></ng-container>\n </div>\n </div>\n</ng-container>\n\n<ng-template #buttonShell>\n <!--\n The box is a WRAPPER around the select, not the select's own element, and it provides\n MAT_FORM_FIELD: mat-select anchors its panel to the form field's origin, and without one falls\n back to its inner trigger div - which sits inside the box's padding, so the panel would open a\n padding's width in from the box's edge. See SelectOverlayOriginDirective. No width strut: a\n button that stretches to its longest option is not a button; the panel, sized to content by the\n null panelWidth, carries the long text instead.\n -->\n <span class=\"aup-select-button\" aupSelectOverlayOrigin data-cy=\"select-button\">\n <mat-select placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValue$.value\"\n (ngModelChange)=\"select($event)\"\n [disabled]=\"!enabled$.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [panelWidth]=\"null\"\n panelClass=\"aup-select-button-panel\"\n >\n <mat-select-trigger *ngIf=\"!selectedOptionTemplateRef\">\n {{optionLabelFormat(componentValue$.value)}}\n </mat-select-trigger>\n <mat-select-trigger *ngIf=\"selectedOptionTemplateRef\">\n <ng-container [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </mat-select-trigger>\n\n <ng-container [ngTemplateOutlet]=\"searchBox\"></ng-container>\n\n <mat-option *ngIf=\"allowNil$.value\">\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 panelOptions$.value; trackBy: trackByIdentity;let i = index\"\n [value]=\"option\"\n [disabled]=\"isHiddenOption(option)\"\n [class.aup-select-option--filtered]=\"isHiddenOption(option)\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"></ng-container>\n </mat-option>\n <ng-container [ngTemplateOutlet]=\"noResults\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </mat-select>\n </span>\n</ng-template>\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;white-space:nowrap}.width-strut mat-label{font-size:75%}.width-strut>.item{font-size:16px;padding-left:0}.aup-select-search{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;gap:4px;margin:-8px 0 4px;padding:8px 12px;background:var(--mat-select-panel-background-color, #fff);border-bottom:1px solid rgba(0,0,0,.12)}.aup-select-search .aup-select-search__input{flex:1 1 auto;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.aup-select-search .aup-select-search__clear{flex:0 0 auto;display:inline-flex;padding:0;border:none;background:transparent;cursor:pointer;color:inherit}.aup-select-search__no-results{padding:8px 16px;opacity:.6;font-style:italic}mat-option.aup-select-option--filtered{display:none}:host(.appearance-button){display:inline-flex}.aup-select-button{display:inline-flex;align-items:center;align-self:flex-start;box-sizing:border-box;min-width:10rem;height:36px;padding:0 12px;border:1px solid rgba(0,0,0,.24);border-radius:4px;background:var(--mat-select-panel-background-color, #fff);cursor:pointer}.aup-select-button:has(mat-select:focus-visible){outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}.aup-select-button:has(.mat-mdc-select-disabled){opacity:.5;cursor:default}.aup-select-button>mat-select{width:100%}\n"] }]
|
|
363
363
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
364
364
|
type: Input
|
|
365
365
|
}], options: [{
|