@coolon/angular-ui-powerups 16.1.0-alpha.280 → 16.1.0-alpha.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/form.scss +15 -3
- package/esm2022/lib/components/components.module.mjs +6 -1
- package/esm2022/lib/components/exports.mjs +2 -1
- package/esm2022/lib/components/forms/number-input/number-input.component.mjs +117 -4
- package/esm2022/lib/components/forms/select-input/select-input.component.mjs +41 -6
- package/esm2022/lib/components/forms/select-input/select-overlay-origin.directive.mjs +40 -0
- package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +1 -1
- package/fesm2022/coolon-angular-ui-powerups.mjs +197 -9
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/components.module.d.ts +74 -73
- package/lib/components/exports.d.ts +1 -0
- package/lib/components/forms/number-input/number-input.component.d.ts +59 -1
- package/lib/components/forms/select-input/select-input.component.d.ts +21 -1
- package/lib/components/forms/select-input/select-overlay-origin.directive.d.ts +25 -0
- package/package.json +1 -1
|
@@ -7,80 +7,81 @@ import * as i5 from "./forms/string-input/string-input.component";
|
|
|
7
7
|
import * as i6 from "./forms/text-input/text-input.component";
|
|
8
8
|
import * as i7 from "./forms/password-input/password-input.component";
|
|
9
9
|
import * as i8 from "./forms/select-input/select-input.component";
|
|
10
|
-
import * as i9 from "./forms/
|
|
11
|
-
import * as i10 from "./forms/
|
|
12
|
-
import * as i11 from "./forms/
|
|
13
|
-
import * as i12 from "./
|
|
14
|
-
import * as i13 from "./
|
|
15
|
-
import * as i14 from "./
|
|
16
|
-
import * as i15 from "./
|
|
17
|
-
import * as i16 from "./
|
|
18
|
-
import * as i17 from "./
|
|
19
|
-
import * as i18 from "./
|
|
20
|
-
import * as i19 from "./
|
|
21
|
-
import * as i20 from "./tables/
|
|
22
|
-
import * as i21 from "./tables/
|
|
23
|
-
import * as i22 from "./tables/
|
|
24
|
-
import * as i23 from "./tables/renderer/
|
|
25
|
-
import * as i24 from "./tables/renderer/
|
|
26
|
-
import * as i25 from "./tables/renderer/
|
|
27
|
-
import * as i26 from "./tables/renderer/
|
|
28
|
-
import * as i27 from "./tables/renderer/
|
|
29
|
-
import * as i28 from "./
|
|
30
|
-
import * as i29 from "./
|
|
31
|
-
import * as i30 from "./
|
|
32
|
-
import * as i31 from "./
|
|
33
|
-
import * as i32 from "./commands/
|
|
34
|
-
import * as i33 from "./commands/
|
|
35
|
-
import * as i34 from "./commands/
|
|
36
|
-
import * as i35 from "./commands/
|
|
37
|
-
import * as i36 from "./commands/
|
|
38
|
-
import * as i37 from "./commands/
|
|
39
|
-
import * as i38 from "./commands/
|
|
40
|
-
import * as i39 from "./commands/group/popup-menu/
|
|
41
|
-
import * as i40 from "./
|
|
42
|
-
import * as i41 from "./tables/tree-table/tree-
|
|
43
|
-
import * as i42 from "./tables/tree-table/tree-
|
|
44
|
-
import * as i43 from "./
|
|
45
|
-
import * as i44 from "./
|
|
46
|
-
import * as i45 from "./
|
|
47
|
-
import * as i46 from "./tables/
|
|
48
|
-
import * as i47 from "./
|
|
49
|
-
import * as i48 from "./
|
|
50
|
-
import * as i49 from "./
|
|
51
|
-
import * as i50 from "./
|
|
52
|
-
import * as i51 from "./
|
|
53
|
-
import * as i52 from "./tables/renderer/table-custom-more-menu/table-custom-more-menu
|
|
54
|
-
import * as i53 from "./
|
|
55
|
-
import * as i54 from "./
|
|
56
|
-
import * as i55 from "./
|
|
57
|
-
import * as i56 from "./
|
|
58
|
-
import * as i57 from "./
|
|
59
|
-
import * as i58 from "./forms/sub-form-list/sub-form-
|
|
60
|
-
import * as i59 from "
|
|
61
|
-
import * as i60 from "@angular/
|
|
62
|
-
import * as i61 from "@angular/
|
|
63
|
-
import * as i62 from "@angular/
|
|
64
|
-
import * as i63 from "@angular/material/
|
|
65
|
-
import * as i64 from "@angular/material/
|
|
66
|
-
import * as i65 from "@angular/material/
|
|
67
|
-
import * as i66 from "
|
|
68
|
-
import * as i67 from "
|
|
69
|
-
import * as i68 from "@angular/material/
|
|
70
|
-
import * as i69 from "@angular/material/
|
|
71
|
-
import * as i70 from "@angular/material/
|
|
72
|
-
import * as i71 from "@angular/
|
|
73
|
-
import * as i72 from "@angular/cdk/
|
|
74
|
-
import * as i73 from "@angular/
|
|
75
|
-
import * as i74 from "@angular/material/
|
|
76
|
-
import * as i75 from "@angular/material/
|
|
77
|
-
import * as i76 from "@angular/material/
|
|
78
|
-
import * as i77 from "@angular/material/
|
|
79
|
-
import * as i78 from "@angular/material/progress-
|
|
80
|
-
import * as i79 from "
|
|
81
|
-
import * as i80 from "
|
|
10
|
+
import * as i9 from "./forms/select-input/select-overlay-origin.directive";
|
|
11
|
+
import * as i10 from "./forms/multiple-select-input/multiple-select-input.component";
|
|
12
|
+
import * as i11 from "./forms/autocomplete-input/autocomplete-input.component";
|
|
13
|
+
import * as i12 from "./forms/checkbox-input/checkbox-input.component";
|
|
14
|
+
import * as i13 from "./scroll-container/scroll-container.component";
|
|
15
|
+
import * as i14 from "./noop/noop.component";
|
|
16
|
+
import * as i15 from "./switch-case/switch-case.component";
|
|
17
|
+
import * as i16 from "./focus-container/focus-container.component";
|
|
18
|
+
import * as i17 from "./vertical-focus-container/vertical-focus-container.component";
|
|
19
|
+
import * as i18 from "./focusable.component";
|
|
20
|
+
import * as i19 from "./cards/card-container/card-container.component";
|
|
21
|
+
import * as i20 from "./tables/table/table.component";
|
|
22
|
+
import * as i21 from "./tables/renderer/table-body/table-body.component";
|
|
23
|
+
import * as i22 from "./tables/column/column-template/column-template.directive";
|
|
24
|
+
import * as i23 from "./tables/renderer/default-cell-renderer/default-cell-renderer.component";
|
|
25
|
+
import * as i24 from "./tables/renderer/table-cell/table-cell.component";
|
|
26
|
+
import * as i25 from "./tables/renderer/selection-cell/selection-cell.component";
|
|
27
|
+
import * as i26 from "./tables/renderer/select-header-cell/selection-header-cell.component";
|
|
28
|
+
import * as i27 from "./tables/renderer/default-header-cell-renderer/default-header-cell-renderer.component";
|
|
29
|
+
import * as i28 from "./tables/renderer/table-header-cell/table-header-cell.component";
|
|
30
|
+
import * as i29 from "./icon/icon.component";
|
|
31
|
+
import * as i30 from "./section-header/section-header.component";
|
|
32
|
+
import * as i31 from "./tables/renderer/table-action-column/table-action-column.component";
|
|
33
|
+
import * as i32 from "./commands/group/tool-bar/tool-bar.component";
|
|
34
|
+
import * as i33 from "./commands/command/command.component";
|
|
35
|
+
import * as i34 from "./commands/group/popup-menu/popup-menu.component";
|
|
36
|
+
import * as i35 from "./commands/command-face/command-face.component";
|
|
37
|
+
import * as i36 from "./commands/group/popup-menu/more-menu.component";
|
|
38
|
+
import * as i37 from "./commands/separator.component";
|
|
39
|
+
import * as i38 from "./commands/flex.component";
|
|
40
|
+
import * as i39 from "./commands/group/popup-menu/abstract-popup-menu.component";
|
|
41
|
+
import * as i40 from "./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component";
|
|
42
|
+
import * as i41 from "./tables/tree-table/tree-table-component";
|
|
43
|
+
import * as i42 from "./tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component";
|
|
44
|
+
import * as i43 from "./tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component";
|
|
45
|
+
import * as i44 from "./busy-overlay/busy-overlay.component";
|
|
46
|
+
import * as i45 from "./empty-state/empty-state.component";
|
|
47
|
+
import * as i46 from "./tables/paginator/paginator.component";
|
|
48
|
+
import * as i47 from "./tables/abstract-table.component";
|
|
49
|
+
import * as i48 from "./cards/abstract-card-container.component";
|
|
50
|
+
import * as i49 from "./labelled-value/labelled-value.component";
|
|
51
|
+
import * as i50 from "./loading-container/loading-container.component";
|
|
52
|
+
import * as i51 from "./text/markdown/markdown.component";
|
|
53
|
+
import * as i52 from "./tables/renderer/table-custom-more-menu/table-custom-more-menu.component";
|
|
54
|
+
import * as i53 from "./tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component";
|
|
55
|
+
import * as i54 from "./forms/search-input/search-input.component";
|
|
56
|
+
import * as i55 from "./tables/renderer/table-footer-row/table-footer-row.component";
|
|
57
|
+
import * as i56 from "./file/file-download/file-download.component";
|
|
58
|
+
import * as i57 from "./commands/button-renderer/button-renderer.component";
|
|
59
|
+
import * as i58 from "./forms/sub-form-list/sub-form-list.component";
|
|
60
|
+
import * as i59 from "./forms/sub-form-list/sub-form-row.directive";
|
|
61
|
+
import * as i60 from "@angular/common";
|
|
62
|
+
import * as i61 from "@angular/platform-browser/animations";
|
|
63
|
+
import * as i62 from "@angular/forms";
|
|
64
|
+
import * as i63 from "@angular/material/input";
|
|
65
|
+
import * as i64 from "@angular/material/form-field";
|
|
66
|
+
import * as i65 from "@angular/material/select";
|
|
67
|
+
import * as i66 from "@angular/material/tabs";
|
|
68
|
+
import * as i67 from "../directives/directives.module";
|
|
69
|
+
import * as i68 from "@angular/material/icon";
|
|
70
|
+
import * as i69 from "@angular/material/button";
|
|
71
|
+
import * as i70 from "@angular/material/checkbox";
|
|
72
|
+
import * as i71 from "@angular/material/table";
|
|
73
|
+
import * as i72 from "@angular/cdk/portal";
|
|
74
|
+
import * as i73 from "@angular/cdk/scrolling";
|
|
75
|
+
import * as i74 from "@angular/material/tooltip";
|
|
76
|
+
import * as i75 from "@angular/material/autocomplete";
|
|
77
|
+
import * as i76 from "@angular/material/menu";
|
|
78
|
+
import * as i77 from "@angular/material/divider";
|
|
79
|
+
import * as i78 from "@angular/material/progress-spinner";
|
|
80
|
+
import * as i79 from "@angular/material/progress-bar";
|
|
81
|
+
import * as i80 from "ng-table-virtual-scroll";
|
|
82
|
+
import * as i81 from "@angular/cdk/drag-drop";
|
|
82
83
|
export declare class ComponentsModule {
|
|
83
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
|
|
84
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractInputComponent, typeof i2.AbstractValueInputComponent, typeof i3.AbstractListInputComponent, typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i8.SelectInputComponent, typeof i9.
|
|
85
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractInputComponent, typeof i2.AbstractValueInputComponent, typeof i3.AbstractListInputComponent, typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i8.SelectInputComponent, typeof i9.SelectOverlayOriginDirective, typeof i10.MultipleSelectInputComponent, typeof i11.AutocompleteInputComponent, typeof i12.CheckboxInputComponent, typeof i13.ScrollContainerComponent, typeof i14.NoopComponent, typeof i15.SwitchCaseComponent, typeof i15.SwitchCaseWhenDirective, typeof i15.SwitchCaseDefaultDirective, typeof i16.FocusContainerComponent, typeof i17.VerticalFocusContainerComponent, typeof i18.FocusableComponent, typeof i19.CardContainerComponent, typeof i20.TableComponent, typeof i21.TableRowAttributesDirective, typeof i22.ColumnTemplateDirective, typeof i23.DefaultCellRendererComponent, typeof i24.TableCellComponent, typeof i25.SelectionCellComponent, typeof i26.SelectionHeaderCellComponent, typeof i27.DefaultHeaderCellRendererComponent, typeof i28.TableHeaderCellComponent, typeof i29.IconComponent, typeof i30.SectionHeaderComponent, typeof i31.TableActionColumnComponent, typeof i32.ToolBarComponent, typeof i33.CommandComponent, typeof i34.PopupMenuComponent, typeof i35.CommandFaceComponent, typeof i36.MoreMenuComponent, typeof i37.SeparatorComponent, typeof i38.FlexComponent, typeof i39.AbstractPopupMenuComponent, typeof i40.PopupMenuRendererComponent, typeof i41.TreeTableComponent, typeof i42.TreeInheritanceIconComponent, typeof i43.TreeLabelCellRendererComponent, typeof i44.BusyOverlayComponent, typeof i45.EmptyStateComponent, typeof i46.PaginatorComponent, typeof i47.AbstractTableComponent, typeof i48.AbstractCardContainerComponent, typeof i49.LabelledValueComponent, typeof i50.LoadingContainerComponent, typeof i51.MarkdownComponent, typeof i21.TableBodyComponent, typeof i52.TableCustomMoreMenuComponent, typeof i53.TableCustomMoreMenuPopupComponent, typeof i54.SearchInputComponent, typeof i55.TableFooterRow, typeof i56.FileDownloadComponent, typeof i57.ButtonRendererComponent, typeof i58.SubFormListComponent, typeof i59.SubFormRowDirective, typeof i59.SubFormRowActionsDirective, typeof i59.SubFormListEmptyDirective, typeof i59.SubFormListFooterDirective, typeof i59.SubFormListHeaderDirective], [typeof i60.CommonModule, typeof i61.BrowserAnimationsModule, typeof i62.FormsModule, typeof i63.MatInputModule, typeof i64.MatFormFieldModule, typeof i65.MatSelectModule, typeof i66.MatTabsModule, typeof i67.DirectivesModule, typeof i68.MatIconModule, typeof i69.MatButtonModule, typeof i70.MatCheckboxModule, typeof i71.MatTableModule, typeof i72.PortalModule, typeof i73.CdkScrollableModule, typeof i74.MatTooltipModule, typeof i75.MatAutocompleteModule, typeof i76.MatMenuModule, typeof i77.MatDividerModule, typeof i78.MatProgressSpinnerModule, typeof i79.MatProgressBarModule, typeof i73.ScrollingModule, typeof i80.TableVirtualScrollModule, typeof i81.DragDropModule], [typeof i57.ButtonRendererComponent, typeof i56.FileDownloadComponent, typeof i55.TableFooterRow, typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i12.CheckboxInputComponent, typeof i8.SelectInputComponent, typeof i9.SelectOverlayOriginDirective, typeof i10.MultipleSelectInputComponent, typeof i11.AutocompleteInputComponent, typeof i13.ScrollContainerComponent, typeof i14.NoopComponent, typeof i15.SwitchCaseComponent, typeof i15.SwitchCaseWhenDirective, typeof i15.SwitchCaseDefaultDirective, typeof i16.FocusContainerComponent, typeof i17.VerticalFocusContainerComponent, typeof i18.FocusableComponent, typeof i19.CardContainerComponent, typeof i20.TableComponent, typeof i22.ColumnTemplateDirective, typeof i29.IconComponent, typeof i30.SectionHeaderComponent, typeof i31.TableActionColumnComponent, typeof i32.ToolBarComponent, typeof i33.CommandComponent, typeof i34.PopupMenuComponent, typeof i35.CommandFaceComponent, typeof i36.MoreMenuComponent, typeof i37.SeparatorComponent, typeof i38.FlexComponent, typeof i41.TreeTableComponent, typeof i44.BusyOverlayComponent, typeof i45.EmptyStateComponent, typeof i46.PaginatorComponent, typeof i49.LabelledValueComponent, typeof i50.LoadingContainerComponent, typeof i51.MarkdownComponent, typeof i52.TableCustomMoreMenuComponent, typeof i53.TableCustomMoreMenuPopupComponent, typeof i54.SearchInputComponent, typeof i57.ButtonRendererComponent, typeof i58.SubFormListComponent, typeof i59.SubFormRowDirective, typeof i59.SubFormRowActionsDirective, typeof i59.SubFormListEmptyDirective, typeof i59.SubFormListFooterDirective, typeof i59.SubFormListHeaderDirective]>;
|
|
85
86
|
static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
|
|
86
87
|
}
|
|
@@ -40,6 +40,7 @@ export * from "./forms/number-input/number-input.component";
|
|
|
40
40
|
export * from "./forms/password-input/password-input.component";
|
|
41
41
|
export * from "./forms/search-input/search-input.component";
|
|
42
42
|
export * from "./forms/select-input/select-input.component";
|
|
43
|
+
export * from "./forms/select-input/select-overlay-origin.directive";
|
|
43
44
|
export * from "./forms/string-input/string-input.component";
|
|
44
45
|
export * from "./forms/sub-form-list/sub-form-list-column";
|
|
45
46
|
export * from "./forms/sub-form-list/sub-form-list-columns";
|
|
@@ -9,6 +9,23 @@ export declare class NumberInputComponent extends AbstractValueInputComponent<nu
|
|
|
9
9
|
accessor max: number;
|
|
10
10
|
accessor significantDigits$: ValueModel<number>;
|
|
11
11
|
accessor significantDigits: number;
|
|
12
|
+
/**
|
|
13
|
+
* Selects the layout, not a breakpoint — a touch-density form uses the touch layout throughout,
|
|
14
|
+
* so the two never mix in one column. 'touch' unstacks the steppers to full-height buttons either
|
|
15
|
+
* side of the field, because stacking them in a 56px row would halve each one.
|
|
16
|
+
*
|
|
17
|
+
* Orthogonal to {@link dense}, which goes the other way (a 37px row for tables and sub-forms).
|
|
18
|
+
* Setting both is contradictory; touch wins, since its rules come later.
|
|
19
|
+
*/
|
|
20
|
+
density: 'desktop' | 'touch';
|
|
21
|
+
get touchDensity(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The steppers live outside the field's outline now, so nothing about them is styled by Material.
|
|
24
|
+
* These two say when the block as a whole takes the disabled or error treatment; a single
|
|
25
|
+
* stepper greying out at min/max is the command directive's disabled attribute, not these.
|
|
26
|
+
*/
|
|
27
|
+
get steppersDisabled(): boolean;
|
|
28
|
+
get steppersInError(): boolean;
|
|
12
29
|
protected readonly incrementCommand: Command<void>;
|
|
13
30
|
protected readonly decrementCommand: Command<void>;
|
|
14
31
|
protected readonly displayValue$: ValueModel<number>;
|
|
@@ -17,7 +34,48 @@ export declare class NumberInputComponent extends AbstractValueInputComponent<nu
|
|
|
17
34
|
private increment;
|
|
18
35
|
private decrement;
|
|
19
36
|
private clampSignificantDigits;
|
|
37
|
+
/**
|
|
38
|
+
* Shift, PageUp and PageDown all step by ten times {@link step}.
|
|
39
|
+
*
|
|
40
|
+
* Plain arrow stepping is NOT here: `input[type=number]` already does it natively, honouring the
|
|
41
|
+
* bound min/max/step, and the change arrives through ngModelChange like any other edit. Only the
|
|
42
|
+
* coarse step is ours, because nothing native multiplies by anything.
|
|
43
|
+
*/
|
|
44
|
+
private static readonly COARSE_STEP_FACTOR;
|
|
45
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
46
|
+
/**
|
|
47
|
+
* A focused `input[type=number]` treats the wheel as a stepper, so scrolling the page with the
|
|
48
|
+
* pointer resting on a field you just typed into silently edits it — and this component commits
|
|
49
|
+
* on every change, so that edit IS the commit. There is no confirmation step behind it to catch.
|
|
50
|
+
*
|
|
51
|
+
* Only while focused: an unfocused number input doesn't step, so there is nothing to guard and
|
|
52
|
+
* the page should scroll as normal. The consequence worth knowing is that while the field IS
|
|
53
|
+
* focused the wheel now does nothing over it at all — the page won't scroll either until the
|
|
54
|
+
* pointer moves off. Blurring instead would let the scroll through, but silent focus loss fires
|
|
55
|
+
* every consumer's blur handler, which is a much wider blast radius than a dead wheel.
|
|
56
|
+
*
|
|
57
|
+
* Deliberate adjustment keeps three better paths: the arrows, Shift/PageUp/PageDown for ten, and
|
|
58
|
+
* the steppers.
|
|
59
|
+
*/
|
|
60
|
+
protected onWheel(event: WheelEvent): void;
|
|
61
|
+
private static coarseStepDirection;
|
|
62
|
+
/**
|
|
63
|
+
* A single step stops at the bounds because the command is disabled there, but a coarse step can
|
|
64
|
+
* jump clean over them — 5 with Shift+Up against a max of 10 has to land on 10, not 15.
|
|
65
|
+
*/
|
|
66
|
+
private clampToBounds;
|
|
67
|
+
/**
|
|
68
|
+
* A pointer press on a stepper must leave the field holding focus — the button takes focus on
|
|
69
|
+
* mousedown, then loses it again, so the press ended up landing focus on <body> and taking the
|
|
70
|
+
* field's focus ring with it. Refusing the focus at mousedown stops that, and requesting it for
|
|
71
|
+
* the field matches what a native number input's own spinners do.
|
|
72
|
+
*
|
|
73
|
+
* Bound on mousedown rather than in the commands so it stays POINTER-only: the buttons are still
|
|
74
|
+
* tab stops, and a keyboard activation has to leave focus on the button it came from, or a second
|
|
75
|
+
* press would have nowhere to land.
|
|
76
|
+
*/
|
|
77
|
+
protected onStepperPress(event: MouseEvent): void;
|
|
20
78
|
onValueChange(value: number): void;
|
|
21
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberInputComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent, "aup-number-input", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "min$": { "alias": "min$"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max$": { "alias": "max$"; "required": false; }; "max": { "alias": "max"; "required": false; }; "significantDigits$": { "alias": "significantDigits$"; "required": false; }; "significantDigits": { "alias": "significantDigits"; "required": false; }; }, {}, never, never, false, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumberInputComponent, "aup-number-input", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "min$": { "alias": "min$"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max$": { "alias": "max$"; "required": false; }; "max": { "alias": "max"; "required": false; }; "significantDigits$": { "alias": "significantDigits$"; "required": false; }; "significantDigits": { "alias": "significantDigits"; "required": false; }; "density": { "alias": "density"; "required": false; }; }, {}, never, never, false, never>;
|
|
23
81
|
}
|
|
@@ -28,6 +28,14 @@ import * as i0 from "@angular/core";
|
|
|
28
28
|
* remote. Bind {@link searchText$} to observe or pre-seed the text (it is cleared whenever the panel
|
|
29
29
|
* closes). The nil option is never filtered - it is a clear-the-selection affordance, not a data
|
|
30
30
|
* option.
|
|
31
|
+
*
|
|
32
|
+
* Appearance:
|
|
33
|
+
* <aup-select-input appearance="button" placeholder="All heros" [allowNil]="true" ...></aup-select-input>
|
|
34
|
+
* `field` (the default) is a mat-form-field: label, hint, error, validation icon, notched outline.
|
|
35
|
+
* `button` drops the form field for a compact bordered trigger suited to a toolbar or filter bar - a
|
|
36
|
+
* selector rather than a form field, so label, hint and error do not exist there (binding label or
|
|
37
|
+
* hint warns in development mode) and the panel sizes to its longest option. The option list, search
|
|
38
|
+
* box, nil row, templates and footer slot are the same in both. See {@link appearance}.
|
|
31
39
|
*/
|
|
32
40
|
export declare class SelectInputComponent<T = any> extends AbstractValueInputComponent<T> implements OnInit, AfterContentInit, DoCheck, AfterViewChecked {
|
|
33
41
|
/** Keys the search box hands back to MatSelect's key manager instead of consuming itself. */
|
|
@@ -37,6 +45,16 @@ export declare class SelectInputComponent<T = any> extends AbstractValueInputCom
|
|
|
37
45
|
optionLabel: keyof T;
|
|
38
46
|
accessor allowNil$: ValueModel<boolean>;
|
|
39
47
|
accessor allowNil: boolean;
|
|
48
|
+
/** `field` wraps the select in a mat-form-field; `button` renders a compact bordered trigger with no form field. */
|
|
49
|
+
appearance: SelectInputComponent.Appearance;
|
|
50
|
+
get buttonAppearance(): boolean;
|
|
51
|
+
private readonly matSelectConfig;
|
|
52
|
+
/**
|
|
53
|
+
* What the field appearance binds to mat-select's panelWidth: whatever the app configured, else
|
|
54
|
+
* Material's own default - so no existing consumer moves. (Binding undefined would NOT be a
|
|
55
|
+
* no-op: mat-select reads it as "size to content".) The button appearance binds null directly.
|
|
56
|
+
*/
|
|
57
|
+
get fieldPanelWidth(): string | number | null;
|
|
40
58
|
selectedOptionTemplateRef: TemplateRef<any>;
|
|
41
59
|
optionTemplateRef: TemplateRef<any>;
|
|
42
60
|
nilOptionTemplateRef: TemplateRef<any>;
|
|
@@ -129,9 +147,11 @@ export declare class SelectInputComponent<T = any> extends AbstractValueInputCom
|
|
|
129
147
|
private isSelectedOption;
|
|
130
148
|
ngOnInit(): void;
|
|
131
149
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectInputComponent<any>, never>;
|
|
132
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectInputComponent<any>, "aup-select-input", never, { "options$": { "alias": "options$"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "allowNil$": { "alias": "allowNil$"; "required": false; }; "allowNil": { "alias": "allowNil"; "required": false; }; "optionLabelFormat": { "alias": "optionLabelFormat"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "noResultsText": { "alias": "noResultsText"; "required": false; }; "searchText$": { "alias": "searchText$"; "required": false; }; "optionSearchText": { "alias": "optionSearchText"; "required": false; }; "filterFactory": { "alias": "filterFactory"; "required": false; }; }, {}, ["selectedOptionTemplateRef", "optionTemplateRef", "nilOptionTemplateRef"], ["[select-option-footer]"], false, never>;
|
|
150
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectInputComponent<any>, "aup-select-input", never, { "options$": { "alias": "options$"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "allowNil$": { "alias": "allowNil$"; "required": false; }; "allowNil": { "alias": "allowNil"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "optionLabelFormat": { "alias": "optionLabelFormat"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "noResultsText": { "alias": "noResultsText"; "required": false; }; "searchText$": { "alias": "searchText$"; "required": false; }; "optionSearchText": { "alias": "optionSearchText"; "required": false; }; "filterFactory": { "alias": "filterFactory"; "required": false; }; }, {}, ["selectedOptionTemplateRef", "optionTemplateRef", "nilOptionTemplateRef"], ["[select-option-footer]"], false, never>;
|
|
133
151
|
}
|
|
134
152
|
export declare namespace SelectInputComponent {
|
|
135
153
|
/** One row of an option's searchable text. Nil rows are skipped; numbers are matched by their text. */
|
|
136
154
|
type SearchText = string | number | null | undefined;
|
|
155
|
+
/** See the class docs: `field` is a mat-form-field, `button` a compact bordered trigger without one. */
|
|
156
|
+
type Appearance = 'field' | 'button';
|
|
137
157
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Stands in for the mat-form-field a bare mat-select would otherwise look for, so its dropdown
|
|
5
|
+
* anchors to THIS element's border box. Without a form field, mat-select falls back to its inner
|
|
6
|
+
* `.mat-mdc-select-trigger` div as the overlay origin, and that div sits inside whatever padding and
|
|
7
|
+
* border the box around it carries - the panel then opens that many pixels in from the box's edge,
|
|
8
|
+
* and no CSS on an element we own can close a gap that IS the padding.
|
|
9
|
+
*
|
|
10
|
+
* mat-select reads exactly three members off MAT_FORM_FIELD in Material 16.2:
|
|
11
|
+
* getConnectedOverlayOrigin(), getLabelId() and color. Check `_parentFormField` in
|
|
12
|
+
* @angular/material's select.mjs on every Material bump: a fourth member would surface at runtime as
|
|
13
|
+
* "is not a function" on open, not as a type error, because the token is typed MatFormField and this
|
|
14
|
+
* is a partial.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SelectOverlayOriginDirective {
|
|
17
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
18
|
+
/** Gives the panel its `mat-primary` theme class, as a form field would. */
|
|
19
|
+
readonly color = "primary";
|
|
20
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
21
|
+
getConnectedOverlayOrigin(): ElementRef<HTMLElement>;
|
|
22
|
+
getLabelId(): string | null;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectOverlayOriginDirective, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectOverlayOriginDirective, "[aupSelectOverlayOrigin]", never, {}, {}, never, never, false, never>;
|
|
25
|
+
}
|