Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cdk/listbox): convert all directives to standalone #26211

Merged
merged 1 commit into from Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cdk/listbox/listbox-module.ts
Expand Up @@ -10,8 +10,9 @@ import {NgModule} from '@angular/core';
import {CdkListbox, CdkOption} from './listbox';

const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];

@NgModule({
exports: EXPORTED_DECLARATIONS,
declarations: EXPORTED_DECLARATIONS,
imports: [...EXPORTED_DECLARATIONS],
exports: [...EXPORTED_DECLARATIONS],
})
export class CdkListboxModule {}
2 changes: 2 additions & 0 deletions src/cdk/listbox/listbox.ts
Expand Up @@ -78,6 +78,7 @@ class ListboxSelectionModel<T> extends SelectionModel<T> {
/** A selectable option in a listbox. */
@Directive({
selector: '[cdkOption]',
standalone: true,
exportAs: 'cdkOption',
host: {
'role': 'option',
Expand Down Expand Up @@ -220,6 +221,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab

@Directive({
selector: '[cdkListbox]',
standalone: true,
exportAs: 'cdkListbox',
host: {
'role': 'listbox',
Expand Down
6 changes: 3 additions & 3 deletions tools/public_api_guard/cdk/listbox.md
Expand Up @@ -75,7 +75,7 @@ export class CdkListbox<T = unknown> implements AfterContentInit, OnDestroy, Con
readonly valueChange: Subject<ListboxValueChangeEvent<T>>;
writeValue(value: readonly T[]): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkListbox<any>, "[cdkListbox]", ["cdkListbox"], { "id": "id"; "enabledTabIndex": "tabindex"; "value": "cdkListboxValue"; "multiple": "cdkListboxMultiple"; "disabled": "cdkListboxDisabled"; "useActiveDescendant": "cdkListboxUseActiveDescendant"; "orientation": "cdkListboxOrientation"; "compareWith": "cdkListboxCompareWith"; "navigationWrapDisabled": "cdkListboxNavigationWrapDisabled"; "navigateDisabledOptions": "cdkListboxNavigatesDisabledOptions"; }, { "valueChange": "cdkListboxValueChange"; }, ["options"], never, false, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkListbox<any>, "[cdkListbox]", ["cdkListbox"], { "id": "id"; "enabledTabIndex": "tabindex"; "value": "cdkListboxValue"; "multiple": "cdkListboxMultiple"; "disabled": "cdkListboxDisabled"; "useActiveDescendant": "cdkListboxUseActiveDescendant"; "orientation": "cdkListboxOrientation"; "compareWith": "cdkListboxCompareWith"; "navigationWrapDisabled": "cdkListboxNavigationWrapDisabled"; "navigateDisabledOptions": "cdkListboxNavigatesDisabledOptions"; }, { "valueChange": "cdkListboxValueChange"; }, ["options"], never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CdkListbox<any>, never>;
}
Expand All @@ -87,7 +87,7 @@ export class CdkListboxModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<CdkListboxModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkListboxModule, [typeof i1.CdkListbox, typeof i1.CdkOption], never, [typeof i1.CdkListbox, typeof i1.CdkOption]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkListboxModule, never, [typeof i1.CdkListbox, typeof i1.CdkOption], [typeof i1.CdkListbox, typeof i1.CdkOption]>;
}

// @public
Expand Down Expand Up @@ -118,7 +118,7 @@ export class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightab
typeaheadLabel: string;
value: T;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOption<any>, "[cdkOption]", ["cdkOption"], { "id": "id"; "value": "cdkOption"; "typeaheadLabel": "cdkOptionTypeaheadLabel"; "disabled": "cdkOptionDisabled"; "enabledTabIndex": "tabindex"; }, {}, never, never, false, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOption<any>, "[cdkOption]", ["cdkOption"], { "id": "id"; "value": "cdkOption"; "typeaheadLabel": "cdkOptionTypeaheadLabel"; "disabled": "cdkOptionDisabled"; "enabledTabIndex": "tabindex"; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CdkOption<any>, never>;
}
Expand Down