@coolon/angular-ui-powerups 16.1.0-alpha.320 → 16.1.0-alpha.322
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/esm2022/lib/components/exports.mjs +2 -1
- package/esm2022/lib/components/forms/select-input/select-input.component.mjs +132 -14
- package/esm2022/lib/components/forms/select-input/select-option-list.mjs +17 -0
- package/esm2022/lib/components/tables/table/table.component.mjs +24 -4
- package/esm2022/lib/interaction/abstract-interaction-context.mjs +3 -1
- package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
- package/esm2022/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +16 -2
- package/esm2022/lib/interaction/components/input-activities/option-list-activity/activity-select-option-list.mjs +63 -0
- package/esm2022/lib/interaction/components/input-activities/option-list-activity/option-list-activity.mjs +175 -0
- package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +1 -1
- package/esm2022/lib/interaction/components/popup-interaction-context/popup-activity.mjs +54 -0
- package/esm2022/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.mjs +9 -48
- package/esm2022/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.mjs +16 -2
- package/esm2022/lib/interaction/delegating-interaction-context.mjs +63 -0
- package/esm2022/lib/interaction/exports.mjs +5 -1
- package/esm2022/lib/interaction/interaction-context.mjs +1 -1
- package/esm2022/lib/interaction/interaction.module.mjs +16 -3
- package/esm2022/lib/interaction/services/hosted-interaction-context.mjs +2 -1
- package/esm2022/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context.mjs +3 -1
- package/fesm2022/coolon-angular-ui-powerups.mjs +558 -70
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/exports.d.ts +1 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +51 -3
- package/lib/components/forms/select-input/select-option-list.d.ts +69 -0
- package/lib/components/tables/table/table.component.d.ts +16 -1
- package/lib/interaction/abstract-interaction-context.d.ts +2 -0
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +5 -1
- package/lib/interaction/components/input-activities/option-list-activity/activity-select-option-list.d.ts +21 -0
- package/lib/interaction/components/input-activities/option-list-activity/option-list-activity.d.ts +74 -0
- package/lib/interaction/components/popup-interaction-context/popup-activity.d.ts +29 -0
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +0 -3
- package/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.d.ts +5 -1
- package/lib/interaction/delegating-interaction-context.d.ts +34 -0
- package/lib/interaction/exports.d.ts +4 -0
- package/lib/interaction/interaction-context.d.ts +9 -0
- package/lib/interaction/interaction.module.d.ts +32 -30
- package/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context.d.ts +3 -0
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { ObserversModule } from '@angular/cdk/observers';
|
|
|
2
2
|
import * as i1$1 from '@angular/common';
|
|
3
3
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, ViewContainerRef, Directive, ElementRef, Inject, Host, Optional, Input, HostListener, InjectionToken, ChangeDetectorRef, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, ViewChildren, EventEmitter, Output, Self, forwardRef, isDevMode, ContentChildren, ComponentRef,
|
|
5
|
+
import { inject, ViewContainerRef, Directive, ElementRef, Inject, Host, Optional, Input, HostListener, InjectionToken, ChangeDetectorRef, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, ViewChildren, EventEmitter, Output, Self, forwardRef, Injector, isDevMode, ContentChildren, ComponentRef, PLATFORM_ID, SkipSelf, runInInjectionContext, ErrorHandler, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
6
6
|
import * as i2$5 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i4 from '@angular/material/form-field';
|
|
9
9
|
import { MatFormFieldModule, MAT_FORM_FIELD } from '@angular/material/form-field';
|
|
10
10
|
import * as i3$1 from '@angular/material/input';
|
|
11
11
|
import { MatInputModule, MatInput } from '@angular/material/input';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i5$1 from '@angular/material/select';
|
|
13
13
|
import { MatSelectModule, MAT_SELECT_CONFIG, MatSelect } from '@angular/material/select';
|
|
14
14
|
import * as i3$2 from '@angular/material/tabs';
|
|
15
15
|
import { MatTabsModule, MAT_TABS_CONFIG } from '@angular/material/tabs';
|
|
@@ -40,10 +40,10 @@ import * as i2$9 from '@angular/material/table';
|
|
|
40
40
|
import { MatTableModule } from '@angular/material/table';
|
|
41
41
|
import * as i3 from '@angular/material/tooltip';
|
|
42
42
|
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
43
|
-
import * as i4$
|
|
43
|
+
import * as i4$1 from 'ng-table-virtual-scroll';
|
|
44
44
|
import { TableVirtualScrollDataSource, TableVirtualScrollModule } from 'ng-table-virtual-scroll';
|
|
45
45
|
import * as i1$3 from '@coolon/pectin';
|
|
46
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, proxify, ValueModel, Proxify, Logger, StoreInValueModel, Command, MutableListModel, StoreInListModel, ListModel, Disposable, Trace, DelegatingListModel, MutableValueModel, DelegateToValueModel, FocusManager, EventListenerList, Guard, DelegatingFormListModel, Binding, DebugContext, DelegateToListModel, DelegatingFormValueModel, Functions, PageController, SelectionModel, CanProxy, MultipleSelectionModel, WatchList, ProxyRegistry, DependsOnOptions, LoadingStateTracker, Loadable, HasValue, DelegatingCommand, ComputedListModel, Deferred, ReducingValueModel, AndValueModel, SingleSelectionModel,
|
|
46
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, proxify, ValueModel, Proxify, Logger, StoreInValueModel, Command, MutableListModel, StoreInListModel, ListModel, Disposable, Trace, DelegatingListModel, MutableValueModel, DelegateToValueModel, FocusManager, EventListenerList, Guard, DelegatingFormListModel, Binding, DebugContext, DelegateToListModel, DelegatingFormValueModel, Rejection, Functions, PageController, SelectionModel, CanProxy, MultipleSelectionModel, WatchList, ProxyRegistry, DependsOnOptions, LoadingStateTracker, Loadable, HasValue, DelegatingCommand, ComputedListModel, Deferred, ReducingValueModel, AndValueModel, SingleSelectionModel, DirtyTrackingForm } from '@coolon/pectin';
|
|
47
47
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
48
48
|
import * as i1 from '@angular/platform-browser';
|
|
49
49
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
@@ -52,11 +52,12 @@ import { marked } from 'marked';
|
|
|
52
52
|
import { MemoizeGet, lang as lang$1, assert as assert$1, Stringy, Klass, Opts } from '@coolon/typescript-utilities';
|
|
53
53
|
import { Enum } from 'typescript-string-enums';
|
|
54
54
|
import * as i5 from '@angular/material/core';
|
|
55
|
+
import { MatOption, MatOptionModule } from '@angular/material/core';
|
|
55
56
|
import { Memoize } from 'fast-typescript-memoize';
|
|
56
57
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
57
58
|
import { generateKeyBetween } from 'fractional-indexing';
|
|
58
|
-
import * as i5$
|
|
59
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
59
|
+
import * as i5$2 from '@angular/cdk/a11y';
|
|
60
|
+
import { ActiveDescendantKeyManager, A11yModule } from '@angular/cdk/a11y';
|
|
60
61
|
import * as i1$7 from '@angular/material/bottom-sheet';
|
|
61
62
|
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
|
62
63
|
import * as i1$8 from '@angular/material/dialog';
|
|
@@ -65,6 +66,7 @@ import * as i1$5 from '@angular/router';
|
|
|
65
66
|
import { UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterModule, ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router';
|
|
66
67
|
import 'reflect-metadata';
|
|
67
68
|
import * as i1$6 from '@angular/cdk/overlay';
|
|
69
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
68
70
|
import { style, trigger, transition, animate, group, query } from '@angular/animations';
|
|
69
71
|
import { MatCardModule } from '@angular/material/card';
|
|
70
72
|
import * as i3$3 from '@angular/material/list';
|
|
@@ -2955,7 +2957,7 @@ class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
|
2955
2957
|
})).writeRight();
|
|
2956
2958
|
}
|
|
2957
2959
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: MultipleSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2958
|
-
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$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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:
|
|
2960
|
+
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$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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$1.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: AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
2959
2961
|
}
|
|
2960
2962
|
__decorate([
|
|
2961
2963
|
Proxify(),
|
|
@@ -3262,6 +3264,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3262
3264
|
type: Input
|
|
3263
3265
|
}] } });
|
|
3264
3266
|
|
|
3267
|
+
/**
|
|
3268
|
+
* Opens a choice's options as a list to choose one from, in an activity. Where the interaction context the chooser is
|
|
3269
|
+
* drawn in opens its choices as a list (`InteractionContext.opensChoicesAs`), as a sheet or a popup does, the list
|
|
3270
|
+
* slides in over the chooser's activity and Back returns to it; anywhere else it opens in a popup anchored to the
|
|
3271
|
+
* chooser. `aup-select-input` uses it, and so can a chooser of its own that wants the same list. This folder cannot
|
|
3272
|
+
* import the interaction layer that starts activities, so `InteractionModule` provides it.
|
|
3273
|
+
*/
|
|
3274
|
+
/**
|
|
3275
|
+
* How an app words its option lists and select panels, provided once, as in its root module: Back's face, and the
|
|
3276
|
+
* search box's placeholder and what it says when nothing matches. Without it they are English. A list's or a select's
|
|
3277
|
+
* own words still win.
|
|
3278
|
+
*/
|
|
3279
|
+
const OPTION_LIST_DEFAULTS = new InjectionToken('OPTION_LIST_DEFAULTS');
|
|
3280
|
+
class SelectOptionList {
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3265
3283
|
/**
|
|
3266
3284
|
* Stands in for the mat-form-field a bare mat-select would otherwise look for, so its dropdown
|
|
3267
3285
|
* anchors to THIS element's border box. Without a form field, mat-select falls back to its inner
|
|
@@ -3333,6 +3351,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3333
3351
|
* selector rather than a form field, so label, hint and error do not exist there (binding label or
|
|
3334
3352
|
* hint warns in development mode) and the panel sizes to its longest option. The option list, search
|
|
3335
3353
|
* box, nil row, templates and footer slot are the same in both. See {@link appearance}.
|
|
3354
|
+
*
|
|
3355
|
+
* How the options open is decided by where the select is drawn:
|
|
3356
|
+
* <aup-select-input listTitle="Hero" placeholder="All heros" [allowNil]="true"
|
|
3357
|
+
* [optionIcon]="hero => hero.icon" [optionCounts]="countsOf" ...></aup-select-input>
|
|
3358
|
+
* On a page or in a dialog the select drops Material's panel. In a bottom sheet or a popup, whose interaction
|
|
3359
|
+
* context opens choices as a list (`InteractionContext.opensChoicesAs`), it slides an `aup-option-list-activity`
|
|
3360
|
+
* in over the activity it is drawn in, and Back returns there: a panel dropped there would float over the
|
|
3361
|
+
* sheet, or stack a second overlay on the popup. So the same template does the right thing in a dialog on a
|
|
3362
|
+
* desktop and in a sheet on a phone. Both presentations tick the chosen option, show an icon and a count beside
|
|
3363
|
+
* each option, search when `searchable`, and offer the nil option. `opens` overrides the decision for one
|
|
3364
|
+
* select; a list opened where its context does not open one is a popup under the select. The list needs
|
|
3365
|
+
* `InteractionModule`, which starts the activity (see {@link SelectOptionList}). #optionTemplate,
|
|
3366
|
+
* #nilOptionTemplate, #selectedOptionTemplate in a field, and the footer slot are the panel's alone: the list
|
|
3367
|
+
* shows labels from optionLabelFormat and the placeholder for the nil option.
|
|
3336
3368
|
*/
|
|
3337
3369
|
class SelectInputComponent extends AbstractValueInputComponent {
|
|
3338
3370
|
/** Keys the search box hands back to MatSelect's key manager instead of consuming itself. */
|
|
@@ -3355,7 +3387,25 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3355
3387
|
get buttonAppearance() {
|
|
3356
3388
|
return this.appearance === 'button';
|
|
3357
3389
|
}
|
|
3390
|
+
/**
|
|
3391
|
+
* Overrides how the options open, which is otherwise decided by where the select is drawn: `panel` drops
|
|
3392
|
+
* Material's panel, `list` opens a list activity. See the class docs.
|
|
3393
|
+
*/
|
|
3394
|
+
opens;
|
|
3395
|
+
/** Whether the options open as a list, as decided once the inputs are bound. */
|
|
3396
|
+
opensList = false;
|
|
3397
|
+
/** The list's title, a list being an activity of its own. Defaults to the label, else the placeholder. */
|
|
3398
|
+
listTitle;
|
|
3399
|
+
/** An icon drawn before an option's label, in the list and in the panel. */
|
|
3400
|
+
optionIcon;
|
|
3401
|
+
/** The counts shown beside the options, in the list and in the panel, built as they open. */
|
|
3402
|
+
optionCounts;
|
|
3403
|
+
/** The counts the open panel shows, in the order of the options; none while it is closed. */
|
|
3404
|
+
panelCounts$ = this.registerDisposable(new DelegatingValueModel());
|
|
3405
|
+
panelCountsWhileOpen;
|
|
3358
3406
|
matSelectConfig = inject(MAT_SELECT_CONFIG, { optional: true });
|
|
3407
|
+
optionList = inject(SelectOptionList, { optional: true });
|
|
3408
|
+
injector = inject(Injector);
|
|
3359
3409
|
/**
|
|
3360
3410
|
* What the field appearance binds to mat-select's panelWidth: whatever the app configured, else
|
|
3361
3411
|
* Material's own default - so no existing consumer moves. (Binding undefined would NOT be a
|
|
@@ -3372,9 +3422,18 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3372
3422
|
/** Opt-in: renders a search box at the top of the dropdown panel that filters the options. */
|
|
3373
3423
|
searchable = false;
|
|
3374
3424
|
/** Placeholder for the in-panel search box. {@link FormField} has no slot for this. */
|
|
3375
|
-
searchPlaceholder
|
|
3425
|
+
searchPlaceholder;
|
|
3376
3426
|
/** Shown inside the panel when the search matches nothing. */
|
|
3377
|
-
noResultsText
|
|
3427
|
+
noResultsText;
|
|
3428
|
+
listDefaults = inject(OPTION_LIST_DEFAULTS, { optional: true });
|
|
3429
|
+
/** The search box's placeholder: the select's own, else the app's (`OPTION_LIST_DEFAULTS`), else English. */
|
|
3430
|
+
get searchPlaceholderText() {
|
|
3431
|
+
return this.searchPlaceholder ?? this.listDefaults?.searchPlaceholder ?? 'Search…';
|
|
3432
|
+
}
|
|
3433
|
+
/** What the search says when nothing matches: the select's own, else the app's, else English. */
|
|
3434
|
+
get noResultsMessage() {
|
|
3435
|
+
return this.noResultsText ?? this.listDefaults?.noResultsText ?? 'No matches';
|
|
3436
|
+
}
|
|
3378
3437
|
#searchText$_accessor_storage = proxify((MutableValueModel));
|
|
3379
3438
|
/** Bindable so a host can pre-seed or observe the search text. Cleared when the panel closes. */
|
|
3380
3439
|
get searchText$() { return this.#searchText$_accessor_storage; }
|
|
@@ -3421,11 +3480,18 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3421
3480
|
filterPredicate$;
|
|
3422
3481
|
searchInputRef;
|
|
3423
3482
|
matSelect;
|
|
3483
|
+
listButtonRef;
|
|
3484
|
+
get hasValue() {
|
|
3485
|
+
return !isNil(this.componentValue$.value);
|
|
3486
|
+
}
|
|
3487
|
+
/** Whether the select's list is open, when its options open as a list. */
|
|
3488
|
+
listOpen = false;
|
|
3424
3489
|
delegatedIdentityOf = (item) => this.options$.identityOf(item);
|
|
3425
3490
|
trackByIdentity = (index, item) => this.delegatedIdentityOf(item) ?? index;
|
|
3426
3491
|
constructor() {
|
|
3427
3492
|
super();
|
|
3428
3493
|
const { chain } = Dsl.disposeWith(this);
|
|
3494
|
+
this.viewStateDependsOn(this.panelCounts$);
|
|
3429
3495
|
this.cookedOptions$ = chain(this.options$)
|
|
3430
3496
|
.mapAll(options => {
|
|
3431
3497
|
return options.length < 1 && !isNil(this.componentValue$.value) ? [this.componentValue$.value] : options;
|
|
@@ -3449,6 +3515,54 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3449
3515
|
select(item) {
|
|
3450
3516
|
this.id$.value = this.delegatedIdentityOf(item);
|
|
3451
3517
|
}
|
|
3518
|
+
/** How many the open panel says [option] would leave, beside it; undefined without counts. */
|
|
3519
|
+
panelCount(option) {
|
|
3520
|
+
const counts = this.panelCounts$.value;
|
|
3521
|
+
if (!counts) {
|
|
3522
|
+
return undefined;
|
|
3523
|
+
}
|
|
3524
|
+
const id = this.delegatedIdentityOf(option);
|
|
3525
|
+
return counts[this.cookedOptions$.value.findIndex(each => this.delegatedIdentityOf(each) === id)];
|
|
3526
|
+
}
|
|
3527
|
+
/** For `opens="list"`: opens the list, and chooses what is chosen there. Closing it without choosing changes nothing. */
|
|
3528
|
+
async openList() {
|
|
3529
|
+
if (this.listOpen || !this.enabled$.value) {
|
|
3530
|
+
return;
|
|
3531
|
+
}
|
|
3532
|
+
if (!this.optionList) {
|
|
3533
|
+
throw new Error('aup-select-input: opens="list" needs InteractionModule, which provides SelectOptionList.');
|
|
3534
|
+
}
|
|
3535
|
+
const options = this.cookedOptions$.value;
|
|
3536
|
+
const whileOpen = new GarbageCollector();
|
|
3537
|
+
this.listOpen = true;
|
|
3538
|
+
try {
|
|
3539
|
+
const chosen = await this.optionList.open({
|
|
3540
|
+
origin: this.listButtonRef,
|
|
3541
|
+
injector: this.injector,
|
|
3542
|
+
title: this.listTitle ?? this.label ?? this.placeholder ?? '',
|
|
3543
|
+
options,
|
|
3544
|
+
value: this.componentValue$.value,
|
|
3545
|
+
identityOf: this.delegatedIdentityOf,
|
|
3546
|
+
optionLabelFormat: option => this.optionLabelFormat(option),
|
|
3547
|
+
optionIcon: this.optionIcon,
|
|
3548
|
+
counts$: this.optionCounts?.(options, whileOpen),
|
|
3549
|
+
nilLabel: this.allowNil$.value ? this.placeholder ?? '' : undefined,
|
|
3550
|
+
searchable: this.searchable,
|
|
3551
|
+
searchPlaceholder: this.searchPlaceholder,
|
|
3552
|
+
noResultsText: this.noResultsText
|
|
3553
|
+
});
|
|
3554
|
+
this.id$.value = isNil(chosen) ? undefined : this.delegatedIdentityOf(chosen);
|
|
3555
|
+
}
|
|
3556
|
+
catch (e) {
|
|
3557
|
+
if (!Rejection.isHandled(e)) {
|
|
3558
|
+
throw e;
|
|
3559
|
+
}
|
|
3560
|
+
}
|
|
3561
|
+
finally {
|
|
3562
|
+
whileOpen.dispose();
|
|
3563
|
+
this.listOpen = false;
|
|
3564
|
+
}
|
|
3565
|
+
}
|
|
3452
3566
|
/** Lower-cased, nil-free rows for one option. Matched row by row so a term cannot straddle two. */
|
|
3453
3567
|
searchRows(option) {
|
|
3454
3568
|
const rows = (this.optionSearchText ?? this.defaultOptionSearchText)(option);
|
|
@@ -3500,9 +3614,16 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3500
3614
|
this.panelOpen$.value = open;
|
|
3501
3615
|
if (open) {
|
|
3502
3616
|
this.focusSearchPending = true;
|
|
3617
|
+
if (this.optionCounts) {
|
|
3618
|
+
this.panelCountsWhileOpen = new GarbageCollector();
|
|
3619
|
+
this.panelCounts$.setDelegate(this.optionCounts(this.cookedOptions$.value, this.panelCountsWhileOpen));
|
|
3620
|
+
}
|
|
3503
3621
|
}
|
|
3504
3622
|
else {
|
|
3505
3623
|
this.searchText$.value = undefined;
|
|
3624
|
+
this.panelCounts$.setDelegate(undefined);
|
|
3625
|
+
this.panelCountsWhileOpen?.dispose();
|
|
3626
|
+
this.panelCountsWhileOpen = undefined;
|
|
3506
3627
|
}
|
|
3507
3628
|
}
|
|
3508
3629
|
/** The search box only exists in the DOM once the overlay has attached, hence the retry flag. */
|
|
@@ -3578,6 +3699,8 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3578
3699
|
}
|
|
3579
3700
|
ngOnInit() {
|
|
3580
3701
|
super.ngOnInit();
|
|
3702
|
+
// The inputs are bound by now, and where the select is drawn does not change for as long as it lives.
|
|
3703
|
+
this.opensList = this.opens ? this.opens === 'list' : !!this.optionList?.opensAsList(this.injector);
|
|
3581
3704
|
// NOTE: this has to be done after our parameter have been bound or we'll clobber the initial selected values with the writeRight
|
|
3582
3705
|
const { chain, before, when } = Dsl.disposeWith(this);
|
|
3583
3706
|
const lookup = chain(this.options$).indexUsing(this.delegatedIdentityOf);
|
|
@@ -3619,7 +3742,7 @@ class SelectInputComponent extends AbstractValueInputComponent {
|
|
|
3619
3742
|
});
|
|
3620
3743
|
}
|
|
3621
3744
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3622
|
-
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$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "directive", type: SelectOverlayOriginDirective, selector: "[aupSelectOverlayOrigin]" }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
3745
|
+
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", opens: "opens", listTitle: "listTitle", optionIcon: "optionIcon", optionCounts: "optionCounts", 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 }, { propertyName: "listButtonRef", first: true, predicate: ["listButton"], 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]=\"searchPlaceholderText\"\n [attr.aria-label]=\"searchPlaceholderText\"\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\">{{noResultsMessage}}</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<ng-container *ngIf=\"!opensList; else fieldListShell\">\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 <span *ngIf=\"!optionTemplateRef\" class=\"aup-select-option\">\n <aup-icon *ngIf=\"optionIcon?.(option) as icon\" class=\"aup-select-option__icon\" [icon]=\"icon\"></aup-icon>\n <span class=\"aup-select-option__label\">{{optionLabelFormat(option)}}</span>\n <span *ngIf=\"panelCount(option) !== undefined\" class=\"aup-select-option__count\"\n [class.zero]=\"panelCount(option) === 0\" data-cy=\"count\">{{panelCount(option)}}</span>\n </span>\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</ng-container>\n\n<!--\nA field whose options open as a list: the form field holds a read-only input that names the choice and opens the\nlist, so the label, hint, error and validation icon stay as a field has them.\n-->\n<ng-template #fieldListShell>\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput #listButton readonly class=\"aup-select-list-field\" data-cy=\"select-list-field\"\n role=\"combobox\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"listOpen\"\n [placeholder]=\"placeholder ?? ''\"\n [value]=\"hasValue ? optionLabelFormat(componentValue$.value) : ''\"\n [disabled]=\"!enabled$.value\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [pectinFocusBinding]=\"focusContext\"\n (click)=\"openList()\"\n (keydown.enter)=\"$event.preventDefault(); openList()\"\n (keydown.space)=\"$event.preventDefault(); openList()\"\n (keydown.arrowdown)=\"$event.preventDefault(); openList()\">\n <aup-icon matSuffix class=\"aup-select-list-field__arrow\" icon=\"mat:arrow_drop_down\"></aup-icon>\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</ng-template>\n\n<ng-template #buttonShell>\n <!--\n opens=\"list\": a plain button. The options open as a list activity (see SelectOptionList), so there\n is no mat-select, and nothing here is queried by declaration.\n -->\n <button *ngIf=\"opensList; else panelButton\" #listButton type=\"button\"\n class=\"aup-select-button aup-select-list-button\" data-cy=\"select-button\"\n aria-haspopup=\"listbox\" [attr.aria-expanded]=\"listOpen\"\n [disabled]=\"!enabled$.value\"\n [pectinFocusBinding]=\"focusContext\"\n (click)=\"openList()\"\n (keydown.arrowdown)=\"$event.preventDefault(); openList()\">\n <span class=\"aup-select-list-button__value\">\n <ng-container *ngIf=\"!hasValue\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"hasValue && !selectedOptionTemplateRef\">{{optionLabelFormat(componentValue$.value)}}</ng-container>\n <ng-container *ngIf=\"hasValue && selectedOptionTemplateRef\"\n [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </span>\n <aup-icon class=\"aup-select-list-button__arrow\" icon=\"mat:arrow_drop_down\"></aup-icon>\n </button>\n</ng-template>\n\n<ng-template #panelButton>\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 <span *ngIf=\"!optionTemplateRef\" class=\"aup-select-option\">\n <aup-icon *ngIf=\"optionIcon?.(option) as icon\" class=\"aup-select-option__icon\" [icon]=\"icon\"></aup-icon>\n <span class=\"aup-select-option__label\">{{optionLabelFormat(option)}}</span>\n <span *ngIf=\"panelCount(option) !== undefined\" class=\"aup-select-option__count\"\n [class.zero]=\"panelCount(option) === 0\" data-cy=\"count\">{{panelCount(option)}}</span>\n </span>\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%}button.aup-select-list-button{gap:4px;padding-right:4px;font:inherit;color:inherit;text-align:left}button.aup-select-list-button:focus-visible{outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}button.aup-select-list-button:disabled{opacity:.5;cursor:default}.aup-select-list-button__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aup-select-list-button__arrow{flex:none}.aup-select-list-field,.aup-select-list-field__arrow{cursor:pointer}.aup-select-option{display:flex;align-items:center;gap:16px}.aup-select-option__icon{flex:none;opacity:.7}.aup-select-option__label{flex:1;min-width:0}.aup-select-option__count{flex:none;font-size:.85em;opacity:.7}.aup-select-option__count.zero{opacity:.4}::ng-deep .mat-mdc-option:has(>.mdc-list-item__primary-text>.aup-select-option) .mdc-list-item__primary-text{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: 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$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i5$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "directive", type: FocusBindingDirective, selector: "[pectinFocusBinding]", inputs: ["pectinFocusBinding", "focusBindingTarget"] }, { kind: "directive", type: SelectOverlayOriginDirective, selector: "[aupSelectOverlayOrigin]" }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
3623
3746
|
}
|
|
3624
3747
|
__decorate([
|
|
3625
3748
|
Proxify(),
|
|
@@ -3643,7 +3766,7 @@ __decorate([
|
|
|
3643
3766
|
], SelectInputComponent.prototype, "searchText$", null);
|
|
3644
3767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SelectInputComponent, decorators: [{
|
|
3645
3768
|
type: Component,
|
|
3646
|
-
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"] }]
|
|
3769
|
+
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]=\"searchPlaceholderText\"\n [attr.aria-label]=\"searchPlaceholderText\"\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\">{{noResultsMessage}}</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<ng-container *ngIf=\"!opensList; else fieldListShell\">\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 <span *ngIf=\"!optionTemplateRef\" class=\"aup-select-option\">\n <aup-icon *ngIf=\"optionIcon?.(option) as icon\" class=\"aup-select-option__icon\" [icon]=\"icon\"></aup-icon>\n <span class=\"aup-select-option__label\">{{optionLabelFormat(option)}}</span>\n <span *ngIf=\"panelCount(option) !== undefined\" class=\"aup-select-option__count\"\n [class.zero]=\"panelCount(option) === 0\" data-cy=\"count\">{{panelCount(option)}}</span>\n </span>\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</ng-container>\n\n<!--\nA field whose options open as a list: the form field holds a read-only input that names the choice and opens the\nlist, so the label, hint, error and validation icon stay as a field has them.\n-->\n<ng-template #fieldListShell>\n <mat-form-field [floatLabel]=\"floatLabel\" subscriptSizing=\"dynamic\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput #listButton readonly class=\"aup-select-list-field\" data-cy=\"select-list-field\"\n role=\"combobox\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"listOpen\"\n [placeholder]=\"placeholder ?? ''\"\n [value]=\"hasValue ? optionLabelFormat(componentValue$.value) : ''\"\n [disabled]=\"!enabled$.value\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [pectinFocusBinding]=\"focusContext\"\n (click)=\"openList()\"\n (keydown.enter)=\"$event.preventDefault(); openList()\"\n (keydown.space)=\"$event.preventDefault(); openList()\"\n (keydown.arrowdown)=\"$event.preventDefault(); openList()\">\n <aup-icon matSuffix class=\"aup-select-list-field__arrow\" icon=\"mat:arrow_drop_down\"></aup-icon>\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</ng-template>\n\n<ng-template #buttonShell>\n <!--\n opens=\"list\": a plain button. The options open as a list activity (see SelectOptionList), so there\n is no mat-select, and nothing here is queried by declaration.\n -->\n <button *ngIf=\"opensList; else panelButton\" #listButton type=\"button\"\n class=\"aup-select-button aup-select-list-button\" data-cy=\"select-button\"\n aria-haspopup=\"listbox\" [attr.aria-expanded]=\"listOpen\"\n [disabled]=\"!enabled$.value\"\n [pectinFocusBinding]=\"focusContext\"\n (click)=\"openList()\"\n (keydown.arrowdown)=\"$event.preventDefault(); openList()\">\n <span class=\"aup-select-list-button__value\">\n <ng-container *ngIf=\"!hasValue\">{{placeholder}}</ng-container>\n <ng-container *ngIf=\"hasValue && !selectedOptionTemplateRef\">{{optionLabelFormat(componentValue$.value)}}</ng-container>\n <ng-container *ngIf=\"hasValue && selectedOptionTemplateRef\"\n [ngTemplateOutlet]=\"selectedOptionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: componentValue$.value}\"></ng-container>\n </span>\n <aup-icon class=\"aup-select-list-button__arrow\" icon=\"mat:arrow_drop_down\"></aup-icon>\n </button>\n</ng-template>\n\n<ng-template #panelButton>\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 <span *ngIf=\"!optionTemplateRef\" class=\"aup-select-option\">\n <aup-icon *ngIf=\"optionIcon?.(option) as icon\" class=\"aup-select-option__icon\" [icon]=\"icon\"></aup-icon>\n <span class=\"aup-select-option__label\">{{optionLabelFormat(option)}}</span>\n <span *ngIf=\"panelCount(option) !== undefined\" class=\"aup-select-option__count\"\n [class.zero]=\"panelCount(option) === 0\" data-cy=\"count\">{{panelCount(option)}}</span>\n </span>\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%}button.aup-select-list-button{gap:4px;padding-right:4px;font:inherit;color:inherit;text-align:left}button.aup-select-list-button:focus-visible{outline:2px solid var(--mdc-theme-primary, #3f51b5);outline-offset:2px}button.aup-select-list-button:disabled{opacity:.5;cursor:default}.aup-select-list-button__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aup-select-list-button__arrow{flex:none}.aup-select-list-field,.aup-select-list-field__arrow{cursor:pointer}.aup-select-option{display:flex;align-items:center;gap:16px}.aup-select-option__icon{flex:none;opacity:.7}.aup-select-option__label{flex:1;min-width:0}.aup-select-option__count{flex:none;font-size:.85em;opacity:.7}.aup-select-option__count.zero{opacity:.4}::ng-deep .mat-mdc-option:has(>.mdc-list-item__primary-text>.aup-select-option) .mdc-list-item__primary-text{flex:1}\n"] }]
|
|
3647
3770
|
}], ctorParameters: function () { return []; }, propDecorators: { options$: [{
|
|
3648
3771
|
type: Input
|
|
3649
3772
|
}], options: [{
|
|
@@ -3659,6 +3782,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3659
3782
|
}], buttonAppearance: [{
|
|
3660
3783
|
type: HostBinding,
|
|
3661
3784
|
args: ['class.appearance-button']
|
|
3785
|
+
}], opens: [{
|
|
3786
|
+
type: Input
|
|
3787
|
+
}], listTitle: [{
|
|
3788
|
+
type: Input
|
|
3789
|
+
}], optionIcon: [{
|
|
3790
|
+
type: Input
|
|
3791
|
+
}], optionCounts: [{
|
|
3792
|
+
type: Input
|
|
3662
3793
|
}], selectedOptionTemplateRef: [{
|
|
3663
3794
|
type: ContentChild,
|
|
3664
3795
|
args: ['selectedOptionTemplate']
|
|
@@ -3688,6 +3819,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3688
3819
|
}], matSelect: [{
|
|
3689
3820
|
type: ViewChild,
|
|
3690
3821
|
args: [MatSelect]
|
|
3822
|
+
}], listButtonRef: [{
|
|
3823
|
+
type: ViewChild,
|
|
3824
|
+
args: ['listButton']
|
|
3691
3825
|
}] } });
|
|
3692
3826
|
|
|
3693
3827
|
class StringInputComponent extends AbstractValueInputComponent {
|
|
@@ -7249,7 +7383,7 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
7249
7383
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableBodyComponent, deps: [{ token: AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
7250
7384
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableBodyComponent, selector: "aup-table-body", inputs: { data$: "data$", tableModel: "tableModel", footerRows: "footerRows", showHeader$: "showHeader$", showHeader: "showHeader", trackBy: "trackBy", scrollMode$: "scrollMode$", scrollMode: "scrollMode" }, host: { properties: { "attr.scrollMode": "this.scrollMode", "class": "this.baseCssClass", "class.aup-animations-disabled": "this.animationsDisabledClass", "class.hide-header": "this.hideHeader", "style.--aup-table-header-height": "this.headerHeightCssVar", "style.--aup-table-row-height": "this.rowHeightCssVar" } }, providers: [
|
|
7251
7385
|
{ provide: AUP_DETACHED_PARENT_CDR, useFactory: () => inject(AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, { optional: true }) ? inject(ChangeDetectorRef) : null }
|
|
7252
|
-
], viewQueries: [{ propertyName: "scrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"$any(column)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabledForRow(column, row)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"\n [@.disabled]=\"animationsDisabled$.value\"\n [tvsItemSize]=\"rowHeight$.value\"\n [headerHeight]=\"headerHeight$.value\"\n [footerEnabled]=\"(footerRowDefs$?.value?.length ?? 0) > 0\"\n [footerHeight]=\"48 * (footerRowDefs$?.value?.length ?? 0)\"\n [bufferMultiplier]=\"bufferMultiplier\"\n>\n <table mat-table [dataSource]=\"virtualScrollDataSource\" [trackBy]=\"trackBy\">\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabledForRow(column, row)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{--enter-animation-duration: .1s;display:flex;flex-direction:column;align-items:stretch}:host.aup-animations-disabled{--enter-animation-duration: 0ms}:host table{width:100%}:host tr.aup-footer-row-hidden{display:none}:host td.footer-cell{border-top:0!important;box-shadow:0 -1px 0 0 var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))}:host[scrollMode=virtual] cdk-virtual-scroll-viewport{flex:1}:host[scrollMode=virtual] table th{height:var(--aup-table-header-height);max-height:var(--aup-table-header-height);min-height:var(--aup-table-header-height)}:host[scrollMode=virtual] table td{height:var(--aup-table-row-height);max-height:var(--aup-table-row-height);min-height:var(--aup-table-row-height)}:host[scrollMode=classic]{min-height:0}:host[scrollMode=classic] .classic-scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i2$9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$9.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2$9.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i2$9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$9.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i2$9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i2$9.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i1$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i4$
|
|
7386
|
+
], viewQueries: [{ propertyName: "scrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "\n<div class=\"classic-scroll-container\" *ngIf=\"scrollMode$.value !== 'virtual'\">\n <table mat-table [dataSource]=\"data$.value\" [trackBy]=\"trackBy\" [multiTemplateDataRows]>\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"$any(column)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabledForRow(column, row)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n </table>\n</div>\n\n<cdk-virtual-scroll-viewport *ngIf=\"scrollMode$.value === 'virtual'\"\n [@.disabled]=\"animationsDisabled$.value\"\n [tvsItemSize]=\"rowHeight$.value\"\n [headerHeight]=\"headerHeight$.value\"\n [footerEnabled]=\"(footerRowDefs$?.value?.length ?? 0) > 0\"\n [footerHeight]=\"48 * (footerRowDefs$?.value?.length ?? 0)\"\n [bufferMultiplier]=\"bufferMultiplier\"\n>\n <table mat-table [dataSource]=\"virtualScrollDataSource\" [trackBy]=\"trackBy\">\n\n <ng-container *ngFor=\"let column of columns$.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabledForRow(column, row)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell [column]=\"$any(column)\"\n [row]=\"row\"\n [tableModel]=\"$any(tableModel)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds$.value; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds$.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n [class.enable-hover]=\"tableModel.isHoverEnabledForRow(row)\"\n [aupTableRowAttributes]=\"tableModel.getRowAttributes(row)\"\n [attr.aup-row-id]=\"trackBy(i, row)\"\n ></tr>\n\n <ng-container *ngFor=\"let footer of footerRowDefs$.value\">\n <ng-container *ngFor=\"let cell of footer.cells\" [matColumnDef]=\"cell.defId\">\n <td mat-footer-cell *matFooterCellDef [attr.colspan]=\"cell.colspan\"\n [attr.column-id]=\"cell.columnId\" class=\"footer-cell\">\n <aup-table-footer-row *ngIf=\"!cell.filler\" [cell]=\"cell\"></aup-table-footer-row>\n </td>\n </ng-container>\n <tr mat-footer-row *matFooterRowDef=\"footer.defIds; sticky: true\" [ngClass]=\"footer.rowClasses\"\n [class.aup-footer-row-hidden]=\"footer.visible$ && !footer.visible$.value\"></tr>\n </ng-container>\n\n\n </table>\n</cdk-virtual-scroll-viewport>\n\n", styles: [":host{--enter-animation-duration: .1s;display:flex;flex-direction:column;align-items:stretch}:host.aup-animations-disabled{--enter-animation-duration: 0ms}:host table{width:100%}:host tr.aup-footer-row-hidden{display:none}:host td.footer-cell{border-top:0!important;box-shadow:0 -1px 0 0 var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))}:host[scrollMode=virtual] cdk-virtual-scroll-viewport{flex:1}:host[scrollMode=virtual] table th{height:var(--aup-table-header-height);max-height:var(--aup-table-header-height);min-height:var(--aup-table-header-height)}:host[scrollMode=virtual] table td{height:var(--aup-table-row-height);max-height:var(--aup-table-row-height);min-height:var(--aup-table-row-height)}:host[scrollMode=classic]{min-height:0}:host[scrollMode=classic] .classic-scroll-container{flex:1;flex-basis:0;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$9.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i2$9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$9.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2$9.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i2$9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$9.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i2$9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i2$9.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i1$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i4$1.TableItemSizeDirective, selector: "cdk-virtual-scroll-viewport[tvsItemSize]", inputs: ["tvsItemSize", "headerEnabled", "headerHeight", "footerEnabled", "footerHeight", "bufferMultiplier"] }, { kind: "directive", type: TableRowAttributesDirective, selector: "[aupTableRowAttributes]", inputs: ["aupTableRowAttributes"] }, { kind: "component", type: TableCellComponent, selector: "aup-table-cell", inputs: ["row", "column", "tableModel"] }, { kind: "component", type: TableHeaderCellComponent, selector: "aup-table-header-cell", inputs: ["column"] }, { kind: "component", type: TableFooterRow, selector: "aup-table-footer-row", inputs: ["cell"] }] });
|
|
7253
7387
|
}
|
|
7254
7388
|
__decorate([
|
|
7255
7389
|
Proxify(),
|
|
@@ -7705,6 +7839,14 @@ class TableModel extends AbstractTableModel {
|
|
|
7705
7839
|
* </div>
|
|
7706
7840
|
* </aup-table>
|
|
7707
7841
|
*
|
|
7842
|
+
* Nothing to show
|
|
7843
|
+
* @example
|
|
7844
|
+
* <aup-table [tableModel]="heroTableModel" [filterModel]="heroFilterModel">
|
|
7845
|
+
* <aup-empty-state slot="empty"><p>No hero matches the search.</p></aup-empty-state>
|
|
7846
|
+
* </aup-table>
|
|
7847
|
+
* Content in the empty slot takes the body's place, header included, while the filters leave no row.
|
|
7848
|
+
* The footer stays. A table with nothing in the slot shows its header over an empty body, as before.
|
|
7849
|
+
*
|
|
7708
7850
|
* Styling
|
|
7709
7851
|
* @example
|
|
7710
7852
|
* // global settings
|
|
@@ -7747,6 +7889,7 @@ class TableComponent extends AbstractTableComponent {
|
|
|
7747
7889
|
get filterModel() { return this.#filterModel_accessor_storage; }
|
|
7748
7890
|
set filterModel(value) { this.#filterModel_accessor_storage = value; }
|
|
7749
7891
|
tableBody;
|
|
7892
|
+
emptyContent;
|
|
7750
7893
|
#scrollMode$_accessor_storage = proxify((ValueModel));
|
|
7751
7894
|
/**
|
|
7752
7895
|
* Set to true to scroll mode to classic or virtual (default). Virtual scrolll performs better for large data sets but clamps the row height. Classic scroll
|
|
@@ -7787,6 +7930,14 @@ class TableComponent extends AbstractTableComponent {
|
|
|
7787
7930
|
getModel() {
|
|
7788
7931
|
return this.tableModel;
|
|
7789
7932
|
}
|
|
7933
|
+
/**
|
|
7934
|
+
* True while the filters leave no row and the host gave content for the empty slot. A host that
|
|
7935
|
+
* projects the slot behind an *ngIf adds or removes it at any time, so the slot is checked on each
|
|
7936
|
+
* read rather than once.
|
|
7937
|
+
*/
|
|
7938
|
+
get showsEmptyContent() {
|
|
7939
|
+
return this._filteredRows$.length === 0 && this.emptyContent.nativeElement.childElementCount > 0;
|
|
7940
|
+
}
|
|
7790
7941
|
footerContentChanged($event) {
|
|
7791
7942
|
// console.log($event);
|
|
7792
7943
|
this._footerContentAdded = true;
|
|
@@ -7794,7 +7945,7 @@ class TableComponent extends AbstractTableComponent {
|
|
|
7794
7945
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: TableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
7795
7946
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: TableComponent, selector: "aup-table", inputs: { tableModel: "tableModel", filterModel: "filterModel", scrollMode$: "scrollMode$", scrollMode: "scrollMode" }, providers: [
|
|
7796
7947
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
7797
|
-
], viewQueries: [{ propertyName: "tableBody", first: true, predicate: TableBodyComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<aup-table-body [data$]=\"visibleRows$\"\n [tableModel]=\"$any(tableModel)\"\n [footerRows]=\"tableModel.footerRowModels\"\n [showHeader$]=\"$any(showHeader$)\"\n [scrollMode$]=\"tableBodyScrollMode$\"\n [trackBy]=\"trackBy\"\n [aupHighlightTextModel]=\"highlightText$\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer], [slot=footer]\"></ng-content></div>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"], dependencies: [{ kind: "directive", type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }, { kind: "component", type: TableBodyComponent, selector: "aup-table-body", inputs: ["data$", "tableModel", "footerRows", "showHeader$", "showHeader", "trackBy", "scrollMode$", "scrollMode"] }] });
|
|
7948
|
+
], viewQueries: [{ propertyName: "tableBody", first: true, predicate: TableBodyComponent, descendants: true }, { propertyName: "emptyContent", first: true, predicate: ["emptyContent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<aup-table-body [hidden]=\"showsEmptyContent\"\n [data$]=\"visibleRows$\"\n [tableModel]=\"$any(tableModel)\"\n [footerRows]=\"tableModel.footerRowModels\"\n [showHeader$]=\"$any(showHeader$)\"\n [scrollMode$]=\"tableBodyScrollMode$\"\n [trackBy]=\"trackBy\"\n [aupHighlightTextModel]=\"highlightText$\"\n></aup-table-body>\n<div #emptyContent class=\"empty-content\" [hidden]=\"!showsEmptyContent\"><ng-content select=\"[empty], [slot=empty]\"></ng-content></div>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer], [slot=footer]\"></ng-content></div>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}aup-table-body[hidden],.empty-content[hidden]{display:none}.empty-content{flex:1;min-height:0;display:flex;flex-direction:column;align-items:stretch}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"], dependencies: [{ kind: "directive", type: HighlightTextModelDirective, selector: "[aupHighlightTextModel]", inputs: ["aupHighlightTextModel"] }, { kind: "component", type: TableBodyComponent, selector: "aup-table-body", inputs: ["data$", "tableModel", "footerRows", "showHeader$", "showHeader", "trackBy", "scrollMode$", "scrollMode"] }] });
|
|
7798
7949
|
}
|
|
7799
7950
|
__decorate([
|
|
7800
7951
|
Proxify(),
|
|
@@ -7816,7 +7967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
7816
7967
|
type: Component,
|
|
7817
7968
|
args: [{ selector: 'aup-table', providers: [
|
|
7818
7969
|
{ provide: AbstractTableComponent, useExisting: TableComponent }
|
|
7819
|
-
], template: "<aup-table-body [data$]=\"visibleRows$\"\n [tableModel]=\"$any(tableModel)\"\n [footerRows]=\"tableModel.footerRowModels\"\n [showHeader$]=\"$any(showHeader$)\"\n [scrollMode$]=\"tableBodyScrollMode$\"\n [trackBy]=\"trackBy\"\n [aupHighlightTextModel]=\"highlightText$\"\n></aup-table-body>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer], [slot=footer]\"></ng-content></div>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"] }]
|
|
7970
|
+
], template: "<aup-table-body [hidden]=\"showsEmptyContent\"\n [data$]=\"visibleRows$\"\n [tableModel]=\"$any(tableModel)\"\n [footerRows]=\"tableModel.footerRowModels\"\n [showHeader$]=\"$any(showHeader$)\"\n [scrollMode$]=\"tableBodyScrollMode$\"\n [trackBy]=\"trackBy\"\n [aupHighlightTextModel]=\"highlightText$\"\n></aup-table-body>\n<div #emptyContent class=\"empty-content\" [hidden]=\"!showsEmptyContent\"><ng-content select=\"[empty], [slot=empty]\"></ng-content></div>\n<section class=\"table-footer\">\n <div class=\"footer-content\"><ng-content select=\"[footer], [slot=footer]\"></ng-content></div>\n</section>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch}aup-table-body{flex:1}aup-table-body[hidden],.empty-content[hidden]{display:none}.empty-content{flex:1;min-height:0;display:flex;flex-direction:column;align-items:stretch}.table-footer{display:flex;flex-direction:row;align-items:center}.table-footer .footer-content{flex:1}\n"] }]
|
|
7820
7971
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { tableModel: [{
|
|
7821
7972
|
type: Input
|
|
7822
7973
|
}], filterModel: [{
|
|
@@ -7824,6 +7975,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
7824
7975
|
}], tableBody: [{
|
|
7825
7976
|
type: ViewChild,
|
|
7826
7977
|
args: [TableBodyComponent]
|
|
7978
|
+
}], emptyContent: [{
|
|
7979
|
+
type: ViewChild,
|
|
7980
|
+
args: ['emptyContent', { static: true }]
|
|
7827
7981
|
}], scrollMode$: [{
|
|
7828
7982
|
type: Input
|
|
7829
7983
|
}], scrollMode: [{
|
|
@@ -12265,6 +12419,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
12265
12419
|
}] }]; } });
|
|
12266
12420
|
|
|
12267
12421
|
class AbstractInteractionContext {
|
|
12422
|
+
/** A dialog's and a page's default; a sheet's is `list`. Set it to change it for this context. */
|
|
12423
|
+
opensChoicesAs = 'panel';
|
|
12268
12424
|
startActivity(activityType, data, options) {
|
|
12269
12425
|
return this.createAndLaunchActivity(activityType, data, options);
|
|
12270
12426
|
}
|
|
@@ -12800,7 +12956,7 @@ class ActivityContainerComponent extends AbstractInteractionContext {
|
|
|
12800
12956
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivityContainerComponent, deps: [{ token: PlaceRouter }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12801
12957
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: { dynamicHeight: "dynamicHeight", animationDuration: "animationDuration" }, providers: [
|
|
12802
12958
|
{ provide: INTERACTION_CONTEXT, useClass: ActivityContainerComponent },
|
|
12803
|
-
], viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true, static: true }, { propertyName: "activityOutlets", predicate: ActivityOutletComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\"\n [animationDuration]=\"getTabAnimationDuration()\"\n (animationDone)=\"onAnimationDone()\"\n>\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busy$]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$2.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i3$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: BusyOverlayComponent, selector: "aup-busy-overlay", inputs: ["busy$", "busy"] }, { kind: "directive", type: i5$
|
|
12959
|
+
], viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true, static: true }, { propertyName: "activityOutlets", predicate: ActivityOutletComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\"\n [animationDuration]=\"getTabAnimationDuration()\"\n (animationDone)=\"onAnimationDone()\"\n>\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busy$]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-busy-overlay{flex:1}.activity-outlet-wrapper{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$2.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i3$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: BusyOverlayComponent, selector: "aup-busy-overlay", inputs: ["busy$", "busy"] }, { kind: "directive", type: i5$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActivityOutletComponent, selector: "aup-activity-outlet", inputs: ["nestedInteractionContext", "activityRef"] }] });
|
|
12804
12960
|
}
|
|
12805
12961
|
__decorate([
|
|
12806
12962
|
Trace(),
|
|
@@ -12938,6 +13094,17 @@ const cssDurationRegex$1 = /(\d+)(m?s)/;
|
|
|
12938
13094
|
class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
12939
13095
|
tabConfig;
|
|
12940
13096
|
activityContainerComponent;
|
|
13097
|
+
_opensChoicesAs = 'panel';
|
|
13098
|
+
/** How choices drawn in its activities open (see `InteractionContext.opensChoicesAs`); a page's are a `panel`. */
|
|
13099
|
+
set opensChoicesAs(opensChoicesAs) {
|
|
13100
|
+
this._opensChoicesAs = opensChoicesAs;
|
|
13101
|
+
if (this.activityContainerComponent) {
|
|
13102
|
+
this.activityContainerComponent.opensChoicesAs = opensChoicesAs;
|
|
13103
|
+
}
|
|
13104
|
+
}
|
|
13105
|
+
get opensChoicesAs() {
|
|
13106
|
+
return this._opensChoicesAs;
|
|
13107
|
+
}
|
|
12941
13108
|
/**
|
|
12942
13109
|
* If true then the first startActivity call will slide the activity into view. If false
|
|
12943
13110
|
* the activity will replace the existing content immediately.
|
|
@@ -12971,6 +13138,7 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
12971
13138
|
this.tabConfig = tabConfig;
|
|
12972
13139
|
}
|
|
12973
13140
|
ngAfterViewInit() {
|
|
13141
|
+
this.activityContainerComponent.opensChoicesAs = this._opensChoicesAs;
|
|
12974
13142
|
// NOTE: this is a temp work around to detach inplace contexts from the router until AUP-88 is implemented.
|
|
12975
13143
|
// https://coolon.atlassian.net/browse/AUP-88?atlOrigin=eyJpIjoiOTg5YjEzZGUzZjRmNDg0NmExOWU3ZGJmMzJiNTRmNGYiLCJwIjoiaiJ9
|
|
12976
13144
|
if (this.syncWithRoutes) {
|
|
@@ -13033,7 +13201,7 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
|
|
|
13033
13201
|
}
|
|
13034
13202
|
}
|
|
13035
13203
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InPlaceInteractionContextComponent, deps: [{ token: MAT_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
13036
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: { animateFirstActivity: "animateFirstActivity", syncWithRoutes: "syncWithRoutes" }, outputs: { started: "started", finished: "finished" }, host: { properties: { "class.active": "this.active" } }, providers: [
|
|
13204
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: { opensChoicesAs: "opensChoicesAs", animateFirstActivity: "animateFirstActivity", syncWithRoutes: "syncWithRoutes" }, outputs: { started: "started", finished: "finished" }, host: { properties: { "class.active": "this.active" } }, providers: [
|
|
13037
13205
|
{ provide: INTERACTION_CONTEXT, useExisting: InPlaceInteractionContextComponent }
|
|
13038
13206
|
], viewQueries: [{ propertyName: "activityContainerComponent", first: true, predicate: ["activityContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs\n (selectedTabChange)=\"onTabChanged($event)\"\n [dynamicHeight]=\"false\"\n [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n", styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}aup-activity-container{flex:1}\n"], dependencies: [{ kind: "component", type: i3$2.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i3$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: ["dynamicHeight", "animationDuration"] }] });
|
|
13039
13207
|
}
|
|
@@ -13050,6 +13218,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
13050
13218
|
}] }]; }, propDecorators: { activityContainerComponent: [{
|
|
13051
13219
|
type: ViewChild,
|
|
13052
13220
|
args: ["activityContainer", { static: true }]
|
|
13221
|
+
}], opensChoicesAs: [{
|
|
13222
|
+
type: Input
|
|
13053
13223
|
}], animateFirstActivity: [{
|
|
13054
13224
|
type: Input
|
|
13055
13225
|
}], syncWithRoutes: [{
|
|
@@ -13073,7 +13243,7 @@ class InlineActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
|
13073
13243
|
super();
|
|
13074
13244
|
}
|
|
13075
13245
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InlineActivityTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13076
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InlineActivityTriggerComponent, selector: "aup-inline-activity-trigger", viewQueries: [{ propertyName: "_interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [face$]=\"face$\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13246
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InlineActivityTriggerComponent, selector: "aup-inline-activity-trigger", viewQueries: [{ propertyName: "_interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [face$]=\"face$\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["opensChoicesAs", "animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13077
13247
|
}
|
|
13078
13248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InlineActivityTriggerComponent, decorators: [{
|
|
13079
13249
|
type: Component,
|
|
@@ -13101,6 +13271,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
13101
13271
|
args: [{ selector: 'aup-modal-activity-trigger', template: "<aup-command [command]=\"startActivityCommand\" [face$]=\"face$\" [alignFace]=\"alignFace\"></aup-command>\n", styles: [":host{display:inline-block}\n"] }]
|
|
13102
13272
|
}], ctorParameters: function () { return [{ type: InteractionService }]; } });
|
|
13103
13273
|
|
|
13274
|
+
/**
|
|
13275
|
+
* Starts an activity in a popup anchored to [origin], which closes as the activity finishes. A click on the backdrop
|
|
13276
|
+
* cancels every activity in it, and Esc the one in front while [options.cancelOnEscape] says so.
|
|
13277
|
+
* `aup-popup-interaction-context` starts its activities with it, and so does a select that opens its options as a list.
|
|
13278
|
+
*/
|
|
13279
|
+
function startActivityInPopup(overlay, origin, options, activityType, data) {
|
|
13280
|
+
const scrollContainers = options.scrollContainers ?? [];
|
|
13281
|
+
const overlayRef = overlay.create({
|
|
13282
|
+
hasBackdrop: true,
|
|
13283
|
+
backdropClass: "popup-interaction-context-backdrop",
|
|
13284
|
+
disposeOnNavigation: true,
|
|
13285
|
+
panelClass: 'aup-popup-interaction-panel',
|
|
13286
|
+
positionStrategy: overlay.position()
|
|
13287
|
+
.flexibleConnectedTo(origin)
|
|
13288
|
+
.withPush(true)
|
|
13289
|
+
.withPositions(options.positions)
|
|
13290
|
+
.withGrowAfterOpen(true)
|
|
13291
|
+
.withScrollableContainers(scrollContainers) // this isn't working. sigh.
|
|
13292
|
+
});
|
|
13293
|
+
const interactionContext = overlayRef.attach(new ComponentPortal(InPlaceInteractionContextComponent)).instance;
|
|
13294
|
+
interactionContext.opensChoicesAs = options.opensChoicesAs ?? 'list';
|
|
13295
|
+
const cancelEverything = async () => {
|
|
13296
|
+
do {
|
|
13297
|
+
// noop
|
|
13298
|
+
} while (await interactionContext.cancelActiveActivity());
|
|
13299
|
+
};
|
|
13300
|
+
const subs = scrollContainers.map(sc => sc.elementScrolled().subscribe(() => {
|
|
13301
|
+
overlayRef.updatePosition();
|
|
13302
|
+
})).concat(overlayRef.backdropClick().subscribe(cancelEverything))
|
|
13303
|
+
.concat(overlayRef.keydownEvents().subscribe(async (event) => {
|
|
13304
|
+
if (options.cancelOnEscape() && event.code === "Escape" && interactionContext.isActive()) {
|
|
13305
|
+
await interactionContext.cancelActiveActivity();
|
|
13306
|
+
}
|
|
13307
|
+
}));
|
|
13308
|
+
const result = new Promise((resolve, reject) => {
|
|
13309
|
+
// HACK: afterViewInit won't have been called yet. Need to add when(interactionContext.ready).becomesTruthy(...)
|
|
13310
|
+
setTimeout(() => {
|
|
13311
|
+
interactionContext.startActivity(activityType, data)
|
|
13312
|
+
.then(resolve)
|
|
13313
|
+
.catch(reject)
|
|
13314
|
+
.finally(() => {
|
|
13315
|
+
subs.forEach(s => s.unsubscribe());
|
|
13316
|
+
overlayRef.dispose();
|
|
13317
|
+
});
|
|
13318
|
+
setTimeout(() => {
|
|
13319
|
+
overlayRef.updatePosition();
|
|
13320
|
+
});
|
|
13321
|
+
});
|
|
13322
|
+
});
|
|
13323
|
+
return { interactionContext, result };
|
|
13324
|
+
}
|
|
13325
|
+
|
|
13104
13326
|
/**
|
|
13105
13327
|
* <aup-popup-interaction-context #ctx></aup-popup-interaction-context>
|
|
13106
13328
|
*
|
|
@@ -13119,7 +13341,6 @@ class PopupInteractionContextComponent extends DisposableComponent {
|
|
|
13119
13341
|
get active() {
|
|
13120
13342
|
return this.isActive();
|
|
13121
13343
|
}
|
|
13122
|
-
outputPortal = new ComponentPortal(InPlaceInteractionContextComponent);
|
|
13123
13344
|
anchorX = 'start';
|
|
13124
13345
|
anchorY = 'bottom';
|
|
13125
13346
|
#cancelOnEscape$_accessor_storage = proxify((ValueModel));
|
|
@@ -13135,52 +13356,15 @@ class PopupInteractionContextComponent extends DisposableComponent {
|
|
|
13135
13356
|
this.scrollContainers = scrollable ? [scrollable] : [];
|
|
13136
13357
|
}
|
|
13137
13358
|
startActivity(activityType, data) {
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
const overlayRef = this._overlay.create({
|
|
13141
|
-
hasBackdrop: true,
|
|
13142
|
-
backdropClass: "popup-interaction-context-backdrop",
|
|
13143
|
-
disposeOnNavigation: true,
|
|
13144
|
-
panelClass: 'aup-popup-interaction-panel',
|
|
13145
|
-
positionStrategy: this._overlay.position()
|
|
13146
|
-
.flexibleConnectedTo(this._element)
|
|
13147
|
-
.withPush(true)
|
|
13148
|
-
.withPositions(this.computePositions())
|
|
13149
|
-
.withGrowAfterOpen(true)
|
|
13150
|
-
.withScrollableContainers(self.scrollContainers) // this isn't working. sigh.
|
|
13151
|
-
});
|
|
13152
|
-
const cancelEverything = async () => {
|
|
13153
|
-
do {
|
|
13154
|
-
// noop
|
|
13155
|
-
} while (await this.interactionContext.cancelActiveActivity());
|
|
13156
|
-
};
|
|
13157
|
-
const subs = this.scrollContainers.map(sc => sc.elementScrolled().subscribe(() => {
|
|
13158
|
-
overlayRef.updatePosition();
|
|
13159
|
-
})).concat(overlayRef.backdropClick().subscribe(cancelEverything))
|
|
13160
|
-
.concat(overlayRef.keydownEvents().subscribe(async (event) => {
|
|
13359
|
+
const popup = startActivityInPopup(this._overlay, this._element, {
|
|
13360
|
+
positions: this.computePositions(),
|
|
13161
13361
|
// An unbound `cancelOnEscape` leaves its model without a value: the `true` it declares is not stored there.
|
|
13162
13362
|
// The check used to read that as false, so Esc closed no popup unless its caller bound the input.
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
this.interactionContext = componentRef.instance;
|
|
13169
|
-
return new Promise((resolve, reject) => {
|
|
13170
|
-
// HACK: afterViewInit won't have been called yet. Need to add when(interactionContext.ready).becomesTruthy(...)
|
|
13171
|
-
setTimeout(() => {
|
|
13172
|
-
this.interactionContext.startActivity(activityType, data)
|
|
13173
|
-
.then(resolve)
|
|
13174
|
-
.catch(reject)
|
|
13175
|
-
.finally(() => {
|
|
13176
|
-
subs.forEach(s => s.unsubscribe());
|
|
13177
|
-
overlayRef.dispose();
|
|
13178
|
-
});
|
|
13179
|
-
setTimeout(() => {
|
|
13180
|
-
overlayRef.updatePosition();
|
|
13181
|
-
});
|
|
13182
|
-
});
|
|
13183
|
-
});
|
|
13363
|
+
cancelOnEscape: () => this.cancelOnEscape$.value ?? true,
|
|
13364
|
+
scrollContainers: this.scrollContainers
|
|
13365
|
+
}, activityType, data);
|
|
13366
|
+
this.interactionContext = popup.interactionContext;
|
|
13367
|
+
return popup.result;
|
|
13184
13368
|
}
|
|
13185
13369
|
computePositions() {
|
|
13186
13370
|
const overlayX = this.anchorX === 'start' ? 'start' : 'end';
|
|
@@ -13300,7 +13484,7 @@ class AddCardActivityComponent extends AbstractActivityTriggerComponent {
|
|
|
13300
13484
|
return this.interactionStyle === 'inline';
|
|
13301
13485
|
}
|
|
13302
13486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AddCardActivityComponent, deps: [{ token: InteractionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13303
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AddCardActivityComponent, selector: "aup-add-card-activity", inputs: { interactionStyle: "interactionStyle", renderAs: "renderAs" }, host: { properties: { "class": "this.activityTypeClass", "class.not-card": "this.notCard" } }, viewQueries: [{ propertyName: "inlineInteractionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [face$]=\"face$\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=inline][renderas=card]:not(.active):hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=inline][renderas=card]:not(.active):hover{border-color:transparent;background-color:#fff;color:#0000008a}:host[interactionStyle=modal][renderas=card]{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=modal][renderas=card]:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=modal][renderas=card]:hover{border-color:transparent;background-color:#fff;color:#0000008a}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "component", type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AddCardActivityComponent, selector: "aup-add-card-activity", inputs: { interactionStyle: "interactionStyle", renderAs: "renderAs" }, host: { properties: { "class": "this.activityTypeClass", "class.not-card": "this.notCard" } }, viewQueries: [{ propertyName: "inlineInteractionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [face$]=\"face$\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n", styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=inline][renderas=card]:not(.active):hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=inline][renderas=card]:not(.active):hover{border-color:transparent;background-color:#fff;color:#0000008a}:host[interactionStyle=modal][renderas=card]{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:#0000008a;background-color:#fffc}:host[interactionStyle=modal][renderas=card]:hover{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}:host[interactionStyle=modal][renderas=card]:hover{border-color:transparent;background-color:#fff;color:#0000008a}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "component", type: CommandFaceComponent, selector: "aup-command-face", inputs: ["faces", "face", "ignoreIcon", "ignoreText", "includeMissingIconInLayout"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["opensChoicesAs", "animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13304
13488
|
}
|
|
13305
13489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AddCardActivityComponent, decorators: [{
|
|
13306
13490
|
type: Component,
|
|
@@ -13376,7 +13560,7 @@ class AddItemInteractionContextComponent extends DisposableComponent {
|
|
|
13376
13560
|
return this.interactionContext.startActivity(activityType, data);
|
|
13377
13561
|
}
|
|
13378
13562
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AddItemInteractionContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AddItemInteractionContextComponent, selector: "aup-add-item-interaction-context", inputs: { label: "label", icon: "icon", activityClass: "activityClass", activityData: "activityData", addCommand: "addCommand" }, host: { properties: { "class.interaction-active": "this.active", "tabindex": "this.tabindex" } }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><aup-icon [icon]=\"icon\"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n", styles: [":host{--def-link-color: var(--link-color, currentColor);--def-link-color-hover: var(--link-color-hover, currentColor);--def-link-background: var(--link-background, transparent);--def-link-background-hover: var(--link-background-hover, rgba(0, 0, 0, .05));--def-link-border-radius: var(--link-border-radius, 4px);--def-link-padding: var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:none}:host:hover a.link{color:var(--def-link-color-hover);background-color:var(--def-link-background-hover)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-background);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AddItemInteractionContextComponent, selector: "aup-add-item-interaction-context", inputs: { label: "label", icon: "icon", activityClass: "activityClass", activityData: "activityData", addCommand: "addCommand" }, host: { properties: { "class.interaction-active": "this.active", "tabindex": "this.tabindex" } }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><aup-icon [icon]=\"icon\"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n", styles: [":host{--def-link-color: var(--link-color, currentColor);--def-link-color-hover: var(--link-color-hover, currentColor);--def-link-background: var(--link-background, transparent);--def-link-background-hover: var(--link-background-hover, rgba(0, 0, 0, .05));--def-link-border-radius: var(--link-border-radius, 4px);--def-link-padding: var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:none}:host:hover a.link{color:var(--def-link-color-hover);background-color:var(--def-link-background-hover)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-background);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter", "preventDefault"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["opensChoicesAs", "animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13380
13564
|
}
|
|
13381
13565
|
__decorate([
|
|
13382
13566
|
Proxify(),
|
|
@@ -13746,7 +13930,7 @@ class InlineStringEditorComponent extends DisposableComponent {
|
|
|
13746
13930
|
return !this.editingEnabled$.value;
|
|
13747
13931
|
}
|
|
13748
13932
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InlineStringEditorComponent, deps: [{ token: InteractionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13749
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InlineStringEditorComponent, selector: "aup-inline-string-editor", inputs: { editorModel: "editorModel", facesModel: "facesModel", faces: "faces", label: "label", placeHolder: "placeHolder", placeHolder$: "placeHolder$" }, host: { properties: { "class.disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled$.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled$.value\" [command]=\"editCommand\" [face$]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "directive", type: i2$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13933
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: InlineStringEditorComponent, selector: "aup-inline-string-editor", inputs: { editorModel: "editorModel", facesModel: "facesModel", faces: "faces", label: "label", placeHolder: "placeHolder", placeHolder$: "placeHolder$" }, host: { properties: { "class.disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "interactionContext", first: true, predicate: InPlaceInteractionContextComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled$.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors()\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled$.value\" [command]=\"editCommand\" [face$]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "directive", type: i2$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: InPlaceInteractionContextComponent, selector: "aup-in-place-interaction-context", inputs: ["opensChoicesAs", "animateFirstActivity", "syncWithRoutes"], outputs: ["started", "finished"] }] });
|
|
13750
13934
|
}
|
|
13751
13935
|
__decorate([
|
|
13752
13936
|
Proxify(),
|
|
@@ -13804,6 +13988,223 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
13804
13988
|
};
|
|
13805
13989
|
})(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
|
|
13806
13990
|
|
|
13991
|
+
/**
|
|
13992
|
+
* A choice's options as a list to choose one from, drawn with `mat-option`s so it looks and reads as a select's panel
|
|
13993
|
+
* does: the chosen option tinted and checked, an optional icon before each label and an optional count after it.
|
|
13994
|
+
* Choosing one finishes the activity with it, or with undefined for the nil option. Started over another activity it
|
|
13995
|
+
* slides in over it, under a title whose Back leaves it. In a popup of its own it has no title and is as wide as its
|
|
13996
|
+
* options, as a select's panel is, and Esc or a click outside closes it. As in a select's panel,
|
|
13997
|
+
* focus stays on the list while the arrow keys, Home, End and typing a label's start move between the options, and
|
|
13998
|
+
* Enter or Space chooses one.
|
|
13999
|
+
*
|
|
14000
|
+
* `SelectOptionList` starts it; `aup-select-input opens="list"` is the usual way in.
|
|
14001
|
+
*
|
|
14002
|
+
* Styling hook: `--aup-option-list-width`, its width over another activity. In a bottom sheet it takes the sheet's
|
|
14003
|
+
* width.
|
|
14004
|
+
*/
|
|
14005
|
+
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
14006
|
+
class OptionListActivity extends Activity {
|
|
14007
|
+
static DEFAULT_BACK_FACE = { icon: () => 'mat:arrow_back', tooltip: () => 'Back' };
|
|
14008
|
+
defaults = inject(OPTION_LIST_DEFAULTS, { optional: true });
|
|
14009
|
+
/** The list's own words, else the app's (`OPTION_LIST_DEFAULTS`), else English. */
|
|
14010
|
+
searchPlaceholder = this.activityData.searchPlaceholder ?? this.defaults?.searchPlaceholder ?? 'Search…';
|
|
14011
|
+
noResultsText = this.activityData.noResultsText ?? this.defaults?.noResultsText ?? 'No matches';
|
|
14012
|
+
ownPopup = !this.activityData.nested;
|
|
14013
|
+
leaveCommand;
|
|
14014
|
+
counts$;
|
|
14015
|
+
searchText$ = new MutableValueModel('');
|
|
14016
|
+
rows$;
|
|
14017
|
+
/** Whether any option has an icon, so that every label starts in line, the ones without an icon included. */
|
|
14018
|
+
withIcons;
|
|
14019
|
+
options;
|
|
14020
|
+
optionElements;
|
|
14021
|
+
listbox;
|
|
14022
|
+
searchInput;
|
|
14023
|
+
keyManager;
|
|
14024
|
+
constructor() {
|
|
14025
|
+
super();
|
|
14026
|
+
const { chain } = Dsl.disposeWith(this);
|
|
14027
|
+
const data = this.activityData;
|
|
14028
|
+
this.counts$ = data.counts$ ?? new MutableValueModel(undefined);
|
|
14029
|
+
this.withIcons = !!data.optionIcon && data.options.some(option => data.optionIcon?.(option));
|
|
14030
|
+
const allRows = this.buildRows();
|
|
14031
|
+
this.rows$ = chain(this.searchText$).map(text => this.matching(allRows, text));
|
|
14032
|
+
this.viewStateDependsOn(this.counts$, this.rows$);
|
|
14033
|
+
this.cancelCommand = Command.create(() => this.cancel());
|
|
14034
|
+
this.leaveCommand = Command.create(() => this.cancel())
|
|
14035
|
+
.withFace(data.backFace ?? this.defaults?.backFace ?? OptionListActivity.DEFAULT_BACK_FACE);
|
|
14036
|
+
this.onActivityReady(() => this.focusFirst());
|
|
14037
|
+
}
|
|
14038
|
+
ngAfterViewInit() {
|
|
14039
|
+
this.keyManager = new ActiveDescendantKeyManager(this.options).withVerticalOrientation().withHomeAndEnd().withTypeAhead();
|
|
14040
|
+
this.keyManager.change.subscribe(index => this.optionElements.get(index)?.nativeElement.scrollIntoView({ block: 'nearest' }));
|
|
14041
|
+
this.markChosen();
|
|
14042
|
+
this.registerDisposable({ dispose: () => this.keyManager?.destroy() });
|
|
14043
|
+
const changes = this.options.changes.subscribe(() => this.markChosen());
|
|
14044
|
+
this.registerDisposable({ dispose: () => changes.unsubscribe() });
|
|
14045
|
+
if (this.ready$.value) {
|
|
14046
|
+
this.focusFirst();
|
|
14047
|
+
}
|
|
14048
|
+
}
|
|
14049
|
+
onSelectionChange(event) {
|
|
14050
|
+
if (event.isUserInput) {
|
|
14051
|
+
this.done(event.source.value.option);
|
|
14052
|
+
}
|
|
14053
|
+
}
|
|
14054
|
+
count(row) {
|
|
14055
|
+
return row.index === undefined ? undefined : this.counts$.value?.[row.index];
|
|
14056
|
+
}
|
|
14057
|
+
onSearchInput(event) {
|
|
14058
|
+
this.searchText$.value = event.target.value;
|
|
14059
|
+
}
|
|
14060
|
+
/** Down moves from the search box into the list, and Enter chooses the first match. */
|
|
14061
|
+
onSearchKeydown(event) {
|
|
14062
|
+
if (event.key === 'ArrowDown') {
|
|
14063
|
+
event.preventDefault();
|
|
14064
|
+
this.listbox.nativeElement.focus();
|
|
14065
|
+
this.keyManager?.setFirstItemActive();
|
|
14066
|
+
}
|
|
14067
|
+
else if (event.key === 'Enter') {
|
|
14068
|
+
event.preventDefault();
|
|
14069
|
+
const first = this.rows$.value[0];
|
|
14070
|
+
if (first) {
|
|
14071
|
+
this.done(first.option);
|
|
14072
|
+
}
|
|
14073
|
+
}
|
|
14074
|
+
}
|
|
14075
|
+
/** Up from the first option goes back to the search box, where there is one. */
|
|
14076
|
+
onListKeydown(event) {
|
|
14077
|
+
if (event.key === 'ArrowUp' && this.keyManager?.activeItemIndex === 0 && this.searchInput) {
|
|
14078
|
+
event.preventDefault();
|
|
14079
|
+
this.keyManager.setActiveItem(-1);
|
|
14080
|
+
this.searchInput.nativeElement.focus();
|
|
14081
|
+
}
|
|
14082
|
+
else if ((event.key === 'Enter' || event.key === ' ') && this.keyManager?.activeItem) {
|
|
14083
|
+
event.preventDefault();
|
|
14084
|
+
this.done(this.keyManager.activeItem.value.option);
|
|
14085
|
+
}
|
|
14086
|
+
else {
|
|
14087
|
+
this.keyManager?.onKeydown(event);
|
|
14088
|
+
}
|
|
14089
|
+
}
|
|
14090
|
+
trackRow = (index, row) => row.index ?? -1;
|
|
14091
|
+
/** The chosen option is selected as a select's is, which tints and checks it. Searching rebuilds the options. */
|
|
14092
|
+
markChosen() {
|
|
14093
|
+
this.options.forEach(option => option.value.chosen ? option.select(false) : option.deselect(false));
|
|
14094
|
+
}
|
|
14095
|
+
/** The search box when there is one, else the list on its chosen option, else on its first. */
|
|
14096
|
+
focusFirst() {
|
|
14097
|
+
if (!this.keyManager) {
|
|
14098
|
+
return;
|
|
14099
|
+
}
|
|
14100
|
+
if (this.searchInput) {
|
|
14101
|
+
this.searchInput.nativeElement.focus();
|
|
14102
|
+
return;
|
|
14103
|
+
}
|
|
14104
|
+
this.listbox.nativeElement.focus();
|
|
14105
|
+
const chosen = this.rows$.value.findIndex(row => row.chosen);
|
|
14106
|
+
this.keyManager.setActiveItem(Math.max(chosen, 0));
|
|
14107
|
+
}
|
|
14108
|
+
buildRows() {
|
|
14109
|
+
const data = this.activityData;
|
|
14110
|
+
const identityOf = data.identityOf ?? ((option) => option);
|
|
14111
|
+
const chosenId = isNil(data.value) ? undefined : identityOf(data.value);
|
|
14112
|
+
const rows = data.options.map((option, index) => ({
|
|
14113
|
+
option,
|
|
14114
|
+
index,
|
|
14115
|
+
label: data.optionLabelFormat(option),
|
|
14116
|
+
icon: data.optionIcon?.(option),
|
|
14117
|
+
chosen: !isNil(chosenId) && identityOf(option) === chosenId
|
|
14118
|
+
}));
|
|
14119
|
+
if (!isNil(data.nilLabel)) {
|
|
14120
|
+
rows.unshift({ option: undefined, label: data.nilLabel, chosen: isNil(chosenId) });
|
|
14121
|
+
}
|
|
14122
|
+
return rows;
|
|
14123
|
+
}
|
|
14124
|
+
/** The nil option is choosing nothing rather than one of the options, so a search never hides it. */
|
|
14125
|
+
matching(rows, text) {
|
|
14126
|
+
const needle = text.trim().toLowerCase();
|
|
14127
|
+
return needle ? rows.filter(row => row.index === undefined || row.label.toLowerCase().includes(needle)) : rows;
|
|
14128
|
+
}
|
|
14129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: OptionListActivity, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14130
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: OptionListActivity, selector: "aup-option-list-activity", host: { properties: { "class.aup-option-list--own-popup": "this.ownPopup" } }, viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionElements", predicate: MatOption, descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<!-- A popup of its own reads as a select's panel, with no title: Esc or a click outside closes it. Over another\n activity its title holds the way back. -->\n<aup-activity-title *ngIf=\"activityData.nested\">\n <aup-command [command]=\"leaveCommand\" data-cy=\"back\"></aup-command>\n {{ activityData.title }}\n</aup-activity-title>\n<aup-activity-body [fullWidth]=\"true\">\n <div *ngIf=\"activityData.searchable\" class=\"search\">\n <aup-icon icon=\"mat:search\"></aup-icon>\n <input #searchInput type=\"text\" autocomplete=\"off\" data-cy=\"option-list-search\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\">\n </div>\n <div #listbox class=\"options\" role=\"listbox\" tabindex=\"0\" data-cy=\"option-list\"\n [attr.aria-label]=\"activityData.title\"\n [attr.aria-activedescendant]=\"keyManager?.activeItem?.id\"\n (keydown)=\"onListKeydown($event)\">\n <mat-option *ngFor=\"let row of rows$.value; trackBy: trackRow\" [value]=\"row\" data-cy=\"option\"\n (onSelectionChange)=\"onSelectionChange($event)\">\n <span class=\"option\">\n <span *ngIf=\"withIcons\" class=\"icon\"><aup-icon *ngIf=\"row.icon\" [icon]=\"row.icon\"></aup-icon></span>\n <span class=\"label\" data-cy=\"label\">{{ row.label }}</span>\n <span *ngIf=\"count(row) !== undefined\" class=\"count\" [class.zero]=\"count(row) === 0\" data-cy=\"count\">{{ count(row) }}</span>\n </span>\n </mat-option>\n </div>\n <div *ngIf=\"!rows$.value.length\" class=\"no-results\" data-cy=\"option-list-no-results\">{{ noResultsText }}</div>\n</aup-activity-body>\n", styles: [":host{display:block;width:var(--aup-option-list-width, 22rem);max-width:calc(100vw - 32px);--aup-activity-padding-top: 0;--aup-activity-padding-bottom: 0}:host(.aup-option-list--own-popup){width:auto;min-width:12rem}:host-context(.bottom-sheet-interaction-context){width:auto;max-width:none}.search{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid rgba(0,0,0,.12)}.search input{flex:1;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.options{padding:8px 0;outline:none}:host ::ng-deep .mat-mdc-option .mdc-list-item__primary-text{flex:1}.option{display:flex;align-items:center;gap:16px}.icon{flex:none;display:flex;width:24px;opacity:.7}.label{flex:1;min-width:0}.count{flex:none;font-size:.85em;opacity:.7}.count.zero{opacity:.4}.no-results{padding:8px 16px;opacity:.6;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace", "density", "fill", "labelOverflow"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: ActivityTitleComponent, selector: "aup-activity-title", inputs: ["hasTransparentBackground", "color"] }, { kind: "component", type: ActivityBodyComponent, selector: "aup-activity-body", inputs: ["fullWidth", "fullHeight", "scroll"] }] });
|
|
14131
|
+
}
|
|
14132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: OptionListActivity, decorators: [{
|
|
14133
|
+
type: Component,
|
|
14134
|
+
args: [{ selector: 'aup-option-list-activity', template: "<!-- A popup of its own reads as a select's panel, with no title: Esc or a click outside closes it. Over another\n activity its title holds the way back. -->\n<aup-activity-title *ngIf=\"activityData.nested\">\n <aup-command [command]=\"leaveCommand\" data-cy=\"back\"></aup-command>\n {{ activityData.title }}\n</aup-activity-title>\n<aup-activity-body [fullWidth]=\"true\">\n <div *ngIf=\"activityData.searchable\" class=\"search\">\n <aup-icon icon=\"mat:search\"></aup-icon>\n <input #searchInput type=\"text\" autocomplete=\"off\" data-cy=\"option-list-search\"\n [placeholder]=\"searchPlaceholder\"\n [attr.aria-label]=\"searchPlaceholder\"\n [value]=\"searchText$.value\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\">\n </div>\n <div #listbox class=\"options\" role=\"listbox\" tabindex=\"0\" data-cy=\"option-list\"\n [attr.aria-label]=\"activityData.title\"\n [attr.aria-activedescendant]=\"keyManager?.activeItem?.id\"\n (keydown)=\"onListKeydown($event)\">\n <mat-option *ngFor=\"let row of rows$.value; trackBy: trackRow\" [value]=\"row\" data-cy=\"option\"\n (onSelectionChange)=\"onSelectionChange($event)\">\n <span class=\"option\">\n <span *ngIf=\"withIcons\" class=\"icon\"><aup-icon *ngIf=\"row.icon\" [icon]=\"row.icon\"></aup-icon></span>\n <span class=\"label\" data-cy=\"label\">{{ row.label }}</span>\n <span *ngIf=\"count(row) !== undefined\" class=\"count\" [class.zero]=\"count(row) === 0\" data-cy=\"count\">{{ count(row) }}</span>\n </span>\n </mat-option>\n </div>\n <div *ngIf=\"!rows$.value.length\" class=\"no-results\" data-cy=\"option-list-no-results\">{{ noResultsText }}</div>\n</aup-activity-body>\n", styles: [":host{display:block;width:var(--aup-option-list-width, 22rem);max-width:calc(100vw - 32px);--aup-activity-padding-top: 0;--aup-activity-padding-bottom: 0}:host(.aup-option-list--own-popup){width:auto;min-width:12rem}:host-context(.bottom-sheet-interaction-context){width:auto;max-width:none}.search{display:flex;align-items:center;gap:8px;padding:8px 16px;border-bottom:1px solid rgba(0,0,0,.12)}.search input{flex:1;min-width:0;border:none;outline:none;background:transparent;font:inherit;color:inherit}.options{padding:8px 0;outline:none}:host ::ng-deep .mat-mdc-option .mdc-list-item__primary-text{flex:1}.option{display:flex;align-items:center;gap:16px}.icon{flex:none;display:flex;width:24px;opacity:.7}.label{flex:1;min-width:0}.count{flex:none;font-size:.85em;opacity:.7}.count.zero{opacity:.4}.no-results{padding:8px 16px;opacity:.6;font-style:italic}\n"] }]
|
|
14135
|
+
}], ctorParameters: function () { return []; }, propDecorators: { ownPopup: [{
|
|
14136
|
+
type: HostBinding,
|
|
14137
|
+
args: ['class.aup-option-list--own-popup']
|
|
14138
|
+
}], options: [{
|
|
14139
|
+
type: ViewChildren,
|
|
14140
|
+
args: [MatOption]
|
|
14141
|
+
}], optionElements: [{
|
|
14142
|
+
type: ViewChildren,
|
|
14143
|
+
args: [MatOption, { read: ElementRef }]
|
|
14144
|
+
}], listbox: [{
|
|
14145
|
+
type: ViewChild,
|
|
14146
|
+
args: ['listbox', { static: true }]
|
|
14147
|
+
}], searchInput: [{
|
|
14148
|
+
type: ViewChild,
|
|
14149
|
+
args: ['searchInput']
|
|
14150
|
+
}] } });
|
|
14151
|
+
|
|
14152
|
+
/** `SelectOptionList` as `InteractionModule` provides it: an `aup-option-list-activity`. */
|
|
14153
|
+
class ActivitySelectOptionList extends SelectOptionList {
|
|
14154
|
+
/** Under the chooser, or over it where there is no room below. */
|
|
14155
|
+
static POSITIONS = [
|
|
14156
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
14157
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }
|
|
14158
|
+
];
|
|
14159
|
+
overlay = inject(Overlay);
|
|
14160
|
+
opensAsList(injector) {
|
|
14161
|
+
return ActivitySelectOptionList.nestedIn(injector) !== undefined;
|
|
14162
|
+
}
|
|
14163
|
+
async open(request) {
|
|
14164
|
+
const { origin, injector, ...list } = request;
|
|
14165
|
+
const activityType = OptionListActivity;
|
|
14166
|
+
const nestedIn = ActivitySelectOptionList.nestedIn(injector);
|
|
14167
|
+
const focused = document.activeElement;
|
|
14168
|
+
try {
|
|
14169
|
+
if (nestedIn) {
|
|
14170
|
+
return await nestedIn.startActivity(activityType, { ...list, nested: true });
|
|
14171
|
+
}
|
|
14172
|
+
return await startActivityInPopup(this.overlay, origin, {
|
|
14173
|
+
positions: ActivitySelectOptionList.POSITIONS,
|
|
14174
|
+
cancelOnEscape: () => true
|
|
14175
|
+
}, activityType, { ...list, nested: false }).result;
|
|
14176
|
+
}
|
|
14177
|
+
finally {
|
|
14178
|
+
if (focused) {
|
|
14179
|
+
ActivitySelectOptionList.returnFocus(focused);
|
|
14180
|
+
}
|
|
14181
|
+
}
|
|
14182
|
+
}
|
|
14183
|
+
/** The context the chooser is drawn in, where its choices open as a list (`InteractionContext.opensChoicesAs`). */
|
|
14184
|
+
static nestedIn(injector) {
|
|
14185
|
+
const context = injector.get(INTERACTION_CONTEXT, null);
|
|
14186
|
+
return context?.opensChoicesAs === 'list' ? context : undefined;
|
|
14187
|
+
}
|
|
14188
|
+
/**
|
|
14189
|
+
* A list over an activity takes that activity out of the page until the list has slid away, and the activity stays
|
|
14190
|
+
* hidden while it slides back. Focusing the chooser then does nothing, so it is tried again each frame, for up to a
|
|
14191
|
+
* second, while focus is nowhere or still in the list going away. Once anything else has focus, it is left there.
|
|
14192
|
+
*/
|
|
14193
|
+
static returnFocus(element, framesLeft = 60) {
|
|
14194
|
+
element.focus();
|
|
14195
|
+
const active = document.activeElement;
|
|
14196
|
+
const adrift = !active || active === document.body || !!active.closest('aup-option-list-activity');
|
|
14197
|
+
if (active !== element && adrift && framesLeft > 0) {
|
|
14198
|
+
requestAnimationFrame(() => ActivitySelectOptionList.returnFocus(element, framesLeft - 1));
|
|
14199
|
+
}
|
|
14200
|
+
}
|
|
14201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivitySelectOptionList, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
14202
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivitySelectOptionList });
|
|
14203
|
+
}
|
|
14204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: ActivitySelectOptionList, decorators: [{
|
|
14205
|
+
type: Injectable
|
|
14206
|
+
}] });
|
|
14207
|
+
|
|
13807
14208
|
// eslint-disable-next-line @angular-eslint/component-class-suffix
|
|
13808
14209
|
class SelectInputActivity extends InputActivity {
|
|
13809
14210
|
defaultOptionLabelFormat = (option) => {
|
|
@@ -13840,7 +14241,7 @@ class SelectInputActivity extends InputActivity {
|
|
|
13840
14241
|
[confirmFace]="confirmFace"
|
|
13841
14242
|
[cancelFace]="cancelFace"
|
|
13842
14243
|
></aup-activity-actions>
|
|
13843
|
-
`, isInline: true, styles: [":host{--activity-actions-gap: 0}:host .aup-input-component{flex:1}:host[layout=inline]{padding-right:0}:host[layout=block]{padding-bottom:0}\n"], dependencies: [{ kind: "component", type: SelectInputComponent, selector: "aup-select-input", inputs: ["options$", "options", "optionLabel", "allowNil$", "allowNil", "appearance", "optionLabelFormat", "searchable", "searchPlaceholder", "noResultsText", "searchText$", "optionSearchText", "filterFactory"] }, { kind: "component", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: ["confirmCommand", "cancelCommand", "faces", "confirmFace", "cancelFace", "style", "layout", "align", "alignContent"] }] });
|
|
14244
|
+
`, isInline: true, styles: [":host{--activity-actions-gap: 0}:host .aup-input-component{flex:1}:host[layout=inline]{padding-right:0}:host[layout=block]{padding-bottom:0}\n"], dependencies: [{ kind: "component", type: SelectInputComponent, selector: "aup-select-input", inputs: ["options$", "options", "optionLabel", "allowNil$", "allowNil", "appearance", "opens", "listTitle", "optionIcon", "optionCounts", "optionLabelFormat", "searchable", "searchPlaceholder", "noResultsText", "searchText$", "optionSearchText", "filterFactory"] }, { kind: "component", type: ActivityActionsComponent, selector: "aup-activity-actions", inputs: ["confirmCommand", "cancelCommand", "faces", "confirmFace", "cancelFace", "style", "layout", "align", "alignContent"] }] });
|
|
13844
14245
|
}
|
|
13845
14246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SelectInputActivity, decorators: [{
|
|
13846
14247
|
type: Component,
|
|
@@ -13938,6 +14339,17 @@ const cssDurationRegex = /(\d+)(m?s)/;
|
|
|
13938
14339
|
class SlideDownInteractionContextComponent extends DisposableComponent {
|
|
13939
14340
|
tabConfig;
|
|
13940
14341
|
activityContainerComponent;
|
|
14342
|
+
_opensChoicesAs = 'panel';
|
|
14343
|
+
/** How choices drawn in its activities open (see `InteractionContext.opensChoicesAs`); a page's are a `panel`. */
|
|
14344
|
+
set opensChoicesAs(opensChoicesAs) {
|
|
14345
|
+
this._opensChoicesAs = opensChoicesAs;
|
|
14346
|
+
if (this.activityContainerComponent) {
|
|
14347
|
+
this.activityContainerComponent.opensChoicesAs = opensChoicesAs;
|
|
14348
|
+
}
|
|
14349
|
+
}
|
|
14350
|
+
get opensChoicesAs() {
|
|
14351
|
+
return this._opensChoicesAs;
|
|
14352
|
+
}
|
|
13941
14353
|
// NOTE: disabling this as I'm using the initialise callback to release the hacky height clamp.
|
|
13942
14354
|
// The whole registration thing is a bit naf so I should really clean that up at some point.
|
|
13943
14355
|
// /**
|
|
@@ -13959,6 +14371,7 @@ class SlideDownInteractionContextComponent extends DisposableComponent {
|
|
|
13959
14371
|
this.tabConfig = tabConfig;
|
|
13960
14372
|
}
|
|
13961
14373
|
ngAfterViewInit() {
|
|
14374
|
+
this.activityContainerComponent.opensChoicesAs = this._opensChoicesAs;
|
|
13962
14375
|
// NOTE: this is a temp work around to detach inplace contexts from the router until AUP-88 is implemented.
|
|
13963
14376
|
// https://coolon.atlassian.net/browse/AUP-88?atlOrigin=eyJpIjoiOTg5YjEzZGUzZjRmNDg0NmExOWU3ZGJmMzJiNTRmNGYiLCJwIjoiaiJ9
|
|
13964
14377
|
const self = this;
|
|
@@ -14019,7 +14432,7 @@ class SlideDownInteractionContextComponent extends DisposableComponent {
|
|
|
14019
14432
|
}
|
|
14020
14433
|
}
|
|
14021
14434
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SlideDownInteractionContextComponent, deps: [{ token: MAT_TABS_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
14022
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SlideDownInteractionContextComponent, selector: "aup-slide-down-interaction-context", inputs: { dynamicHeight: "dynamicHeight" }, host: { properties: { "class.active": "this.active" } }, providers: [
|
|
14435
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SlideDownInteractionContextComponent, selector: "aup-slide-down-interaction-context", inputs: { opensChoicesAs: "opensChoicesAs", dynamicHeight: "dynamicHeight" }, host: { properties: { "class.active": "this.active" } }, providers: [
|
|
14023
14436
|
{ provide: INTERACTION_CONTEXT, useExisting: SlideDownInteractionContextComponent }
|
|
14024
14437
|
], viewQueries: [{ propertyName: "activityContainerComponent", first: true, predicate: ["activityContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div [@slideDownWhenOpen]=\"getAnimationState()\" (@slideDownWhenOpen.done)=\"onAnimationDone()\" [style.max-height.px]=\"clampShut ? 0 : undefined\">\n <aup-activity-container #activityContainer [dynamicHeight]=\"dynamicHeight\"></aup-activity-container>\n</div>\n\n", styles: [":host{display:flex;flex-direction:column}:host>div{overflow:hidden}\n"], dependencies: [{ kind: "component", type: ActivityContainerComponent, selector: "aup-activity-container", inputs: ["dynamicHeight", "animationDuration"] }], animations: [
|
|
14025
14438
|
slideDownWhenOpenAnimation
|
|
@@ -14040,6 +14453,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14040
14453
|
}] }]; }, propDecorators: { activityContainerComponent: [{
|
|
14041
14454
|
type: ViewChild,
|
|
14042
14455
|
args: ["activityContainer", { static: true }]
|
|
14456
|
+
}], opensChoicesAs: [{
|
|
14457
|
+
type: Input
|
|
14043
14458
|
}], dynamicHeight: [{
|
|
14044
14459
|
type: Input
|
|
14045
14460
|
}], active: [{
|
|
@@ -14135,6 +14550,7 @@ class InteractionModule {
|
|
|
14135
14550
|
PopupInteractionContextComponent,
|
|
14136
14551
|
StringInputActivity,
|
|
14137
14552
|
SelectInputActivity,
|
|
14553
|
+
OptionListActivity,
|
|
14138
14554
|
InputActivity,
|
|
14139
14555
|
InteractionContextTriggerForDirective,
|
|
14140
14556
|
Activity,
|
|
@@ -14163,7 +14579,8 @@ class InteractionModule {
|
|
|
14163
14579
|
FormsModule,
|
|
14164
14580
|
MatInputModule,
|
|
14165
14581
|
MatFormFieldModule,
|
|
14166
|
-
A11yModule
|
|
14582
|
+
A11yModule,
|
|
14583
|
+
MatOptionModule], exports: [ActivityContainerComponent,
|
|
14167
14584
|
ActivityOutletComponent,
|
|
14168
14585
|
ActivityTitleComponent,
|
|
14169
14586
|
InPlaceInteractionContextComponent,
|
|
@@ -14173,6 +14590,7 @@ class InteractionModule {
|
|
|
14173
14590
|
InteractionContextTriggerForDirective,
|
|
14174
14591
|
StringInputActivity,
|
|
14175
14592
|
SelectInputActivity,
|
|
14593
|
+
OptionListActivity,
|
|
14176
14594
|
ActivityBodyComponent,
|
|
14177
14595
|
PopupActivityTriggerComponent,
|
|
14178
14596
|
InlineActivityTriggerComponent,
|
|
@@ -14184,6 +14602,7 @@ class InteractionModule {
|
|
|
14184
14602
|
AlertRendererComponent] });
|
|
14185
14603
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InteractionModule, providers: [
|
|
14186
14604
|
InteractionService,
|
|
14605
|
+
{ provide: SelectOptionList, useClass: ActivitySelectOptionList },
|
|
14187
14606
|
// {
|
|
14188
14607
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
14189
14608
|
// }
|
|
@@ -14200,7 +14619,8 @@ class InteractionModule {
|
|
|
14200
14619
|
FormsModule,
|
|
14201
14620
|
MatInputModule,
|
|
14202
14621
|
MatFormFieldModule,
|
|
14203
|
-
A11yModule
|
|
14622
|
+
A11yModule,
|
|
14623
|
+
MatOptionModule] });
|
|
14204
14624
|
}
|
|
14205
14625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: InteractionModule, decorators: [{
|
|
14206
14626
|
type: NgModule,
|
|
@@ -14220,6 +14640,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14220
14640
|
MatInputModule,
|
|
14221
14641
|
MatFormFieldModule,
|
|
14222
14642
|
A11yModule,
|
|
14643
|
+
MatOptionModule,
|
|
14223
14644
|
],
|
|
14224
14645
|
declarations: [
|
|
14225
14646
|
ActivityContainerComponent,
|
|
@@ -14235,6 +14656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14235
14656
|
PopupInteractionContextComponent,
|
|
14236
14657
|
StringInputActivity,
|
|
14237
14658
|
SelectInputActivity,
|
|
14659
|
+
OptionListActivity,
|
|
14238
14660
|
InputActivity,
|
|
14239
14661
|
InteractionContextTriggerForDirective,
|
|
14240
14662
|
Activity,
|
|
@@ -14263,6 +14685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14263
14685
|
InteractionContextTriggerForDirective,
|
|
14264
14686
|
StringInputActivity,
|
|
14265
14687
|
SelectInputActivity,
|
|
14688
|
+
OptionListActivity,
|
|
14266
14689
|
ActivityBodyComponent,
|
|
14267
14690
|
PopupActivityTriggerComponent,
|
|
14268
14691
|
InlineActivityTriggerComponent,
|
|
@@ -14275,6 +14698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14275
14698
|
],
|
|
14276
14699
|
providers: [
|
|
14277
14700
|
InteractionService,
|
|
14701
|
+
{ provide: SelectOptionList, useClass: ActivitySelectOptionList },
|
|
14278
14702
|
// {
|
|
14279
14703
|
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
14280
14704
|
// }
|
|
@@ -15837,6 +16261,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
15837
16261
|
* @file Automatically generated by barrelsby.
|
|
15838
16262
|
*/
|
|
15839
16263
|
|
|
16264
|
+
/**
|
|
16265
|
+
* An interaction context that is another one, chosen afresh at each call. Content that cannot see where it is drawn
|
|
16266
|
+
* reaches the right context through it. Content projected into a component resolves its injections through the
|
|
16267
|
+
* element it is projected into, wherever the component then draws it. So a component that draws its projected content
|
|
16268
|
+
* in an activity of its own, as a filter bar draws its filters in a panel, provides one of these as
|
|
16269
|
+
* `INTERACTION_CONTEXT`, giving that activity's context while it is open and the one around it otherwise.
|
|
16270
|
+
*
|
|
16271
|
+
* Every call is passed on as it is, so the context it reaches keeps its own ways of alerting, confirming and closing.
|
|
16272
|
+
* It owns nothing it passes calls to: disposing it disposes only what was registered with it. With no context to give,
|
|
16273
|
+
* its choices open as a `panel`, it is inactive, and starting anything in it fails.
|
|
16274
|
+
*/
|
|
16275
|
+
class DelegatingInteractionContext {
|
|
16276
|
+
identifier;
|
|
16277
|
+
delegate;
|
|
16278
|
+
garbage = new GarbageCollector();
|
|
16279
|
+
constructor(identifier, delegate) {
|
|
16280
|
+
this.identifier = identifier;
|
|
16281
|
+
this.delegate = delegate;
|
|
16282
|
+
}
|
|
16283
|
+
get opensChoicesAs() {
|
|
16284
|
+
return this.delegate()?.opensChoicesAs ?? 'panel';
|
|
16285
|
+
}
|
|
16286
|
+
isActive() {
|
|
16287
|
+
return this.delegate()?.isActive() ?? false;
|
|
16288
|
+
}
|
|
16289
|
+
startActivity(activityType, data, options) {
|
|
16290
|
+
return this.target().startActivity(activityType, data, options);
|
|
16291
|
+
}
|
|
16292
|
+
cancelActiveActivity() {
|
|
16293
|
+
return this.delegate()?.cancelActiveActivity() ?? Promise.resolve(false);
|
|
16294
|
+
}
|
|
16295
|
+
confirm(confirm) {
|
|
16296
|
+
return this.target().confirm(confirm);
|
|
16297
|
+
}
|
|
16298
|
+
alert(alert) {
|
|
16299
|
+
return this.target().alert(alert);
|
|
16300
|
+
}
|
|
16301
|
+
confirmOrReject(confirm) {
|
|
16302
|
+
return this.target().confirmOrReject(confirm);
|
|
16303
|
+
}
|
|
16304
|
+
confirmThen(confirm, activityType, data) {
|
|
16305
|
+
return this.target().confirmThen(confirm, activityType, data);
|
|
16306
|
+
}
|
|
16307
|
+
confirmThenExecute(confirm, operation) {
|
|
16308
|
+
return this.target().confirmThenExecute(confirm, operation);
|
|
16309
|
+
}
|
|
16310
|
+
registerDisposable(disposable) {
|
|
16311
|
+
return this.garbage.registerDisposable(disposable);
|
|
16312
|
+
}
|
|
16313
|
+
dispose() {
|
|
16314
|
+
this.garbage.dispose();
|
|
16315
|
+
}
|
|
16316
|
+
target() {
|
|
16317
|
+
const target = this.delegate();
|
|
16318
|
+
if (!target) {
|
|
16319
|
+
lang$1.illegalState(`${this.identifier}: there is no interaction context to start an activity in`);
|
|
16320
|
+
}
|
|
16321
|
+
return target;
|
|
16322
|
+
}
|
|
16323
|
+
}
|
|
16324
|
+
|
|
15840
16325
|
/**
|
|
15841
16326
|
* Runs each activity in a modal surface of its own, opened for it and closed when it finishes. Escape
|
|
15842
16327
|
* cancels the activity, and so does a click on the backdrop where the activity allows it. Activities
|
|
@@ -15877,6 +16362,7 @@ class HostedInteractionContext extends AbstractInteractionContext {
|
|
|
15877
16362
|
// opened as this one closes sees this one's afterClosed land before its own afterOpened.
|
|
15878
16363
|
const activityContainer = this.activityContainer = host.activityContainer;
|
|
15879
16364
|
activityContainer.initialise(this.identifier, this.api);
|
|
16365
|
+
activityContainer.opensChoicesAs = this.opensChoicesAs;
|
|
15880
16366
|
const activityResult = activityContainer.startActivity(activityType, data);
|
|
15881
16367
|
// Tear the overlay down the moment the activity completes — decoupled from route sync. The
|
|
15882
16368
|
// route sync still runs (via activityResult / waitActivitiesSynchronised) but can wedge under
|
|
@@ -16074,6 +16560,8 @@ class SheetSwipe {
|
|
|
16074
16560
|
class BottomSheetInteractionContext extends HostedInteractionContext {
|
|
16075
16561
|
bottomSheet;
|
|
16076
16562
|
config;
|
|
16563
|
+
/** A panel dropped from a chooser would float over the sheet, so its choices slide in over it instead. */
|
|
16564
|
+
opensChoicesAs = 'list';
|
|
16077
16565
|
constructor(identifier, api, bottomSheet, config) {
|
|
16078
16566
|
super(identifier, api);
|
|
16079
16567
|
this.bottomSheet = bottomSheet;
|
|
@@ -16853,5 +17341,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
16853
17341
|
* Generated bundle index. Do not edit.
|
|
16854
17342
|
*/
|
|
16855
17343
|
|
|
16856
|
-
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_DETACHED_PARENT_CDR, AUP_OUT_OF_SCOPE_PLACE_NOTICE_COMPONENT, AUP_PLACE_CONFIG, AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityCancellation, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AupTooltipDirective, AutocompleteInputComponent, BottomSheetInteractionContext, BottomSheetInteractionContextFactory, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_RENDERER_PORTAL, CardContainerComponent, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DensityDirective, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowCellsBuilder, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, HostedInteractionContext, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, OutOfScopeNoticeComponent, POPUP_CONTAINER, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, ParameterSanitiser, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, PlaceScope, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, QuietRejections, QuietRejectionsErrorHandler, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectOverlayOriginDirective, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SheetSwipe, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SubFormListColumn, SubFormListColumns, SubFormListComponent, SubFormListEmptyDirective, SubFormListFooterDirective, SubFormListHeaderDirective, SubFormRowActionsDirective, SubFormRowDirective, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableActionColumnComponent, TableBodyComponent, TableCellComponent, TableComponent, TableCustomMoreMenuComponent, TableCustomMoreMenuPopupComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableRowAttributesDirective, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, collapseOrphanSeparators, getPlaceDefinition, leftRightPlaceAnimation, markdownPillExtension, provideQuietRejections, registerValidators, setPlaceDefinition, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
17344
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_DETACHED_PARENT_CDR, AUP_OUT_OF_SCOPE_PLACE_NOTICE_COMPONENT, AUP_PLACE_CONFIG, AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityCancellation, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivitySelectOptionList, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AupTooltipDirective, AutocompleteInputComponent, BottomSheetInteractionContext, BottomSheetInteractionContextFactory, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_RENDERER_PORTAL, CardContainerComponent, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DelegatingInteractionContext, DensityDirective, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowCellsBuilder, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, HostedInteractionContext, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, OPTION_LIST_DEFAULTS, OptionListActivity, OutOfScopeNoticeComponent, POPUP_CONTAINER, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, ParameterSanitiser, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, PlaceScope, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, QuietRejections, QuietRejectionsErrorHandler, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectOptionList, SelectOverlayOriginDirective, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SheetSwipe, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SubFormListColumn, SubFormListColumns, SubFormListComponent, SubFormListEmptyDirective, SubFormListFooterDirective, SubFormListHeaderDirective, SubFormRowActionsDirective, SubFormRowDirective, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableActionColumnComponent, TableBodyComponent, TableCellComponent, TableComponent, TableCustomMoreMenuComponent, TableCustomMoreMenuPopupComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableRowAttributesDirective, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, collapseOrphanSeparators, getPlaceDefinition, leftRightPlaceAnimation, markdownPillExtension, provideQuietRejections, registerValidators, setPlaceDefinition, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, startActivityInPopup, treeNodeDecorator };
|
|
16857
17345
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|