diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index 002dc7640d86..ecee3f30cedf 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -1,6 +1,5 @@ # Angular Material Coding Standards - ## Code style The [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html) is the @@ -12,6 +11,7 @@ ES6 or TypeScript. ### General #### Write useful comments + Comments that explain what some block of code does are nice; they can tell you something in less time than it would take to follow through the code itself. @@ -21,6 +21,7 @@ the original author. When collaborators are in the same room, this hurts product When collaborators are in different timezones, this can be devastating to productivity. For example, this is a not-very-useful comment: + ```ts // Set default tabindex. if (!$attrs['tabindex']) { @@ -29,6 +30,7 @@ if (!$attrs['tabindex']) { ``` While this is much more useful: + ```ts // Unless the user specifies so, the calendar should not be a tab stop. // This is necessary because ngAria might add a tabindex to anything with an ng-model @@ -48,6 +50,7 @@ In HTML code, use `` comments, which will be stripped when packaging #### Prefer more focused, granular components vs. complex, configurable components. For example, rather than doing this: + ```html Basic button FAB @@ -55,6 +58,7 @@ For example, rather than doing this: ``` do this: + ```html Basic button FAB @@ -62,6 +66,7 @@ do this: ``` #### Prefer small, focused modules + Keeping modules to a single responsibility makes the code easier to test, consume, and maintain. ES6 modules offer a straightforward way to organize code into logical, granular units. Ideally, individual files are 200 - 300 lines of code. @@ -70,6 +75,7 @@ As a rule of thumb, once a file draws near 400 lines (barring abnormally long co start considering how to refactor into smaller pieces. #### Less is more + Once a feature is released, it never goes away. We should avoid adding features that don't offer high user value for price we pay both in maintenance, complexity, and payload size. When in doubt, leave it out. @@ -78,12 +84,14 @@ This applies especially to providing two different APIs to accomplish the same t prefer sticking to a _single_ API for accomplishing something. ### 100 column limit + All code and docs in the repo should be 100 columns or fewer. This applies to TypeScript, SCSS, HTML, bash scripts, and markdown files. ### API Design #### Boolean arguments + Avoid adding boolean arguments to a method in cases where that argument means "do something extra". In these cases, prefer breaking the behavior up into different functions. @@ -108,6 +116,7 @@ function createTargetElement() { ### TypeScript #### Typing + Avoid `any` where possible. If you find yourself using `any`, consider whether a generic may be appropriate in your case. @@ -116,7 +125,9 @@ specified because our documentation tooling cannot currently infer types in plac can. #### Fluent APIs + When creating a fluent or builder-pattern style API, use the `this` return type for methods: + ``` class ConfigBuilder { withName(name: string): this { @@ -127,27 +138,29 @@ class ConfigBuilder { ``` #### Access modifiers -* Omit the `public` keyword as it is the default behavior. -* Use `private` when appropriate and possible, prefixing the name with an underscore. -* Use `protected` when appropriate and possible with no prefix. -* Prefix *library-internal* properties and methods with an underscore without using the `private` -keyword. This is necessary for anything that must be public (to be used by Angular), but should not -be part of the user-facing API. This typically applies to symbols used in template expressions, -`@ViewChildren` / `@ContentChildren` properties, host bindings, and `@Input` / `@Output` properties -(when using an alias). - -Additionally, the `@docs-private` JsDoc annotation can be used to hide any symbol from the public -API docs. +- Omit the `public` keyword as it is the default behavior. +- Use `private` when appropriate and possible, prefixing the name with an underscore. +- Use `protected` when appropriate and possible with no prefix. +- Prefix _library-internal_ properties and methods with an underscore without using the `private` + keyword. This is necessary for anything that must be public (to be used by Angular), but should not + be part of the user-facing API. This typically applies to symbols used in template expressions, + `@ViewChildren` / `@ContentChildren` properties, host bindings, and `@Input` / `@Output` properties + (when using an alias). + +Additionally, the `@nodoc` JsDoc annotation can be used to hide any symbol from the public +API docs. #### Getters and Setters -* Only use getters and setters for `@Input` properties or when otherwise required for API -compatibility. -* Avoid long or complex getters and setters. If the logic of an accessor would take more than -three lines, introduce a new method to contain the logic. -* A getter should immediately precede its corresponding setter. -* Decorators such as `@Input` should be applied to the getter and not the setter. -* Always use a `readonly` property instead of a getter (with no setter) when possible. + +- Only use getters and setters for `@Input` properties or when otherwise required for API + compatibility. +- Avoid long or complex getters and setters. If the logic of an accessor would take more than + three lines, introduce a new method to contain the logic. +- A getter should immediately precede its corresponding setter. +- Decorators such as `@Input` should be applied to the getter and not the setter. +- Always use a `readonly` property instead of a getter (with no setter) when possible. + ```ts /** YES */ readonly active: boolean; @@ -165,10 +178,11 @@ All public APIs must have user-facing comments. These are extracted and shown in on [material.angular.dev](https://material.angular.dev). Private and internal APIs should have JsDoc when they are not obvious. Ultimately it is the purview -of the code reviewer as to what is "obvious", but the rule of thumb is that *most* classes, +of the code reviewer as to what is "obvious", but the rule of thumb is that _most_ classes, properties, and methods should have a JsDoc description. Properties should have a concise description of what the property means: + ```ts /** The label position relative to the checkbox. Defaults to 'after' */ @Input() labelPosition: 'before' | 'after' = 'after'; @@ -176,6 +190,7 @@ Properties should have a concise description of what the property means: Methods blocks should describe what the function does and provide a description for each parameter and the return value: + ```ts /** * Opens a modal dialog containing the given component. @@ -187,6 +202,7 @@ and the return value: ``` Boolean properties and return values should use "Whether..." as opposed to "True if...": + ```ts /** Whether the button is disabled. */ disabled: boolean = false; @@ -198,21 +214,24 @@ Avoid `try-catch` blocks, instead preferring to prevent an error from being thro place. When impossible to avoid, the `try-catch` block must include a comment that explains the specific error being caught and why it cannot be prevented. - #### Naming ##### General -* Prefer writing out words instead of using abbreviations. -* Prefer *exact* names to short names (within reason). E.g., `labelPosition` is better than -`align` because the former much more exactly communicates what the property means. -* Except for `@Input` properties, use `is` and `has` prefixes for boolean properties / methods. + +- Prefer writing out words instead of using abbreviations. +- Prefer _exact_ names to short names (within reason). E.g., `labelPosition` is better than + `align` because the former much more exactly communicates what the property means. +- Except for `@Input` properties, use `is` and `has` prefixes for boolean properties / methods. ##### Observables -* Don't suffix observables with `$`. + +- Don't suffix observables with `$`. ##### Classes + Classes should be named based on what they're responsible for. Names should capture what the code -*does*, not how it is used: +_does_, not how it is used: + ``` /** NO: */ class RadioService { } @@ -229,7 +248,8 @@ CDK classes should only have a `Cdk` prefix when the class is a directive with a prefix. ##### Methods -The name of a method should capture the action that is performed *by* that method rather than + +The name of a method should capture the action that is performed _by_ that method rather than describing when the method will be called. For example, ```ts @@ -245,11 +265,12 @@ activateRipple() { ``` ##### Selectors -* Component selectors should be lowercase and delimited by hyphens. Components should use element -selectors except when the component API uses a native HTML element. -* Directive selectors should be camel cased. Exceptions may be made for directives that act like a -component but would have an empty template, or when the directive is intended to match some -existing attribute. + +- Component selectors should be lowercase and delimited by hyphens. Components should use element + selectors except when the component API uses a native HTML element. +- Directive selectors should be camel cased. Exceptions may be made for directives that act like a + component but would have an empty template, or when the directive is intended to match some + existing attribute. #### Inheritance @@ -258,20 +279,25 @@ behaviors can be composed. Instead, [TypeScript mixins][ts-mixins] can be used t common behaviors into a single component. #### Coercion + Component and directive inputs for boolean and number values must use an input transform function to coerce values to the expected type. For example: + ```ts import {Input, booleanAttribute} from '@angular/core'; @Input({transform: booleanAttribute}) disabled: boolean = false; ``` + The above code allows users to set `disabled` similar to how it can be set on native inputs: + ```html ``` #### Expose native inputs + Native inputs used in components should be exposed to developers through `ng-content`. This allows developers to interact directly with the input and allows us to avoid providing custom implementations for all the input's native behaviors. @@ -281,11 +307,13 @@ For example: **Do:** Implementation + ```html ``` Usage + ```html @@ -295,41 +323,45 @@ Usage **Don't:** Implementation + ```html ``` Usage + ```html ``` - ### Angular #### Host bindings + Prefer using the `host` object in the directive configuration instead of `@HostBinding` and `@HostListener`. We do this because TypeScript preserves the type information of methods with decorators, and when one of the arguments for the method is a native `Event` type, this preserved type information can lead to runtime errors in non-browser environments (e.g., server-side pre-rendering). - ### CSS #### Be cautious with use of `display: flex` -* The [baseline calculation for flex elements](https://www.w3.org/TR/css-flexbox-1/#flex-baselines) -is different from other display values, making it difficult to align flex elements with standard -elements like input and button. -* Component outermost elements are never flex (block or inline-block) -* Don't use `display: flex` on elements that will contain projected content. + +- The [baseline calculation for flex elements](https://www.w3.org/TR/css-flexbox-1/#flex-baselines) + is different from other display values, making it difficult to align flex elements with standard + elements like input and button. +- Component outermost elements are never flex (block or inline-block) +- Don't use `display: flex` on elements that will contain projected content. #### Use the lowest specificity possible + Always prioritize lower specificity over other factors. Most style definitions should consist of a single element or css selector plus necessary state modifiers. **Avoid SCSS nesting for the sake of code organization.** This will allow users to much more easily override styles. For example, rather than doing this: + ```scss .mat-calendar { display: block; @@ -345,6 +377,7 @@ For example, rather than doing this: ``` do this: + ```scss .mat-calendar { display: block; @@ -360,9 +393,11 @@ do this: ``` #### Never set a margin on a host element. + The end-user of a component should be the one to decide how much margin a component has around it. #### Prefer styling the host element vs. elements inside the template (where possible). + This makes it easier to override styles when necessary. For example, rather than ```scss @@ -376,6 +411,7 @@ the-host-element { ``` you can write + ```scss the-host-element { // ... @@ -386,7 +422,9 @@ the-host-element { The latter is equivalent for the component, but makes it easier override when necessary. #### Support styles for Windows high-contrast mode + This is a low-effort task that makes a big difference for low-vision users. Example: + ```css @include cdk-high-contrast(active, off) { .unicorn-motocycle { @@ -396,7 +434,9 @@ This is a low-effort task that makes a big difference for low-vision users. Exam ``` #### Explain what CSS classes are for + When it is not super obvious, include a brief description of what a class represents. For example: + ```scss // The calendar icon button used to open the calendar pane. .mat-datepicker-button { ... } @@ -411,9 +451,11 @@ When it is not super obvious, include a brief description of what a class repres [ts-mixins]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-mix-in-classes #### Prefer CSS classes to tag names and attributes for styling + Targeting tag names can cause conflicts with the MDC version of the component. For this reason, use CSS class names defined by us instead of tag names. We also prefer classes to attributes for consistency. + ```scss /** Do: */ .mat-mdc-slider { ... } @@ -426,4 +468,4 @@ mdc-slider { ... } /** Don't: */ input[type="button"] { ... } - ``` +``` diff --git a/goldens/cdk/a11y/index.api.md b/goldens/cdk/a11y/index.api.md index ecd9b7654403..c3331e80181c 100644 --- a/goldens/cdk/a11y/index.api.md +++ b/goldens/cdk/a11y/index.api.md @@ -398,7 +398,7 @@ export const LIVE_ANNOUNCER_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY(): null; // @public (undocumented) @@ -462,10 +462,10 @@ export function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id: // @public export const TREE_KEY_MANAGER: InjectionToken>; -// @public @deprecated +// @public @deprecated (undocumented) export function TREE_KEY_MANAGER_FACTORY(): TreeKeyManagerFactory; -// @public @deprecated +// @public @deprecated (undocumented) export const TREE_KEY_MANAGER_FACTORY_PROVIDER: { provide: InjectionToken>; useFactory: typeof TREE_KEY_MANAGER_FACTORY; diff --git a/goldens/cdk/bidi/index.api.md b/goldens/cdk/bidi/index.api.md index 5ca0f0661766..c06c54fc00a8 100644 --- a/goldens/cdk/bidi/index.api.md +++ b/goldens/cdk/bidi/index.api.md @@ -23,6 +23,7 @@ export class BidiModule { // @public export class Dir implements Directionality, AfterContentInit, OnDestroy { readonly change: EventEmitter; + // (undocumented) get dir(): Direction; set dir(value: Direction | 'auto'); ngAfterContentInit(): void; diff --git a/goldens/cdk/overlay/index.api.md b/goldens/cdk/overlay/index.api.md index 26f46ecd8661..ce8e42117602 100644 --- a/goldens/cdk/overlay/index.api.md +++ b/goldens/cdk/overlay/index.api.md @@ -159,6 +159,7 @@ export class ConnectedOverlayPositionChange { connectionPair: ConnectionPositionPair, scrollableViewProperties: ScrollingVisibility); connectionPair: ConnectionPositionPair; + // (undocumented) scrollableViewProperties: ScrollingVisibility; } diff --git a/goldens/cdk/portal/index.api.md b/goldens/cdk/portal/index.api.md index 3091a8b8abc0..137e7170631c 100644 --- a/goldens/cdk/portal/index.api.md +++ b/goldens/cdk/portal/index.api.md @@ -34,6 +34,7 @@ export abstract class BasePortalOutlet implements PortalOutlet { detach(): void; dispose(): void; hasAttached(): boolean; + // (undocumented) setDisposeFn(fn: () => void): void; } diff --git a/goldens/cdk/table/index.api.md b/goldens/cdk/table/index.api.md index f6c06e122fba..227b52c3a8df 100644 --- a/goldens/cdk/table/index.api.md +++ b/goldens/cdk/table/index.api.md @@ -73,6 +73,7 @@ export class CdkCell extends BaseCdkCell { // @public export class CdkCellDef implements CellDef { constructor(...args: unknown[]); + // (undocumented) template: TemplateRef; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; @@ -122,11 +123,14 @@ export interface CdkCellOutletRowContext { // @public export class CdkColumnDef implements CanStick { constructor(...args: unknown[]); + // (undocumented) cell: CdkCellDef; _columnCssClassName: string[]; cssClassFriendlyName: string; + // (undocumented) footerCell: CdkFooterCellDef; hasStickyChanged(): boolean; + // (undocumented) headerCell: CdkHeaderCellDef; get name(): string; set name(name: string); @@ -165,6 +169,7 @@ export class CdkFooterCell extends BaseCdkCell { // @public export class CdkFooterCellDef implements CellDef { constructor(...args: unknown[]); + // (undocumented) template: TemplateRef; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; @@ -211,6 +216,7 @@ export class CdkHeaderCell extends BaseCdkCell { // @public export class CdkHeaderCellDef implements CellDef { constructor(...args: unknown[]); + // (undocumented) template: TemplateRef; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; @@ -386,6 +392,7 @@ export class CdkTableModule { export class CdkTextColumn implements OnDestroy, OnInit { constructor(...args: unknown[]); cell: CdkCellDef; + // (undocumented) columnDef: CdkColumnDef; _createDefaultHeaderText(): string; dataAccessor: (data: T, name: string) => string; diff --git a/goldens/cdk/testing/selenium-webdriver/index.api.md b/goldens/cdk/testing/selenium-webdriver/index.api.md index 3f11f8746bba..24236479b5fe 100644 --- a/goldens/cdk/testing/selenium-webdriver/index.api.md +++ b/goldens/cdk/testing/selenium-webdriver/index.api.md @@ -46,6 +46,7 @@ export class SeleniumWebDriverHarnessEnvironment extends HarnessEnvironment<() = protected getDocumentRoot(): () => webdriver.WebElement; static getNativeElement(el: TestElement): webdriver.WebElement; static loader(driver: webdriver.WebDriver, options?: WebDriverHarnessEnvironmentOptions): HarnessLoader; + // (undocumented) waitForTasksOutsideAngular(): Promise; } diff --git a/goldens/cdk/tree/index.api.md b/goldens/cdk/tree/index.api.md index 9698b0bc6529..105f7952ca45 100644 --- a/goldens/cdk/tree/index.api.md +++ b/goldens/cdk/tree/index.api.md @@ -213,6 +213,7 @@ export class CdkTreeNode implements OnDestroy, OnInit, TreeKeyManagerI // @public export class CdkTreeNodeDef { constructor(...args: unknown[]); + // (undocumented) template: TemplateRef; when: (index: number, nodeData: T) => boolean; // (undocumented) diff --git a/goldens/material/autocomplete/index.api.md b/goldens/material/autocomplete/index.api.md index 734b7b16abcc..407e5a351292 100644 --- a/goldens/material/autocomplete/index.api.md +++ b/goldens/material/autocomplete/index.api.md @@ -35,16 +35,16 @@ export function getMatAutocompleteMissingPanelError(): Error; // @public export const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions; // @public export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () => ScrollStrategy; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: any[]; @@ -113,6 +113,7 @@ export class MatAutocomplete implements AfterContentInit, OnDestroy { // (undocumented) protected _skipPredicate(): boolean; _syncParentProperties(): void; + // (undocumented) template: TemplateRef; // (undocumented) static ɵcmp: i0.ɵɵComponentDeclaration; diff --git a/goldens/material/button-toggle/index.api.md b/goldens/material/button-toggle/index.api.md index d43e1df4fd0e..ca4d258d5ee7 100644 --- a/goldens/material/button-toggle/index.api.md +++ b/goldens/material/button-toggle/index.api.md @@ -23,7 +23,7 @@ export const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY(): MatButtonToggleDefaultOptions; // @public diff --git a/goldens/material/button/index.api.md b/goldens/material/button/index.api.md index 0ef290fae0d3..f2d78552cedf 100644 --- a/goldens/material/button/index.api.md +++ b/goldens/material/button/index.api.md @@ -20,7 +20,7 @@ export const MAT_BUTTON_CONFIG: InjectionToken; // @public export const MAT_FAB_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions; // @public diff --git a/goldens/material/checkbox/index.api.md b/goldens/material/checkbox/index.api.md index 27e043353587..0c9deac3d052 100644 --- a/goldens/material/checkbox/index.api.md +++ b/goldens/material/checkbox/index.api.md @@ -21,7 +21,7 @@ import { Validator } from '@angular/forms'; // @public export const MAT_CHECKBOX_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions; // @public (undocumented) diff --git a/goldens/material/core/index.api.md b/goldens/material/core/index.api.md index 1d16f9ab5ec9..bdcb6a78fda8 100644 --- a/goldens/material/core/index.api.md +++ b/goldens/material/core/index.api.md @@ -151,7 +151,7 @@ export const MAT_DATE_FORMATS: InjectionToken; // @public export const MAT_DATE_LOCALE: InjectionToken<{}>; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_DATE_LOCALE_FACTORY(): {}; // @public (undocumented) diff --git a/goldens/material/datepicker/index.api.md b/goldens/material/datepicker/index.api.md index c1403ede28db..ab4b461a298f 100644 --- a/goldens/material/datepicker/index.api.md +++ b/goldens/material/datepicker/index.api.md @@ -92,29 +92,29 @@ export const MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken ScrollStrategy>; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () => ScrollStrategy; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: any[]; useFactory: typeof MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY; }; -// @public +// @public (undocumented) export const MAT_DATEPICKER_VALIDATORS: any; -// @public +// @public (undocumented) export const MAT_DATEPICKER_VALUE_ACCESSOR: any; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel, adapter: DateAdapter): MatSingleDateSelectionModel; // @public @deprecated export const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel, adapter: DateAdapter): MatSingleDateSelectionModel; // @public @deprecated diff --git a/goldens/material/form-field/index.api.md b/goldens/material/form-field/index.api.md index 927940c1be22..d38b225f2eda 100644 --- a/goldens/material/form-field/index.api.md +++ b/goldens/material/form-field/index.api.md @@ -22,13 +22,13 @@ import { QueryList } from '@angular/core'; // @public export type FloatLabelType = 'always' | 'auto'; -// @public +// @public (undocumented) export function getMatFormFieldDuplicatedHintError(align: string): Error; -// @public +// @public (undocumented) export function getMatFormFieldMissingControlError(): Error; -// @public +// @public (undocumented) export function getMatFormFieldPlaceholderConflictError(): Error; // @public diff --git a/goldens/material/icon/index.api.md b/goldens/material/icon/index.api.md index 5140ccaa3304..5c60040d4e7e 100644 --- a/goldens/material/icon/index.api.md +++ b/goldens/material/icon/index.api.md @@ -31,14 +31,14 @@ export function getMatIconNameNotFoundError(iconName: string): Error; // @public export function getMatIconNoHttpProviderError(): Error; -// @public @deprecated +// @public @deprecated (undocumented) export const ICON_REGISTRY_PROVIDER: { provide: typeof MatIconRegistry; deps: (Optional[] | typeof DomSanitizer | typeof ErrorHandler)[]; useFactory: typeof ICON_REGISTRY_PROVIDER_FACTORY; }; -// @public @deprecated +// @public @deprecated (undocumented) export function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry: MatIconRegistry, httpClient: HttpClient, sanitizer: DomSanitizer, errorHandler: ErrorHandler, document?: any): MatIconRegistry; // @public @@ -56,7 +56,7 @@ export const MAT_ICON_DEFAULT_OPTIONS: InjectionToken; // @public export const MAT_ICON_LOCATION: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_ICON_LOCATION_FACTORY(): MatIconLocation; // @public diff --git a/goldens/material/input/index.api.md b/goldens/material/input/index.api.md index d0ab82b1bab6..a5e41f6684c1 100644 --- a/goldens/material/input/index.api.md +++ b/goldens/material/input/index.api.md @@ -28,7 +28,7 @@ import { QueryList } from '@angular/core'; import { Subject } from 'rxjs'; import { WritableSignal } from '@angular/core'; -// @public +// @public (undocumented) export function getMatInputUnsupportedTypeError(type: string): Error; // @public diff --git a/goldens/material/menu/index.api.md b/goldens/material/menu/index.api.md index f791dc2d3cde..4664f53f937a 100644 --- a/goldens/material/menu/index.api.md +++ b/goldens/material/menu/index.api.md @@ -38,7 +38,7 @@ export const MAT_MENU_PANEL: InjectionToken>; // @public export const MAT_MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: any[]; @@ -104,6 +104,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnI // (undocumented) _setIsOpen(isOpen: boolean): void; setPositionClasses(posX?: MenuPositionX, posY?: MenuPositionY): void; + // (undocumented) templateRef: TemplateRef; get xPosition(): MenuPositionX; set xPosition(value: MenuPositionX); diff --git a/goldens/material/paginator/index.api.md b/goldens/material/paginator/index.api.md index b5390709d446..211b4cbbb6d8 100644 --- a/goldens/material/paginator/index.api.md +++ b/goldens/material/paginator/index.api.md @@ -53,14 +53,14 @@ import { ViewportRuler } from '@angular/cdk/scrolling'; // @public export const MAT_PAGINATOR_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_PAGINATOR_INTL_PROVIDER: { provide: typeof MatPaginatorIntl; deps: Optional[][]; useFactory: typeof MAT_PAGINATOR_INTL_PROVIDER_FACTORY; }; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl): MatPaginatorIntl; // @public diff --git a/goldens/material/progress-bar/index.api.md b/goldens/material/progress-bar/index.api.md index 7fe9eb4907cd..fbe2dadee37f 100644 --- a/goldens/material/progress-bar/index.api.md +++ b/goldens/material/progress-bar/index.api.md @@ -18,7 +18,7 @@ export const MAT_PROGRESS_BAR_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation; // @public (undocumented) diff --git a/goldens/material/progress-spinner/index.api.md b/goldens/material/progress-spinner/index.api.md index 39d3cba1cc3e..efa74ad66a88 100644 --- a/goldens/material/progress-spinner/index.api.md +++ b/goldens/material/progress-spinner/index.api.md @@ -12,7 +12,7 @@ import { InjectionToken } from '@angular/core'; // @public export const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions; // @public (undocumented) diff --git a/goldens/material/radio/index.api.md b/goldens/material/radio/index.api.md index 5af882a78f5f..3d0b335f99d9 100644 --- a/goldens/material/radio/index.api.md +++ b/goldens/material/radio/index.api.md @@ -21,7 +21,7 @@ import { QueryList } from '@angular/core'; // @public (undocumented) export const MAT_RADIO_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions; // @public diff --git a/goldens/material/select/index.api.md b/goldens/material/select/index.api.md index 2f5bc1a33b51..7103f085c443 100644 --- a/goldens/material/select/index.api.md +++ b/goldens/material/select/index.api.md @@ -48,14 +48,14 @@ export const MAT_SELECT_CONFIG: InjectionToken; // @public export const MAT_SELECT_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_SELECT_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: any[]; useFactory: typeof MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY; }; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(_overlay: unknown): () => ScrollStrategy; // @public diff --git a/goldens/material/sidenav/index.api.md b/goldens/material/sidenav/index.api.md index b90b6dd412de..2b2016fc7502 100644 --- a/goldens/material/sidenav/index.api.md +++ b/goldens/material/sidenav/index.api.md @@ -25,7 +25,7 @@ import { Subject } from 'rxjs'; // @public export const MAT_DRAWER_DEFAULT_AUTOSIZE: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY(): boolean; // @public diff --git a/goldens/material/slider/index.api.md b/goldens/material/slider/index.api.md index 9e67a17760dc..9d576c3191fd 100644 --- a/goldens/material/slider/index.api.md +++ b/goldens/material/slider/index.api.md @@ -42,6 +42,7 @@ export class MatSlider implements AfterViewInit, OnDestroy, _MatSlider { readonly _elementRef: ElementRef; // (undocumented) _endThumbTransform: string; + // (undocumented) protected endValueIndicatorText: string; _getInput(thumbPosition: _MatThumb): _MatSliderThumb | _MatSliderRangeThumb | undefined; _getThumb(thumbPosition: _MatThumb): _MatSliderVisualThumb; @@ -106,6 +107,7 @@ export class MatSlider implements AfterViewInit, OnDestroy, _MatSlider { showTickMarks: boolean; // (undocumented) _startThumbTransform: string; + // (undocumented) protected startValueIndicatorText: string; get step(): number; set step(v: number); @@ -161,6 +163,7 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan _getDefaultValue(): number; getMaxPos(): number; getMinPos(): number; + // (undocumented) getSibling(): _MatSliderRangeThumb | undefined; _isEndThumb: boolean; _isLeftThumb: boolean; @@ -207,12 +210,14 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA // (undocumented) _clamp(v: number): number; protected readonly _destroyed: Subject; + // (undocumented) get disabled(): boolean; set disabled(v: boolean); readonly dragEnd: EventEmitter; readonly dragStart: EventEmitter; // (undocumented) readonly _elementRef: ElementRef; + // (undocumented) get fillPercentage(): number; _fixValue(event: PointerEvent): void; // (undocumented) @@ -221,7 +226,9 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA _getDefaultValue(): number; _hostElement: HTMLInputElement; _initialValue: string | undefined; + // (undocumented) initProps(): void; + // (undocumented) initUI(): void; // (undocumented) _initValue(): void; @@ -229,8 +236,10 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA protected _isControlInitialized: boolean; _isFocused: boolean; _knobRadius: number; + // (undocumented) get max(): number; set max(v: number); + // (undocumented) get min(): number; set min(v: number); // (undocumented) diff --git a/goldens/material/snack-bar/index.api.md b/goldens/material/snack-bar/index.api.md index 4284125a1961..56c8a3c2b25f 100644 --- a/goldens/material/snack-bar/index.api.md +++ b/goldens/material/snack-bar/index.api.md @@ -37,7 +37,7 @@ export const MAT_SNACK_BAR_DATA: InjectionToken; // @public export const MAT_SNACK_BAR_DEFAULT_OPTIONS: InjectionToken>; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY(): MatSnackBarConfig; // @public diff --git a/goldens/material/sort/index.api.md b/goldens/material/sort/index.api.md index 46cae4a290ba..0069165102f4 100644 --- a/goldens/material/sort/index.api.md +++ b/goldens/material/sort/index.api.md @@ -30,14 +30,14 @@ export interface ArrowViewStateTransition { // @public export const MAT_SORT_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_SORT_HEADER_INTL_PROVIDER: { provide: typeof MatSortHeaderIntl; deps: Optional[][]; useFactory: typeof MAT_SORT_HEADER_INTL_PROVIDER_FACTORY; }; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: MatSortHeaderIntl): MatSortHeaderIntl; // @public diff --git a/goldens/material/stepper/index.api.md b/goldens/material/stepper/index.api.md index c4ecf404a356..f897085b508e 100644 --- a/goldens/material/stepper/index.api.md +++ b/goldens/material/stepper/index.api.md @@ -33,14 +33,14 @@ import { Subject } from 'rxjs'; import { TemplatePortal } from '@angular/cdk/portal'; import { TemplateRef } from '@angular/core'; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_STEPPER_INTL_PROVIDER: { provide: typeof MatStepperIntl; deps: Optional[][]; useFactory: typeof MAT_STEPPER_INTL_PROVIDER_FACTORY; }; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl): MatStepperIntl; // @public (undocumented) diff --git a/goldens/material/tabs/index.api.md b/goldens/material/tabs/index.api.md index 27b38e5a595d..e5c883649878 100644 --- a/goldens/material/tabs/index.api.md +++ b/goldens/material/tabs/index.api.md @@ -150,6 +150,7 @@ export class MatTab implements OnInit, OnChanges, OnDestroy { bodyClass: string | string[]; // (undocumented) _closestTabGroup: any; + // (undocumented) get content(): TemplatePortal | null; disabled: boolean; id: string | null; @@ -321,7 +322,7 @@ export class MatTabGroup implements AfterViewInit, AfterContentInit, AfterConten static ɵfac: i0.ɵɵFactoryDeclaration; } -// @public +// @public (undocumented) export interface MatTabGroupBaseHeader { // (undocumented) _alignInkBarToSelectedTab(): void; diff --git a/goldens/material/tooltip/index.api.md b/goldens/material/tooltip/index.api.md index 198a0989409f..1cf8bd5364f1 100644 --- a/goldens/material/tooltip/index.api.md +++ b/goldens/material/tooltip/index.api.md @@ -29,16 +29,16 @@ export function getMatTooltipInvalidPositionError(position: string): Error; // @public export const MAT_TOOLTIP_DEFAULT_OPTIONS: InjectionToken; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MatTooltipDefaultOptions; // @public export const MAT_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; -// @public @deprecated +// @public @deprecated (undocumented) export function MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () => ScrollStrategy; -// @public @deprecated +// @public @deprecated (undocumented) export const MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: any[]; diff --git a/src/cdk-experimental/column-resize/coalesced-style-scheduler.ts b/src/cdk-experimental/column-resize/coalesced-style-scheduler.ts index 35d107229320..22cde73e8863 100644 --- a/src/cdk-experimental/column-resize/coalesced-style-scheduler.ts +++ b/src/cdk-experimental/column-resize/coalesced-style-scheduler.ts @@ -9,7 +9,7 @@ import {Injectable, InjectionToken, NgZone, inject} from '@angular/core'; /** - * @docs-private + * @nodoc */ export class _Schedule { tasks: (() => unknown)[] = []; @@ -26,7 +26,7 @@ export const _COALESCED_STYLE_SCHEDULER = new InjectionToken<_CoalescedStyleSche * This can significantly improve performance when separate consecutive functions are * reading from the CSSDom and then mutating it. * - * @docs-private + * @nodoc */ @Injectable() export class _CoalescedStyleScheduler { diff --git a/src/cdk-experimental/column-resize/column-resize-notifier.ts b/src/cdk-experimental/column-resize/column-resize-notifier.ts index 53c9f0a4d7a5..07d3ab173b25 100644 --- a/src/cdk-experimental/column-resize/column-resize-notifier.ts +++ b/src/cdk-experimental/column-resize/column-resize-notifier.ts @@ -38,7 +38,7 @@ export interface ColumnSizeAction extends ColumnSize { /** * Originating source of column resize events within a table. - * @docs-private + * @nodoc */ @Injectable() export class ColumnResizeNotifierSource { diff --git a/src/cdk-experimental/column-resize/column-resize.ts b/src/cdk-experimental/column-resize/column-resize.ts index 5bf8c4359f55..2305e694ae91 100644 --- a/src/cdk-experimental/column-resize/column-resize.ts +++ b/src/cdk-experimental/column-resize/column-resize.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator} from '@angular/cdk/a11y'; import { AfterViewInit, Directive, @@ -17,15 +18,14 @@ import { OnDestroy, Renderer2, } from '@angular/core'; -import {_IdGenerator} from '@angular/cdk/a11y'; import {merge, Subject} from 'rxjs'; import {mapTo, pairwise, startWith, take, takeUntil} from 'rxjs/operators'; import {_closest} from '../popover-edit'; import {ColumnResizeNotifier, ColumnResizeNotifierSource} from './column-resize-notifier'; -import {HEADER_CELL_SELECTOR, RESIZE_OVERLAY_SELECTOR} from './selectors'; import {HeaderRowEventDispatcher} from './event-dispatcher'; +import {HEADER_CELL_SELECTOR, RESIZE_OVERLAY_SELECTOR} from './selectors'; const HOVER_OR_ACTIVE_CLASS = 'cdk-column-resize-hover-or-active'; const WITH_RESIZED_COLUMN_CLASS = 'cdk-column-resize-with-resized-column'; @@ -65,7 +65,7 @@ export abstract class ColumnResize implements AfterViewInit, OnDestroy { /** The id attribute of the table, if specified. */ id?: string; - /** @docs-private Whether a call to updateStickyColumnStyles is pending after a resize. */ + /** @nodoc Whether a call to updateStickyColumnStyles is pending after a resize. */ _flushPending = false; /** diff --git a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts index 0d2a47a87fcd..afe5d53991e3 100644 --- a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts +++ b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts @@ -67,7 +67,7 @@ export class ItemSizeAverager { /** Virtual scrolling strategy for lists with items of unknown or dynamic size. */ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ scrolledIndexChange = new Observable(() => { // TODO(mmalerba): Implement. if (typeof ngDevMode === 'undefined' || ngDevMode) { @@ -135,14 +135,14 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { this._viewport = null; } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onContentScrolled() { if (this._viewport) { this._updateRenderedContentAfterScroll(); } } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onDataLengthChanged() { if (this._viewport) { this._renderContentForCurrentOffset(); @@ -150,14 +150,14 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { } } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onContentRendered() { if (this._viewport) { this._checkRenderedContentSize(); } } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onRenderedOffsetChanged() { if (this._viewport) { this._checkRenderedContentOffset(); diff --git a/src/cdk/a11y/focus-trap/configurable-focus-trap.ts b/src/cdk/a11y/focus-trap/configurable-focus-trap.ts index e95a81b6a7dc..0fef7ee921c2 100644 --- a/src/cdk/a11y/focus-trap/configurable-focus-trap.ts +++ b/src/cdk/a11y/focus-trap/configurable-focus-trap.ts @@ -53,13 +53,13 @@ export class ConfigurableFocusTrap extends FocusTrap implements ManagedFocusTrap super.destroy(); } - /** @docs-private Implemented as part of ManagedFocusTrap. */ + /** @nodoc Implemented as part of ManagedFocusTrap. */ _enable() { this._inertStrategy.preventFocus(this); this.toggleAnchors(true); } - /** @docs-private Implemented as part of ManagedFocusTrap. */ + /** @nodoc Implemented as part of ManagedFocusTrap. */ _disable() { this._inertStrategy.allowFocus(this); this.toggleAnchors(false); diff --git a/src/cdk/a11y/key-manager/noop-tree-key-manager.ts b/src/cdk/a11y/key-manager/noop-tree-key-manager.ts index e58e397e1e9e..79dab9273212 100644 --- a/src/cdk/a11y/key-manager/noop-tree-key-manager.ts +++ b/src/cdk/a11y/key-manager/noop-tree-key-manager.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Provider} from '@angular/core'; import {Subject} from 'rxjs'; import {TREE_KEY_MANAGER} from './tree-key-manager'; import { @@ -13,7 +14,6 @@ import { TreeKeyManagerItem, TreeKeyManagerStrategy, } from './tree-key-manager-strategy'; -import {Provider} from '@angular/core'; // NoopTreeKeyManager is a "noop" implementation of TreeKeyMangerStrategy. Methods are noops. Does // not emit to streams. @@ -21,7 +21,7 @@ import {Provider} from '@angular/core'; // Used for applications built before TreeKeyManager to opt-out of TreeKeyManager and revert to // legacy behavior. /** - * @docs-private + * @nodoc * * Opt-out of Tree of key manager behavior. * @@ -68,7 +68,7 @@ export class NoopTreeKeyManager implements TreeKey } /** - * @docs-private + * @nodoc * * Opt-out of Tree of key manager behavior. * @@ -89,7 +89,7 @@ export function NOOP_TREE_KEY_MANAGER_FACTORY< } /** - * @docs-private + * @nodoc * * Opt-out of Tree of key manager behavior. * diff --git a/src/cdk/a11y/key-manager/tree-key-manager.ts b/src/cdk/a11y/key-manager/tree-key-manager.ts index 28318cd1ee94..e04aa774c0d0 100644 --- a/src/cdk/a11y/key-manager/tree-key-manager.ts +++ b/src/cdk/a11y/key-manager/tree-key-manager.ts @@ -7,9 +7,9 @@ */ import {InjectionToken, QueryList} from '@angular/core'; -import {coerceObservable} from '../../coercion/private'; import {Observable, Subject, Subscription, isObservable, of as observableOf} from 'rxjs'; import {take} from 'rxjs/operators'; +import {coerceObservable} from '../../coercion/private'; import { TreeKeyManagerFactory, TreeKeyManagerItem, @@ -412,7 +412,7 @@ export class TreeKeyManager implements TreeKeyMana } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -427,7 +427,7 @@ export const TREE_KEY_MANAGER = new InjectionToken>(' }); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/cdk/a11y/live-announcer/live-announcer-tokens.ts b/src/cdk/a11y/live-announcer/live-announcer-tokens.ts index 8294bb4a7144..cd9538f779b9 100644 --- a/src/cdk/a11y/live-announcer/live-announcer-tokens.ts +++ b/src/cdk/a11y/live-announcer/live-announcer-tokens.ts @@ -23,7 +23,7 @@ export const LIVE_ANNOUNCER_ELEMENT_TOKEN = new InjectionToken = new EventEmitter(); diff --git a/src/cdk/bidi/dir-document-token.ts b/src/cdk/bidi/dir-document-token.ts index 03296028378a..40c9d210e9ed 100644 --- a/src/cdk/bidi/dir-document-token.ts +++ b/src/cdk/bidi/dir-document-token.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {inject, InjectionToken, DOCUMENT} from '@angular/core'; +import {DOCUMENT, inject, InjectionToken} from '@angular/core'; /** * Injection token used to inject the document into Directionality. @@ -21,7 +21,7 @@ import {inject, InjectionToken, DOCUMENT} from '@angular/core'; * This token is defined in a separate file from Directionality as a workaround for * https://github.com/angular/angular/issues/22559 * - * @docs-private + * @nodoc */ export const DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', { providedIn: 'root', @@ -29,7 +29,7 @@ export const DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', { }); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/cdk/bidi/dir.ts b/src/cdk/bidi/dir.ts index 20c1874718f3..4baf64aeaa50 100644 --- a/src/cdk/bidi/dir.ts +++ b/src/cdk/bidi/dir.ts @@ -40,7 +40,7 @@ export class Dir implements Directionality, AfterContentInit, OnDestroy { /** Event emitted when the direction changes. */ @Output('dirChange') readonly change = new EventEmitter(); - /** @docs-private */ + /** @nodoc */ @Input() get dir(): Direction { return this.valueSignal(); diff --git a/src/cdk/coercion/boolean-property.ts b/src/cdk/coercion/boolean-property.ts index ce29eb428f94..31a1925d6970 100644 --- a/src/cdk/coercion/boolean-property.ts +++ b/src/cdk/coercion/boolean-property.ts @@ -8,7 +8,7 @@ /** * Type describing the allowed values for a boolean input. - * @docs-private + * @nodoc */ export type BooleanInput = string | boolean | null | undefined; diff --git a/src/cdk/coercion/number-property.ts b/src/cdk/coercion/number-property.ts index 3e84ca381f19..eaa6b44548aa 100644 --- a/src/cdk/coercion/number-property.ts +++ b/src/cdk/coercion/number-property.ts @@ -8,7 +8,7 @@ /** * Type describing the allowed values for a number input - * @docs-private + * @nodoc */ export type NumberInput = string | number | null | undefined; @@ -24,7 +24,7 @@ export function coerceNumberProperty(value: any, fallbackValue = 0) { /** * Whether the provided value is considered a number. - * @docs-private + * @nodoc */ export function _isNumberValue(value: any): boolean { // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string, diff --git a/src/cdk/collections/selection-model.ts b/src/cdk/collections/selection-model.ts index 3519e9d5dc76..86ee42d8a7b7 100644 --- a/src/cdk/collections/selection-model.ts +++ b/src/cdk/collections/selection-model.ts @@ -246,7 +246,7 @@ export class SelectionModel { /** * Event emitted when the value of a MatSelectionModel has changed. - * @docs-private + * @nodoc */ export interface SelectionChange { /** Model that dispatched the event. */ @@ -260,7 +260,7 @@ export interface SelectionChange { /** * Returns an error that reports that multiple values are passed into a selection model * with a single value. - * @docs-private + * @nodoc */ export function getMultipleValuesInSingleSelectionError() { return Error('Cannot pass multiple values into SelectionModel with single-value mode.'); diff --git a/src/cdk/collections/view-repeater.ts b/src/cdk/collections/view-repeater.ts index eeaf232cd766..fdd48e03a4d3 100644 --- a/src/cdk/collections/view-repeater.ts +++ b/src/cdk/collections/view-repeater.ts @@ -114,7 +114,7 @@ export interface _ViewRepeater> { /** * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only. - * @docs-private + * @nodoc */ export const _VIEW_REPEATER_STRATEGY = new InjectionToken< _ViewRepeater> diff --git a/src/cdk/dialog/dialog-container.ts b/src/cdk/dialog/dialog-container.ts index 433582a1f4ee..8ce782b47f6a 100644 --- a/src/cdk/dialog/dialog-container.ts +++ b/src/cdk/dialog/dialog-container.ts @@ -27,6 +27,7 @@ import { ChangeDetectorRef, Component, ComponentRef, + DOCUMENT, ElementRef, EmbeddedViewRef, Injector, @@ -37,10 +38,9 @@ import { ViewEncapsulation, afterNextRender, inject, - DOCUMENT, } from '@angular/core'; -import {DialogConfig, DialogContainer} from './dialog-config'; import {Observable, Subject} from 'rxjs'; +import {DialogConfig, DialogContainer} from './dialog-config'; export function throwDialogContentAlreadyAttachedError() { throw Error('Attempting to attach dialog content after content is already attached'); @@ -48,7 +48,7 @@ export function throwDialogContentAlreadyAttachedError() { /** * Internal component that wraps user-provided dialog content. - * @docs-private + * @nodoc */ @Component({ selector: 'cdk-dialog-container', diff --git a/src/cdk/drag-drop/dom/styling.ts b/src/cdk/drag-drop/dom/styling.ts index 429936438096..67bc82d51b7e 100644 --- a/src/cdk/drag-drop/dom/styling.ts +++ b/src/cdk/drag-drop/dom/styling.ts @@ -19,7 +19,7 @@ export interface DragCSSStyleDeclaration extends CSSStyleDeclaration { /** * Shallow-extends a stylesheet object with another stylesheet-like object. * Note that the keys in `source` have to be dash-cased. - * @docs-private + * @nodoc */ export function extendStyles( dest: CSSStyleDeclaration, @@ -45,7 +45,7 @@ export function extendStyles( * Toggles whether the native drag interactions should be enabled for an element. * @param element Element on which to toggle the drag interactions. * @param enable Whether the drag interactions should be enabled. - * @docs-private + * @nodoc */ export function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) { const userSelect = enable ? '' : 'none'; @@ -66,7 +66,7 @@ export function toggleNativeDragInteractions(element: HTMLElement, enable: boole * @param element Element whose visibility to toggle * @param enable Whether the element should be visible. * @param importantProperties Properties to be set as `!important`. - * @docs-private + * @nodoc */ export function toggleVisibility( element: HTMLElement, diff --git a/src/cdk/drag-drop/drag-drop-registry.ts b/src/cdk/drag-drop/drag-drop-registry.ts index 358b4a23daaf..58185acab24a 100644 --- a/src/cdk/drag-drop/drag-drop-registry.ts +++ b/src/cdk/drag-drop/drag-drop-registry.ts @@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, + DOCUMENT, Injectable, ListenerOptions, NgZone, @@ -18,14 +19,13 @@ import { WritableSignal, inject, signal, - DOCUMENT, } from '@angular/core'; -import {_CdkPrivateStyleLoader} from '../private'; import {Observable, Observer, Subject, merge} from 'rxjs'; -import type {DropListRef} from './drop-list-ref'; -import type {DragRef} from './drag-ref'; +import {_CdkPrivateStyleLoader} from '../private'; import type {CdkDrag} from './directives/drag'; +import type {DragRef} from './drag-ref'; +import type {DropListRef} from './drop-list-ref'; /** Event options that can be used to bind a capturing event. */ const capturingEventOptions = { @@ -40,7 +40,7 @@ const activeCapturingEventOptions = { /** * Component used to load the drag&drop reset styles. - * @docs-private + * @nodoc */ @Component({ styleUrl: 'resets.css', @@ -54,7 +54,7 @@ export class _ResetsLoader {} /** * Service that keeps track of all the drag item and drop container * instances, and manages global event listeners on the `document`. - * @docs-private + * @nodoc */ @Injectable({providedIn: 'root'}) export class DragDropRegistry implements OnDestroy { diff --git a/src/cdk/drag-drop/drag-parent.ts b/src/cdk/drag-drop/drag-parent.ts index 0811935149a1..4de88d76c02b 100644 --- a/src/cdk/drag-drop/drag-parent.ts +++ b/src/cdk/drag-drop/drag-parent.ts @@ -13,6 +13,6 @@ import type {CdkDrag} from './directives/drag'; * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily * to avoid circular imports. - * @docs-private + * @nodoc */ export const CDK_DRAG_PARENT = new InjectionToken('CDK_DRAG_PARENT'); diff --git a/src/cdk/drag-drop/sorting/drop-list-sort-strategy.ts b/src/cdk/drag-drop/sorting/drop-list-sort-strategy.ts index 51b820ee8c24..f82598377090 100644 --- a/src/cdk/drag-drop/sorting/drop-list-sort-strategy.ts +++ b/src/cdk/drag-drop/sorting/drop-list-sort-strategy.ts @@ -10,13 +10,13 @@ import type {DragRef} from '../drag-ref'; /** * Function that is used to determine whether an item can be sorted into a particular index. - * @docs-private + * @nodoc */ export type SortPredicate = (index: number, item: T) => boolean; /** * Strategy used to sort and position items within a drop list. - * @docs-private + * @nodoc */ export interface DropListSortStrategy { start(items: readonly DragRef[]): void; diff --git a/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts b/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts index 9fbe5d4f3a16..7ee14edd4744 100644 --- a/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts +++ b/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts @@ -7,15 +7,15 @@ */ import {_getShadowRoot} from '../../platform'; -import {moveItemInArray} from '../drag-utils'; -import {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy'; import {DragDropRegistry} from '../drag-drop-registry'; import type {DragRef} from '../drag-ref'; +import {moveItemInArray} from '../drag-utils'; +import {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy'; /** * Strategy that only supports sorting on a list that might wrap. * Items are reordered by moving their DOM nodes around. - * @docs-private + * @nodoc */ export class MixedSortStrategy implements DropListSortStrategy { /** Root element container of the drop list. */ diff --git a/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts b/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts index b3c5858234f3..0f03800e8d7c 100644 --- a/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts +++ b/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts @@ -7,16 +7,16 @@ */ import {Direction} from '../../bidi'; +import {adjustDomRect, getMutableClientRect, isInsideClientRect} from '../dom/dom-rect'; +import {combineTransforms} from '../dom/styling'; import {DragDropRegistry} from '../drag-drop-registry'; +import type {DragRef} from '../drag-ref'; import {moveItemInArray} from '../drag-utils'; -import {combineTransforms} from '../dom/styling'; -import {adjustDomRect, getMutableClientRect, isInsideClientRect} from '../dom/dom-rect'; import {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy'; -import type {DragRef} from '../drag-ref'; /** * Entry in the position cache for draggable items. - * @docs-private + * @nodoc */ interface CachedItemPosition { /** Instance of the drag item. */ @@ -32,7 +32,7 @@ interface CachedItemPosition { /** * Strategy that only supports sorting along a single axis. * Items are reordered using CSS transforms which allows for sorting to be animated. - * @docs-private + * @nodoc */ export class SingleAxisSortStrategy implements DropListSortStrategy { /** Root element container of the drop list. */ diff --git a/src/cdk/listbox/listbox.ts b/src/cdk/listbox/listbox.ts index b4405757ea89..aae0c4234611 100644 --- a/src/cdk/listbox/listbox.ts +++ b/src/cdk/listbox/listbox.ts @@ -6,6 +6,26 @@ * found in the LICENSE file at https://angular.dev/license */ +import { + AfterContentInit, + booleanAttribute, + ChangeDetectorRef, + ContentChildren, + Directive, + ElementRef, + forwardRef, + inject, + Input, + NgZone, + OnDestroy, + Output, + QueryList, + Renderer2, + signal, +} from '@angular/core'; +import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; +import {defer, merge, Observable, Subject} from 'rxjs'; +import {filter, map, startWith, switchMap, takeUntil} from 'rxjs/operators'; import { _IdGenerator, ActiveDescendantKeyManager, @@ -28,26 +48,6 @@ import { UP_ARROW, } from '../keycodes'; import {Platform} from '../platform'; -import { - AfterContentInit, - booleanAttribute, - ChangeDetectorRef, - ContentChildren, - Directive, - ElementRef, - forwardRef, - inject, - Input, - NgZone, - OnDestroy, - Output, - QueryList, - Renderer2, - signal, -} from '@angular/core'; -import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; -import {defer, merge, Observable, Subject} from 'rxjs'; -import {filter, map, startWith, switchMap, takeUntil} from 'rxjs/operators'; /** * An implementation of SelectionModel that internally always represents the selection as a @@ -195,7 +195,7 @@ export class CdkOption implements ListKeyManagerOption, Highlightab /** * No-op implemented as a part of `Highlightable`. - * @docs-private + * @nodoc */ setActiveStyles() { // If the listbox is using `aria-activedescendant` the option won't have focus so the @@ -207,7 +207,7 @@ export class CdkOption implements ListKeyManagerOption, Highlightab /** * No-op implemented as a part of `Highlightable`. - * @docs-private + * @nodoc */ setInactiveStyles() {} @@ -585,7 +585,7 @@ export class CdkListbox implements AfterContentInit, OnDestroy, Con /** * Registers a callback to be invoked when the listbox's value changes from user input. * @param fn The callback to register - * @docs-private + * @nodoc */ registerOnChange(fn: (value: readonly T[]) => void): void { this._onChange = fn; @@ -594,7 +594,7 @@ export class CdkListbox implements AfterContentInit, OnDestroy, Con /** * Registers a callback to be invoked when the listbox is blurred by the user. * @param fn The callback to register - * @docs-private + * @nodoc */ registerOnTouched(fn: () => {}): void { this._onTouched = fn; @@ -603,7 +603,7 @@ export class CdkListbox implements AfterContentInit, OnDestroy, Con /** * Sets the listbox's value. * @param value The new value of the listbox - * @docs-private + * @nodoc */ writeValue(value: readonly T[]): void { this._setSelection(value); @@ -613,7 +613,7 @@ export class CdkListbox implements AfterContentInit, OnDestroy, Con /** * Sets the disabled state of the listbox. * @param isDisabled The new disabled state - * @docs-private + * @nodoc */ setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; diff --git a/src/cdk/menu/menu-errors.ts b/src/cdk/menu/menu-errors.ts index 364a998b6b98..19a5c340993e 100644 --- a/src/cdk/menu/menu-errors.ts +++ b/src/cdk/menu/menu-errors.ts @@ -8,7 +8,7 @@ /** * Throws an exception when an instance of the PointerFocusTracker is not provided. - * @docs-private + * @nodoc */ export function throwMissingPointerFocusTracker() { throw Error('expected an instance of PointerFocusTracker to be provided'); @@ -16,7 +16,7 @@ export function throwMissingPointerFocusTracker() { /** * Throws an exception when a reference to the parent menu is not provided. - * @docs-private + * @nodoc */ export function throwMissingMenuReference() { throw Error('expected a reference to the parent menu'); diff --git a/src/cdk/observers/observe-content.ts b/src/cdk/observers/observe-content.ts index b6eab4a88634..2d25c6d4b86e 100644 --- a/src/cdk/observers/observe-content.ts +++ b/src/cdk/observers/observe-content.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.dev/license */ -import {NumberInput, coerceElement, coerceNumberProperty} from '../coercion'; import { AfterContentInit, Directive, @@ -23,6 +22,7 @@ import { } from '@angular/core'; import {Observable, Observer, Subject, Subscription} from 'rxjs'; import {debounceTime, filter, map} from 'rxjs/operators'; +import {NumberInput, coerceElement, coerceNumberProperty} from '../coercion'; // Angular may add, remove, or edit comment nodes during change detection. We don't care about // these changes because they don't affect the user-preceived content, and worse it can cause @@ -53,7 +53,7 @@ function shouldIgnoreRecord(record: MutationRecord) { /** * Factory that creates a new MutationObserver and allows us to stub it out in unit tests. - * @docs-private + * @nodoc */ @Injectable({providedIn: 'root'}) export class MutationObserverFactory { diff --git a/src/cdk/overlay/overlay-directives.ts b/src/cdk/overlay/overlay-directives.ts index 48a1a1a57a95..321fee956cc9 100644 --- a/src/cdk/overlay/overlay-directives.ts +++ b/src/cdk/overlay/overlay-directives.ts @@ -6,13 +6,12 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Direction, Directionality} from '../bidi'; -import {ESCAPE, hasModifierKey} from '../keycodes'; -import {TemplatePortal} from '../portal'; import { + booleanAttribute, Directive, ElementRef, EventEmitter, + inject, InjectionToken, Injector, Input, @@ -23,12 +22,13 @@ import { SimpleChanges, TemplateRef, ViewContainerRef, - booleanAttribute, - inject, } from '@angular/core'; -import {_getEventTarget} from '../platform'; import {Subscription} from 'rxjs'; import {takeWhile} from 'rxjs/operators'; +import {Direction, Directionality} from '../bidi'; +import {ESCAPE, hasModifierKey} from '../keycodes'; +import {_getEventTarget} from '../platform'; +import {TemplatePortal} from '../portal'; import {createOverlayRef} from './overlay'; import {OverlayConfig} from './overlay-config'; import {OverlayRef} from './overlay-ref'; @@ -464,7 +464,7 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -476,7 +476,7 @@ export function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY( } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/cdk/overlay/position/connected-position.ts b/src/cdk/overlay/position/connected-position.ts index 4c00af61612c..31bee0225d2b 100644 --- a/src/cdk/overlay/position/connected-position.ts +++ b/src/cdk/overlay/position/connected-position.ts @@ -75,7 +75,7 @@ export class ConnectionPositionPair { * | | * -------------------------- * - * @docs-private + * @nodoc */ export class ScrollingVisibility { isOriginClipped: boolean; @@ -89,7 +89,7 @@ export class ConnectedOverlayPositionChange { constructor( /** The position used as a result of this change. */ public connectionPair: ConnectionPositionPair, - /** @docs-private */ + /** @nodoc */ public scrollableViewProperties: ScrollingVisibility, ) {} } @@ -98,7 +98,7 @@ export class ConnectedOverlayPositionChange { * Validates whether a vertical position property matches the expected values. * @param property Name of the property being validated. * @param value Value of the property being validated. - * @docs-private + * @nodoc */ export function validateVerticalPosition(property: string, value: VerticalConnectionPos) { if (value !== 'top' && value !== 'bottom' && value !== 'center') { @@ -113,7 +113,7 @@ export function validateVerticalPosition(property: string, value: VerticalConnec * Validates whether a horizontal position property matches the expected values. * @param property Name of the property being validated. * @param value Value of the property being validated. - * @docs-private + * @nodoc */ export function validateHorizontalPosition(property: string, value: HorizontalConnectionPos) { if (value !== 'start' && value !== 'end' && value !== 'center') { diff --git a/src/cdk/overlay/position/flexible-connected-position-strategy.ts b/src/cdk/overlay/position/flexible-connected-position-strategy.ts index 21932086e888..e675bb8ecc68 100644 --- a/src/cdk/overlay/position/flexible-connected-position-strategy.ts +++ b/src/cdk/overlay/position/flexible-connected-position-strategy.ts @@ -6,9 +6,13 @@ * found in the LICENSE file at https://angular.dev/license */ -import {PositionStrategy} from './position-strategy'; import {DOCUMENT, ElementRef, Injector} from '@angular/core'; -import {ViewportRuler, CdkScrollable, ViewportScrollPosition} from '../../scrolling'; +import {Observable, Subject, Subscription} from 'rxjs'; +import {coerceArray, coerceCssPixelValue} from '../../coercion'; +import {Platform} from '../../platform'; +import {CdkScrollable, ViewportRuler, ViewportScrollPosition} from '../../scrolling'; +import {OverlayContainer} from '../overlay-container'; +import {OverlayRef} from '../overlay-ref'; import { ConnectedOverlayPositionChange, ConnectionPositionPair, @@ -16,12 +20,8 @@ import { validateHorizontalPosition, validateVerticalPosition, } from './connected-position'; -import {Observable, Subscription, Subject} from 'rxjs'; -import {isElementScrolledOutsideView, isElementClippedByScrolling} from './scroll-clip'; -import {coerceCssPixelValue, coerceArray} from '../../coercion'; -import {Platform} from '../../platform'; -import {OverlayContainer} from '../overlay-container'; -import {OverlayRef} from '../overlay-ref'; +import {PositionStrategy} from './position-strategy'; +import {isElementClippedByScrolling, isElementScrolledOutsideView} from './scroll-clip'; // TODO: refactor clipping detection into a separate thing (part of scrolling module) // TODO: doesn't handle both flexible width and height when it has to scroll along both axis. @@ -217,7 +217,7 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy { * - If pushing is enabled, take the position that went off-screen the least and push it * on-screen. * - If none of the previous criteria were met, use the position that goes off-screen the least. - * @docs-private + * @nodoc */ apply(): void { // We shouldn't do anything if the strategy was disposed or we're on the server. diff --git a/src/cdk/overlay/position/global-position-strategy.ts b/src/cdk/overlay/position/global-position-strategy.ts index c174079b2b4a..38544a6141e8 100644 --- a/src/cdk/overlay/position/global-position-strategy.ts +++ b/src/cdk/overlay/position/global-position-strategy.ts @@ -181,7 +181,7 @@ export class GlobalPositionStrategy implements PositionStrategy { /** * Apply the position to the element. - * @docs-private + * @nodoc */ apply(): void { // Since the overlay ref applies the strategy asynchronously, it could @@ -245,7 +245,7 @@ export class GlobalPositionStrategy implements PositionStrategy { /** * Cleans up the DOM changes from the position strategy. - * @docs-private + * @nodoc */ dispose(): void { if (this._isDisposed || !this._overlayRef) { diff --git a/src/cdk/overlay/position/scroll-clip.ts b/src/cdk/overlay/position/scroll-clip.ts index 35f1ac779bb0..218c6e8f2dd6 100644 --- a/src/cdk/overlay/position/scroll-clip.ts +++ b/src/cdk/overlay/position/scroll-clip.ts @@ -17,7 +17,7 @@ type Dimensions = Omit; * @param element Dimensions of the element (from getBoundingClientRect) * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect) * @returns Whether the element is scrolled out of view - * @docs-private + * @nodoc */ export function isElementScrolledOutsideView(element: Dimensions, scrollContainers: Dimensions[]) { return scrollContainers.some(containerBounds => { @@ -35,7 +35,7 @@ export function isElementScrolledOutsideView(element: Dimensions, scrollContaine * @param element Dimensions of the element (from getBoundingClientRect) * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect) * @returns Whether the element is clipped - * @docs-private + * @nodoc */ export function isElementClippedByScrolling(element: Dimensions, scrollContainers: Dimensions[]) { return scrollContainers.some(scrollContainerRect => { diff --git a/src/cdk/portal/portal-errors.ts b/src/cdk/portal/portal-errors.ts index f6e3a065e880..6699a07827df 100644 --- a/src/cdk/portal/portal-errors.ts +++ b/src/cdk/portal/portal-errors.ts @@ -8,7 +8,7 @@ /** * Throws an exception when attempting to attach a null portal to a host. - * @docs-private + * @nodoc */ export function throwNullPortalError() { throw Error('Must provide a portal to attach'); @@ -16,7 +16,7 @@ export function throwNullPortalError() { /** * Throws an exception when attempting to attach a portal to a host that is already attached. - * @docs-private + * @nodoc */ export function throwPortalAlreadyAttachedError() { throw Error('Host already has a portal attached'); @@ -24,7 +24,7 @@ export function throwPortalAlreadyAttachedError() { /** * Throws an exception when attempting to attach a portal to an already-disposed host. - * @docs-private + * @nodoc */ export function throwPortalOutletAlreadyDisposedError() { throw Error('This PortalOutlet has already been disposed'); @@ -32,7 +32,7 @@ export function throwPortalOutletAlreadyDisposedError() { /** * Throws an exception when attempting to attach an unknown portal type. - * @docs-private + * @nodoc */ export function throwUnknownPortalTypeError() { throw Error( @@ -43,7 +43,7 @@ export function throwUnknownPortalTypeError() { /** * Throws an exception when attempting to attach a portal to a null host. - * @docs-private + * @nodoc */ export function throwNullPortalOutletError() { throw Error('Attempting to attach a portal to a null PortalOutlet'); @@ -51,7 +51,7 @@ export function throwNullPortalOutletError() { /** * Throws an exception when attempting to detach a portal that is not attached. - * @docs-private + * @nodoc */ export function throwNoPortalAttachedError() { throw Error('Attempting to detach a portal that is not attached to a host'); diff --git a/src/cdk/portal/portal.ts b/src/cdk/portal/portal.ts index 7865c6d0781e..d5253f9c4652 100644 --- a/src/cdk/portal/portal.ts +++ b/src/cdk/portal/portal.ts @@ -7,18 +7,18 @@ */ import { - TemplateRef, - ViewContainerRef, - ElementRef, ComponentRef, + ElementRef, EmbeddedViewRef, Injector, + TemplateRef, + ViewContainerRef, } from '@angular/core'; import { - throwNullPortalOutletError, - throwPortalAlreadyAttachedError, throwNoPortalAttachedError, throwNullPortalError, + throwNullPortalOutletError, + throwPortalAlreadyAttachedError, throwPortalOutletAlreadyDisposedError, throwUnknownPortalTypeError, } from './portal-errors'; @@ -263,7 +263,7 @@ export abstract class BasePortalOutlet implements PortalOutlet { this._isDisposed = true; } - /** @docs-private */ + /** @nodoc */ setDisposeFn(fn: () => void) { this._disposeFn = fn; } diff --git a/src/cdk/private/visually-hidden/visually-hidden.ts b/src/cdk/private/visually-hidden/visually-hidden.ts index 6d2e51eaefc2..5b4930f904a6 100644 --- a/src/cdk/private/visually-hidden/visually-hidden.ts +++ b/src/cdk/private/visually-hidden/visually-hidden.ts @@ -10,7 +10,7 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/co /** * Component used to load the .cdk-visually-hidden styles. - * @docs-private + * @nodoc */ @Component({ styleUrl: 'visually-hidden.css', diff --git a/src/cdk/scrolling/fixed-size-virtual-scroll.ts b/src/cdk/scrolling/fixed-size-virtual-scroll.ts index d7ba2648a027..f9f8ad9b4c90 100644 --- a/src/cdk/scrolling/fixed-size-virtual-scroll.ts +++ b/src/cdk/scrolling/fixed-size-virtual-scroll.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.dev/license */ -import {coerceNumberProperty, NumberInput} from '../coercion'; import {Directive, forwardRef, Input, OnChanges} from '@angular/core'; import {Observable, Subject} from 'rxjs'; import {distinctUntilChanged} from 'rxjs/operators'; +import {coerceNumberProperty, NumberInput} from '../coercion'; import {VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy} from './virtual-scroll-strategy'; import {CdkVirtualScrollViewport} from './virtual-scroll-viewport'; @@ -17,7 +17,7 @@ import {CdkVirtualScrollViewport} from './virtual-scroll-viewport'; export class FixedSizeVirtualScrollStrategy implements VirtualScrollStrategy { private readonly _scrolledIndexChange = new Subject(); - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ scrolledIndexChange: Observable = this._scrolledIndexChange.pipe(distinctUntilChanged()); /** The attached viewport. */ @@ -76,23 +76,23 @@ export class FixedSizeVirtualScrollStrategy implements VirtualScrollStrategy { this._updateRenderedRange(); } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onContentScrolled() { this._updateRenderedRange(); } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onDataLengthChanged() { this._updateTotalContentSize(); this._updateRenderedRange(); } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onContentRendered() { /* no-op */ } - /** @docs-private Implemented as part of VirtualScrollStrategy. */ + /** @nodoc Implemented as part of VirtualScrollStrategy. */ onRenderedOffsetChanged() { /* no-op */ } diff --git a/src/cdk/scrolling/viewport-ruler.ts b/src/cdk/scrolling/viewport-ruler.ts index bd477c3ede4b..fd7bfba6cd19 100644 --- a/src/cdk/scrolling/viewport-ruler.ts +++ b/src/cdk/scrolling/viewport-ruler.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Platform} from '../platform'; -import {Injectable, NgZone, OnDestroy, RendererFactory2, inject, DOCUMENT} from '@angular/core'; +import {DOCUMENT, Injectable, NgZone, OnDestroy, RendererFactory2, inject} from '@angular/core'; import {Observable, Subject} from 'rxjs'; import {auditTime} from 'rxjs/operators'; +import {Platform} from '../platform'; /** Time in ms to throttle the resize events by default. */ export const DEFAULT_RESIZE_TIME = 20; @@ -22,7 +22,7 @@ export interface ViewportScrollPosition { /** * Simple utility for getting the bounds of the browser viewport. - * @docs-private + * @nodoc */ @Injectable({providedIn: 'root'}) export class ViewportRuler implements OnDestroy { diff --git a/src/cdk/table/can-stick.ts b/src/cdk/table/can-stick.ts index 0010fee7a207..135751952ced 100644 --- a/src/cdk/table/can-stick.ts +++ b/src/cdk/table/can-stick.ts @@ -10,7 +10,7 @@ * Interface for a mixin to provide a directive with a function that checks if the sticky input has * been changed since the last time the function was called. Essentially adds a dirty-check to the * sticky value. - * @docs-private + * @nodoc */ export interface CanStick { /** Whether sticky positioning should be applied. */ diff --git a/src/cdk/table/cell.ts b/src/cdk/table/cell.ts index 3174953b886a..f2ce018c6953 100644 --- a/src/cdk/table/cell.ts +++ b/src/cdk/table/cell.ts @@ -31,7 +31,7 @@ export interface CellDef { selector: '[cdkCellDef]', }) export class CdkCellDef implements CellDef { - /** @docs-private */ + /** @nodoc */ template = inject>(TemplateRef); constructor(...args: unknown[]); @@ -46,7 +46,7 @@ export class CdkCellDef implements CellDef { selector: '[cdkHeaderCellDef]', }) export class CdkHeaderCellDef implements CellDef { - /** @docs-private */ + /** @nodoc */ template = inject>(TemplateRef); constructor(...args: unknown[]); @@ -61,7 +61,7 @@ export class CdkHeaderCellDef implements CellDef { selector: '[cdkFooterCellDef]', }) export class CdkFooterCellDef implements CellDef { - /** @docs-private */ + /** @nodoc */ template = inject>(TemplateRef); constructor(...args: unknown[]); @@ -121,13 +121,13 @@ export class CdkColumnDef implements CanStick { } _stickyEnd: boolean = false; - /** @docs-private */ + /** @nodoc */ @ContentChild(CdkCellDef) cell: CdkCellDef; - /** @docs-private */ + /** @nodoc */ @ContentChild(CdkHeaderCellDef) headerCell: CdkHeaderCellDef; - /** @docs-private */ + /** @nodoc */ @ContentChild(CdkFooterCellDef) footerCell: CdkFooterCellDef; /** @@ -139,7 +139,7 @@ export class CdkColumnDef implements CanStick { /** * Class name for cells in this column. - * @docs-private + * @nodoc */ _columnCssClassName: string[]; @@ -163,7 +163,7 @@ export class CdkColumnDef implements CanStick { * column. * In the future, columnCssClassName will change from type string[] to string and this * will set a single string value. - * @docs-private + * @nodoc */ protected _updateColumnCssClassName() { this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`]; @@ -173,7 +173,7 @@ export class CdkColumnDef implements CanStick { * This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. - * @docs-private + * @nodoc */ protected _setNameInput(value: string) { // If the directive is set without a name (updated programmatically), then this setter will diff --git a/src/cdk/table/row.ts b/src/cdk/table/row.ts index 9d89438e0229..ba5f9c273c57 100644 --- a/src/cdk/table/row.ts +++ b/src/cdk/table/row.ts @@ -10,6 +10,7 @@ import { ChangeDetectionStrategy, Component, Directive, + Input, IterableChanges, IterableDiffer, IterableDiffers, @@ -19,7 +20,6 @@ import { TemplateRef, ViewContainerRef, ViewEncapsulation, - Input, booleanAttribute, inject, } from '@angular/core'; @@ -273,7 +273,7 @@ export interface CdkCellOutletMultiRowContext { /** * Outlet for rendering cells inside of a row or header row. - * @docs-private + * @nodoc */ @Directive({ selector: '[cdkCellOutlet]', diff --git a/src/cdk/table/sticky-styler.ts b/src/cdk/table/sticky-styler.ts index 372b37da1b32..ea7cb04298dd 100644 --- a/src/cdk/table/sticky-styler.ts +++ b/src/cdk/table/sticky-styler.ts @@ -8,7 +8,7 @@ /** * Directions that can be used when setting sticky positioning. - * @docs-private + * @nodoc */ import {afterNextRender, Injector} from '@angular/core'; import {Direction} from '../bidi'; @@ -24,13 +24,13 @@ interface UpdateStickyColumnsParams { /** * List of all possible directions that can be used for sticky positioning. - * @docs-private + * @nodoc */ export const STICKY_DIRECTIONS: StickyDirection[] = ['top', 'bottom', 'left', 'right']; /** * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells. - * @docs-private + * @nodoc */ export class StickyStyler { private _elemSizeCache = new WeakMap(); diff --git a/src/cdk/table/table-errors.ts b/src/cdk/table/table-errors.ts index 7ffadecad258..5066491b78e0 100644 --- a/src/cdk/table/table-errors.ts +++ b/src/cdk/table/table-errors.ts @@ -9,7 +9,7 @@ /** * Returns an error to be thrown when attempting to find an nonexistent column. * @param id Id whose lookup failed. - * @docs-private + * @nodoc */ export function getTableUnknownColumnError(id: string) { return Error(`Could not find column with id "${id}".`); @@ -17,7 +17,7 @@ export function getTableUnknownColumnError(id: string) { /** * Returns an error to be thrown when two column definitions have the same name. - * @docs-private + * @nodoc */ export function getTableDuplicateColumnNameError(name: string) { return Error(`Duplicate column definition name provided: "${name}".`); @@ -25,7 +25,7 @@ export function getTableDuplicateColumnNameError(name: string) { /** * Returns an error to be thrown when there are multiple rows that are missing a when function. - * @docs-private + * @nodoc */ export function getTableMultipleDefaultRowDefsError() { return Error(`There can only be one default row without a when predicate function.`); @@ -33,7 +33,7 @@ export function getTableMultipleDefaultRowDefsError() { /** * Returns an error to be thrown when there are no matching row defs for a particular set of data. - * @docs-private + * @nodoc */ export function getTableMissingMatchingRowDefError(data: any) { return Error( @@ -44,7 +44,7 @@ export function getTableMissingMatchingRowDefError(data: any) { /** * Returns an error to be thrown when there is no row definitions present in the content. - * @docs-private + * @nodoc */ export function getTableMissingRowDefsError() { return Error( @@ -55,7 +55,7 @@ export function getTableMissingRowDefsError() { /** * Returns an error to be thrown when the data source does not match the compatible types. - * @docs-private + * @nodoc */ export function getTableUnknownDataSourceError() { return Error(`Provided data source did not match an array, Observable, or DataSource`); @@ -63,7 +63,7 @@ export function getTableUnknownDataSourceError() { /** * Returns an error to be thrown when the text column cannot find a parent table to inject. - * @docs-private + * @nodoc */ export function getTableTextColumnMissingParentTableError() { return Error(`Text column could not find a parent table for registration.`); @@ -71,7 +71,7 @@ export function getTableTextColumnMissingParentTableError() { /** * Returns an error to be thrown when a table text column doesn't have a name. - * @docs-private + * @nodoc */ export function getTableTextColumnMissingNameError() { return Error(`Table text column must have a name.`); diff --git a/src/cdk/table/table.ts b/src/cdk/table/table.ts index 6debac739af8..bc2009ef0928 100644 --- a/src/cdk/table/table.ts +++ b/src/cdk/table/table.ts @@ -8,16 +8,16 @@ import {Direction, Directionality} from '../bidi'; import { - CollectionViewer, - DataSource, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, - isDataSource, _VIEW_REPEATER_STRATEGY, _ViewRepeater, _ViewRepeaterItemChange, _ViewRepeaterItemInsertArgs, _ViewRepeaterOperation, + CollectionViewer, + DataSource, + isDataSource, } from '../collections'; import {Platform} from '../platform'; import {ViewportRuler} from '../scrolling'; @@ -25,15 +25,20 @@ import {ViewportRuler} from '../scrolling'; import { AfterContentChecked, AfterContentInit, + booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, + DOCUMENT, ElementRef, EmbeddedViewRef, EventEmitter, + HostAttributeToken, + inject, + Injector, Input, IterableChangeRecord, IterableDiffer, @@ -46,11 +51,6 @@ import { TrackByFunction, ViewContainerRef, ViewEncapsulation, - booleanAttribute, - inject, - Injector, - HostAttributeToken, - DOCUMENT, } from '@angular/core'; import { BehaviorSubject, @@ -72,6 +72,7 @@ import { CdkNoDataRow, CdkRowDef, } from './row'; +import {STICKY_POSITIONING_LISTENER, StickyPositioningListener} from './sticky-position-listener'; import {StickyStyler} from './sticky-styler'; import { getTableDuplicateColumnNameError, @@ -81,7 +82,6 @@ import { getTableUnknownColumnError, getTableUnknownDataSourceError, } from './table-errors'; -import {STICKY_POSITIONING_LISTENER, StickyPositioningListener} from './sticky-position-listener'; import {CDK_TABLE} from './tokens'; /** @@ -104,7 +104,7 @@ export type CdkTableDataSourceInput = readonly T[] | DataSource | Observab /** * Provides a handle for the table to grab the view container's ng-container to insert data rows. - * @docs-private + * @nodoc */ @Directive({ selector: '[rowOutlet]', @@ -124,7 +124,7 @@ export class DataRowOutlet implements RowOutlet { /** * Provides a handle for the table to grab the view container's ng-container to insert the header. - * @docs-private + * @nodoc */ @Directive({ selector: '[headerRowOutlet]', @@ -144,7 +144,7 @@ export class HeaderRowOutlet implements RowOutlet { /** * Provides a handle for the table to grab the view container's ng-container to insert the footer. - * @docs-private + * @nodoc */ @Directive({ selector: '[footerRowOutlet]', @@ -165,7 +165,7 @@ export class FooterRowOutlet implements RowOutlet { /** * Provides a handle for the table to grab the view * container's ng-container to insert the no data row. - * @docs-private + * @nodoc */ @Directive({ selector: '[noDataRowOutlet]', @@ -185,7 +185,7 @@ export class NoDataRowOutlet implements RowOutlet { /** * Interface used to conveniently type the possible context interfaces for the render row. - * @docs-private + * @nodoc */ export interface RowContext extends CdkCellOutletMultiRowContext, @@ -193,7 +193,7 @@ export interface RowContext /** * Class used to conveniently type the embedded view ref for rows with a context. - * @docs-private + * @nodoc */ abstract class RowViewRef extends EmbeddedViewRef> {} @@ -208,7 +208,7 @@ abstract class RowViewRef extends EmbeddedViewRef> {} * `RenderRow` is * created. Once the list is complete and all data objects have been iterated * through, a diff is performed to determine the changes that need to be made to the rendered rows. * - * @docs-private + * @nodoc */ export interface RenderRow { data: T; @@ -557,7 +557,7 @@ export class CdkTable * Stream containing the latest information on what rows are being displayed on screen. * Can be used by the data source to as a heuristic of what data should be provided. * - * @docs-private + * @nodoc */ readonly viewChange = new BehaviorSubject<{start: number; end: number}>({ start: 0, diff --git a/src/cdk/table/text-column.ts b/src/cdk/table/text-column.ts index bfe9e0c04fc2..4c4af283618e 100644 --- a/src/cdk/table/text-column.ts +++ b/src/cdk/table/text-column.ts @@ -16,11 +16,11 @@ import { ViewEncapsulation, inject, } from '@angular/core'; -import {CdkCellDef, CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCell} from './cell'; +import {CdkCell, CdkCellDef, CdkColumnDef, CdkHeaderCell, CdkHeaderCellDef} from './cell'; import {CdkTable} from './table'; import { - getTableTextColumnMissingParentTableError, getTableTextColumnMissingNameError, + getTableTextColumnMissingParentTableError, } from './table-errors'; import {TEXT_COLUMN_OPTIONS, TextColumnOptions} from './tokens'; @@ -90,7 +90,7 @@ export class CdkTextColumn implements OnDestroy, OnInit { /** Alignment of the cell values. */ @Input() justify: 'start' | 'end' | 'center' = 'start'; - /** @docs-private */ + /** @nodoc */ @ViewChild(CdkColumnDef, {static: true}) columnDef: CdkColumnDef; /** @@ -98,7 +98,7 @@ export class CdkTextColumn implements OnDestroy, OnInit { * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the * column definition was provided in the same view as the table, which is not the case with this * component. - * @docs-private + * @nodoc */ @ViewChild(CdkCellDef, {static: true}) cell: CdkCellDef; @@ -107,7 +107,7 @@ export class CdkTextColumn implements OnDestroy, OnInit { * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the * column definition was provided in the same view as the table, which is not the case with this * component. - * @docs-private + * @nodoc */ @ViewChild(CdkHeaderCellDef, {static: true}) headerCell: CdkHeaderCellDef; diff --git a/src/cdk/table/tokens.ts b/src/cdk/table/tokens.ts index 1a55b5bfa849..0e6fc3d9f772 100644 --- a/src/cdk/table/tokens.ts +++ b/src/cdk/table/tokens.ts @@ -10,7 +10,7 @@ import {InjectionToken} from '@angular/core'; /** * Used to provide a table to some of the sub-components without causing a circular dependency. - * @docs-private + * @nodoc */ export const CDK_TABLE = new InjectionToken('CDK_TABLE'); diff --git a/src/cdk/testing/component-harness.ts b/src/cdk/testing/component-harness.ts index 4fe49ab6e220..ec6d7f93564f 100644 --- a/src/cdk/testing/component-harness.ts +++ b/src/cdk/testing/component-harness.ts @@ -13,7 +13,7 @@ import {TestElement} from './test-element'; * An async function that returns a promise when called. * @deprecated This was just an alias for `() => Promise`. Use that instead. * @breaking-change 21.0.0 Remove this alias. - * @docs-private + * @nodoc */ export type AsyncFactoryFn = () => Promise; diff --git a/src/cdk/testing/protractor/protractor-harness-environment.ts b/src/cdk/testing/protractor/protractor-harness-environment.ts index 0b5e647baf8d..7a8e919c5d45 100644 --- a/src/cdk/testing/protractor/protractor-harness-environment.ts +++ b/src/cdk/testing/protractor/protractor-harness-environment.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ +import {by, ElementArrayFinder, ElementFinder, element as protractorElement} from 'protractor'; import {HarnessEnvironment, HarnessLoader, TestElement} from '../../testing'; -import {by, element as protractorElement, ElementArrayFinder, ElementFinder} from 'protractor'; import {ProtractorElement} from './protractor-element'; /** @@ -63,7 +63,7 @@ export class ProtractorHarnessEnvironment extends HarnessEnvironment {} - /** @docs-private */ + /** @nodoc */ async waitForTasksOutsideAngular(): Promise { // TODO: figure out how we can do this for the protractor environment. // https://github.com/angular/components/issues/17412 diff --git a/src/cdk/testing/selenium-webdriver/selenium-web-driver-harness-environment.ts b/src/cdk/testing/selenium-webdriver/selenium-web-driver-harness-environment.ts index 4ef2de119fe5..94b805d19dd4 100644 --- a/src/cdk/testing/selenium-webdriver/selenium-web-driver-harness-environment.ts +++ b/src/cdk/testing/selenium-webdriver/selenium-web-driver-harness-environment.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import {HarnessEnvironment, HarnessLoader, TestElement} from '../../testing'; import * as webdriver from 'selenium-webdriver'; +import {HarnessEnvironment, HarnessLoader, TestElement} from '../../testing'; import {SeleniumWebDriverElement} from './selenium-web-driver-element'; /** @@ -114,7 +114,7 @@ export class SeleniumWebDriverHarnessEnvironment extends HarnessEnvironment< await this.rawRootElement().getDriver().executeAsyncScript(whenStable); } - /** @docs-private */ + /** @nodoc */ async waitForTasksOutsideAngular(): Promise { // TODO: figure out how we can do this for the webdriver environment. // https://github.com/angular/components/issues/17412 diff --git a/src/cdk/testing/test-element-errors.ts b/src/cdk/testing/test-element-errors.ts index f5c8dda09ac5..94368aef903d 100644 --- a/src/cdk/testing/test-element-errors.ts +++ b/src/cdk/testing/test-element-errors.ts @@ -8,7 +8,7 @@ /** * Returns an error which reports that no keys have been specified. - * @docs-private + * @nodoc */ export function getNoKeysSpecifiedError() { return Error('No keys have been specified.'); diff --git a/src/cdk/testing/testbed/fake-events/dispatch-events.ts b/src/cdk/testing/testbed/fake-events/dispatch-events.ts index c51efc1d5c91..e7e0f6948bdf 100644 --- a/src/cdk/testing/testbed/fake-events/dispatch-events.ts +++ b/src/cdk/testing/testbed/fake-events/dispatch-events.ts @@ -17,7 +17,7 @@ import { /** * Utility to dispatch any event on a Node. - * @docs-private + * @nodoc */ export function dispatchEvent(node: Node | Window, event: T): T { node.dispatchEvent(event); @@ -26,7 +26,7 @@ export function dispatchEvent(node: Node | Window, event: T): T /** * Shorthand to dispatch a fake event on a specified node. - * @docs-private + * @nodoc */ export function dispatchFakeEvent(node: Node | Window, type: string, bubbles?: boolean): Event { return dispatchEvent(node, createFakeEvent(type, bubbles)); @@ -35,7 +35,7 @@ export function dispatchFakeEvent(node: Node | Window, type: string, bubbles?: b /** * Shorthand to dispatch a keyboard event with a specified key code and * optional modifiers. - * @docs-private + * @nodoc */ export function dispatchKeyboardEvent( node: Node, @@ -50,7 +50,7 @@ export function dispatchKeyboardEvent( /** * Shorthand to dispatch a mouse event on the specified coordinates. - * @docs-private + * @nodoc */ export function dispatchMouseEvent( node: Node, @@ -70,7 +70,7 @@ export function dispatchMouseEvent( /** * Shorthand to dispatch a pointer event on the specified coordinates. - * @docs-private + * @nodoc */ export function dispatchPointerEvent( node: Node, @@ -89,7 +89,7 @@ export function dispatchPointerEvent( /** * Shorthand to dispatch a touch event on the specified coordinates. - * @docs-private + * @nodoc */ export function dispatchTouchEvent( node: Node, diff --git a/src/cdk/testing/testbed/fake-events/element-focus.ts b/src/cdk/testing/testbed/fake-events/element-focus.ts index 935b8a6a3386..6deaa946e132 100644 --- a/src/cdk/testing/testbed/fake-events/element-focus.ts +++ b/src/cdk/testing/testbed/fake-events/element-focus.ts @@ -23,7 +23,7 @@ function triggerFocusChange(element: HTMLElement, event: 'focus' | 'blur') { * Patches an elements focus and blur methods to emit events consistently and predictably. * This is necessary, because some browsers can call the focus handlers asynchronously, * while others won't fire them at all if the browser window is not focused. - * @docs-private + * @nodoc */ // TODO: Check if this element focus patching is still needed for local testing, // where browser is not necessarily focused. @@ -32,12 +32,12 @@ export function patchElementFocus(element: HTMLElement) { element.blur = () => dispatchFakeEvent(element, 'blur'); } -/** @docs-private */ +/** @nodoc */ export function triggerFocus(element: HTMLElement) { triggerFocusChange(element, 'focus'); } -/** @docs-private */ +/** @nodoc */ export function triggerBlur(element: HTMLElement) { triggerFocusChange(element, 'blur'); } diff --git a/src/cdk/testing/testbed/fake-events/event-objects.ts b/src/cdk/testing/testbed/fake-events/event-objects.ts index 5674f1a77cf2..51119372843e 100644 --- a/src/cdk/testing/testbed/fake-events/event-objects.ts +++ b/src/cdk/testing/testbed/fake-events/event-objects.ts @@ -13,7 +13,7 @@ let uniqueIds = 0; /** * Creates a browser MouseEvent with the specified options. - * @docs-private + * @nodoc */ export function createMouseEvent( type: string, @@ -71,7 +71,7 @@ export function createMouseEvent( * For example, if pointer events for a multi-touch interaction are created, the non-primary * pointer touches would need to be represented by non-primary pointer events. * - * @docs-private + * @nodoc */ export function createPointerEvent( type: string, @@ -104,7 +104,7 @@ export function createPointerEvent( /** * Creates a browser TouchEvent with the specified pointer coordinates. - * @docs-private + * @nodoc */ export function createTouchEvent(type: string, pageX = 0, pageY = 0, clientX = 0, clientY = 0) { // We cannot use the `TouchEvent` or `Touch` because Firefox and Safari lack support. @@ -126,7 +126,7 @@ export function createTouchEvent(type: string, pageX = 0, pageY = 0, clientX = 0 /** * Creates a keyboard event with the specified key and modifiers. - * @docs-private + * @nodoc */ export function createKeyboardEvent( type: string, @@ -152,7 +152,7 @@ export function createKeyboardEvent( /** * Creates a fake event object with any desired event type. - * @docs-private + * @nodoc */ export function createFakeEvent(type: string, bubbles = false, cancelable = true, composed = true) { return new Event(type, {bubbles, cancelable, composed}); diff --git a/src/cdk/testing/testbed/fake-events/type-in-element.ts b/src/cdk/testing/testbed/fake-events/type-in-element.ts index aff0b330dd7d..28c432fbe933 100644 --- a/src/cdk/testing/testbed/fake-events/type-in-element.ts +++ b/src/cdk/testing/testbed/fake-events/type-in-element.ts @@ -69,7 +69,7 @@ function getKeyboardEventCode(char: string): string { /** * Checks whether the given Element is a text input element. - * @docs-private + * @nodoc */ export function isTextInput(element: Element): element is HTMLInputElement | HTMLTextAreaElement { const nodeName = element.nodeName.toLowerCase(); @@ -81,7 +81,7 @@ export function isTextInput(element: Element): element is HTMLInputElement | HTM * the `input` event, simulating the user typing. * @param element Element onto which to set the value. * @param keys The keys to send to the element. - * @docs-private + * @nodoc */ export function typeInElement( element: HTMLElement, @@ -94,7 +94,7 @@ export function typeInElement( * @param element Element onto which to set the value. * @param modifiers Modifier keys that are held while typing. * @param keys The keys to send to the element. - * @docs-private + * @nodoc */ export function typeInElement( element: HTMLElement, @@ -177,7 +177,7 @@ export function typeInElement(element: HTMLElement, ...modifiersAndKeys: any[]) /** * Clears the text in an input or textarea element. - * @docs-private + * @nodoc */ export function clearElement(element: HTMLInputElement | HTMLTextAreaElement) { triggerFocus(element as HTMLElement); diff --git a/src/cdk/testing/tests/cross-environment.spec.ts b/src/cdk/testing/tests/cross-environment.spec.ts index eb4f034ceb14..855323cd1711 100644 --- a/src/cdk/testing/tests/cross-environment.spec.ts +++ b/src/cdk/testing/tests/cross-environment.spec.ts @@ -30,7 +30,7 @@ import {SubComponentHarness, SubComponentSpecialHarness} from './harnesses/sub-c * @param getActiveElementId env specific closure to get active element * @param skipAsyncTests skip tests that rely on Angular framework stabilization * - * @docs-private + * @nodoc */ export function crossEnvironmentSpecs( getHarnessLoaderFromEnvironment: () => HarnessLoader, diff --git a/src/cdk/tree/node.ts b/src/cdk/tree/node.ts index 79356c0bf668..696a29b23a09 100644 --- a/src/cdk/tree/node.ts +++ b/src/cdk/tree/node.ts @@ -36,7 +36,7 @@ export class CdkTreeNodeOutletContext { inputs: [{name: 'when', alias: 'cdkTreeNodeDefWhen'}], }) export class CdkTreeNodeDef { - /** @docs-private */ + /** @nodoc */ template = inject>(TemplateRef); /** diff --git a/src/cdk/tree/outlet.ts b/src/cdk/tree/outlet.ts index 02144dca8461..83d968c2711c 100644 --- a/src/cdk/tree/outlet.ts +++ b/src/cdk/tree/outlet.ts @@ -10,7 +10,7 @@ import {Directive, InjectionToken, ViewContainerRef, inject} from '@angular/core /** * Injection token used to provide a `CdkTreeNode` to its outlet. * Used primarily to avoid circular imports. - * @docs-private + * @nodoc */ export const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE'); diff --git a/src/cdk/tree/padding.ts b/src/cdk/tree/padding.ts index 4dac40d9870c..5bec45d8ce67 100644 --- a/src/cdk/tree/padding.ts +++ b/src/cdk/tree/padding.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Directionality} from '../bidi'; -import {Directive, ElementRef, Input, numberAttribute, OnDestroy, inject} from '@angular/core'; -import {takeUntil} from 'rxjs/operators'; +import {Directive, ElementRef, inject, Input, numberAttribute, OnDestroy} from '@angular/core'; import {Subject} from 'rxjs'; +import {takeUntil} from 'rxjs/operators'; +import {Directionality} from '../bidi'; import {CdkTree, CdkTreeNode} from './tree'; /** Regex used to split a string on its CSS units. */ @@ -101,7 +101,7 @@ export class CdkTreeNodePadding implements OnDestroy { * This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. - * @docs-private + * @nodoc */ protected _setLevelInput(value: number) { // Set to null as the fallback value so that _setPadding can fall back to the node level if the @@ -115,7 +115,7 @@ export class CdkTreeNodePadding implements OnDestroy { * This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. - * @docs-private + * @nodoc */ protected _setIndentInput(indent: number | string) { let value = indent; diff --git a/src/cdk/tree/tree-errors.ts b/src/cdk/tree/tree-errors.ts index 7d807ac40c74..e82627e58e3a 100644 --- a/src/cdk/tree/tree-errors.ts +++ b/src/cdk/tree/tree-errors.ts @@ -8,7 +8,7 @@ /** * Returns an error to be thrown when there is no usable data. - * @docs-private + * @nodoc */ export function getTreeNoValidDataSourceError() { return Error(`A valid data source must be provided.`); @@ -16,7 +16,7 @@ export function getTreeNoValidDataSourceError() { /** * Returns an error to be thrown when there are multiple nodes that are missing a when function. - * @docs-private + * @nodoc */ export function getTreeMultipleDefaultNodeDefsError() { return Error(`There can only be one default row without a when predicate function.`); @@ -24,7 +24,7 @@ export function getTreeMultipleDefaultNodeDefsError() { /** * Returns an error to be thrown when there are no matching node defs for a particular set of data. - * @docs-private + * @nodoc */ export function getTreeMissingMatchingNodeDefError() { return Error(`Could not find a matching node definition for the provided node data.`); @@ -32,7 +32,7 @@ export function getTreeMissingMatchingNodeDefError() { /** * Returns an error to be thrown when there is no tree control. - * @docs-private + * @nodoc */ export function getTreeControlMissingError() { return Error(`Could not find a tree control, levelAccessor, or childrenAccessor for the tree.`); @@ -41,7 +41,7 @@ export function getTreeControlMissingError() { /** * Returns an error to be thrown when there are multiple ways of specifying children or level * provided to the tree. - * @docs-private + * @nodoc */ export function getMultipleTreeControlsError() { return Error(`More than one of tree control, levelAccessor, or childrenAccessor were provided.`); diff --git a/src/material-luxon-adapter/adapter/luxon-date-adapter.ts b/src/material-luxon-adapter/adapter/luxon-date-adapter.ts index 30d473b764b8..49c7a0b13342 100644 --- a/src/material-luxon-adapter/adapter/luxon-date-adapter.ts +++ b/src/material-luxon-adapter/adapter/luxon-date-adapter.ts @@ -9,10 +9,10 @@ import {Injectable, InjectionToken, inject} from '@angular/core'; import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core'; import { + CalendarSystem as LuxonCalendarSystem, DateTime as LuxonDateTime, - Info as LuxonInfo, DateTimeOptions as LuxonDateTimeOptions, - CalendarSystem as LuxonCalendarSystem, + Info as LuxonInfo, } from 'luxon'; /** Configurable options for the `LuxonDateAdapter`. */ @@ -46,7 +46,7 @@ export const MAT_LUXON_DATE_ADAPTER_OPTIONS = new InjectionToken ScrollS ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -108,7 +108,7 @@ export function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -253,7 +253,7 @@ export class MatAutocompleteTrigger /** * `autocomplete` attribute to be set on the input element. - * @docs-private + * @nodoc */ @Input('autocomplete') autocompleteAttribute: string = 'off'; diff --git a/src/material/autocomplete/autocomplete.ts b/src/material/autocomplete/autocomplete.ts index 54078571d1f0..2f6d6ddd2be3 100644 --- a/src/material/autocomplete/autocomplete.ts +++ b/src/material/autocomplete/autocomplete.ts @@ -6,14 +6,18 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator, ActiveDescendantKeyManager} from '@angular/cdk/a11y'; +import {Platform} from '@angular/cdk/platform'; import { AfterContentInit, + booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, + inject, InjectionToken, Input, OnDestroy, @@ -22,9 +26,8 @@ import { TemplateRef, ViewChild, ViewEncapsulation, - booleanAttribute, - inject, } from '@angular/core'; +import {Subscription} from 'rxjs'; import { _animationsDisabled, MAT_OPTGROUP, @@ -33,9 +36,6 @@ import { MatOption, ThemePalette, } from '../core'; -import {_IdGenerator, ActiveDescendantKeyManager} from '@angular/cdk/a11y'; -import {Platform} from '@angular/cdk/platform'; -import {Subscription} from 'rxjs'; /** Event object that is emitted when an autocomplete option is selected. */ export class MatAutocompleteSelectedEvent { @@ -93,7 +93,7 @@ export const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken; /** Element for the panel containing the autocomplete options. */ @@ -251,7 +251,7 @@ export class MatAutocomplete implements AfterContentInit, OnDestroy { /** * Tells any descendant `mat-optgroup` to use the inert a11y pattern. - * @docs-private + * @nodoc */ readonly inertGroups: boolean; diff --git a/src/material/badge/badge.ts b/src/material/badge/badge.ts index 2a1745f13560..9ae41f9aaca0 100644 --- a/src/material/badge/badge.ts +++ b/src/material/badge/badge.ts @@ -8,12 +8,15 @@ import {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y'; +import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; import { booleanAttribute, ChangeDetectionStrategy, Component, Directive, + DOCUMENT, ElementRef, + HOST_TAG_NAME, inject, Input, NgZone, @@ -21,11 +24,8 @@ import { OnInit, Renderer2, ViewEncapsulation, - HOST_TAG_NAME, - DOCUMENT, } from '@angular/core'; import {_animationsDisabled, ThemePalette} from '../core'; -import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; /** Allowed position options for matBadgePosition */ export type MatBadgePosition = @@ -45,7 +45,7 @@ const BADGE_CONTENT_CLASS = 'mat-badge-content'; /** * Component used to load the structural styles of the badge. - * @docs-private + * @nodoc */ @Component({ styleUrl: 'badge.css', diff --git a/src/material/bottom-sheet/bottom-sheet-container.ts b/src/material/bottom-sheet/bottom-sheet-container.ts index 66dddd36b02c..619c99e8065c 100644 --- a/src/material/bottom-sheet/bottom-sheet-container.ts +++ b/src/material/bottom-sheet/bottom-sheet-container.ts @@ -8,6 +8,7 @@ import {CdkDialogContainer} from '@angular/cdk/dialog'; import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout'; +import {CdkPortalOutlet} from '@angular/cdk/portal'; import { ChangeDetectionStrategy, Component, @@ -17,7 +18,6 @@ import { inject, } from '@angular/core'; import {Subscription} from 'rxjs'; -import {CdkPortalOutlet} from '@angular/cdk/portal'; import {_animationsDisabled} from '../core'; const ENTER_ANIMATION = '_mat-bottom-sheet-enter'; @@ -25,7 +25,7 @@ const EXIT_ANIMATION = '_mat-bottom-sheet-exit'; /** * Internal component that wraps user-provided bottom sheet content. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-bottom-sheet-container', diff --git a/src/material/bottom-sheet/bottom-sheet-ref.ts b/src/material/bottom-sheet/bottom-sheet-ref.ts index d52e20e18428..319fda134ecf 100644 --- a/src/material/bottom-sheet/bottom-sheet-ref.ts +++ b/src/material/bottom-sheet/bottom-sheet-ref.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ComponentRef} from '@angular/core'; import {DialogRef} from '@angular/cdk/dialog'; import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; +import {ComponentRef} from '@angular/core'; import {merge, Observable, Subject} from 'rxjs'; import {filter, take} from 'rxjs/operators'; import {MatBottomSheetConfig} from './bottom-sheet-config'; @@ -33,7 +33,7 @@ export class MatBottomSheetRef { /** * Instance of the component into which the bottom sheet content is projected. - * @docs-private + * @nodoc */ containerInstance: MatBottomSheetContainer; diff --git a/src/material/button-toggle/button-toggle.ts b/src/material/button-toggle/button-toggle.ts index 609007629293..f816693bd9b7 100644 --- a/src/material/button-toggle/button-toggle.ts +++ b/src/material/button-toggle/button-toggle.ts @@ -77,7 +77,7 @@ export const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS = new InjectionToken( /** * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor. * This allows it to support [(ngModel)]. - * @docs-private + * @nodoc */ export const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -207,7 +207,7 @@ export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, After /** * Event that emits whenever the value of the group changes. * Used to facilitate two-way data binding. - * @docs-private + * @nodoc */ @Output() readonly valueChange = new EventEmitter(); diff --git a/src/material/button/button-base.ts b/src/material/button/button-base.ts index 1c048f6bb456..558acaf625d6 100644 --- a/src/material/button/button-base.ts +++ b/src/material/button/button-base.ts @@ -7,6 +7,7 @@ */ import {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterViewInit, booleanAttribute, @@ -21,7 +22,6 @@ import { Renderer2, } from '@angular/core'; import {_animationsDisabled, _StructuralStylesLoader, MatRippleLoader, ThemePalette} from '../core'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; /** * Possible appearances for a `MatButton`. @@ -143,7 +143,7 @@ export class MatButtonBase implements AfterViewInit, OnDestroy { /** * Backwards-compatibility input that handles pre-existing `[tabindex]` bindings. - * @docs-private + * @nodoc */ @Input({alias: 'tabindex', transform: transformTabIndex}) set _tabindex(value: number) { diff --git a/src/material/button/fab.ts b/src/material/button/fab.ts index 3c908e0ea111..3c00940c2da5 100644 --- a/src/material/button/fab.ts +++ b/src/material/button/fab.ts @@ -16,8 +16,8 @@ import { inject, } from '@angular/core'; -import {MatButtonBase} from './button-base'; import {ThemePalette} from '../core'; +import {MatButtonBase} from './button-base'; /** Default FAB options that can be overridden. */ export interface MatFabDefaultOptions { @@ -41,7 +41,7 @@ export const MAT_FAB_DEFAULT_OPTIONS = new InjectionToken( ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/checkbox/checkbox-config.ts b/src/material/checkbox/checkbox-config.ts index 984894c101cf..b9d28651b4a5 100644 --- a/src/material/checkbox/checkbox-config.ts +++ b/src/material/checkbox/checkbox-config.ts @@ -36,7 +36,7 @@ export const MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken any = () => {}; diff --git a/src/material/chips/chip-action.ts b/src/material/chips/chip-action.ts index af665cf6cc64..10078095b780 100644 --- a/src/material/chips/chip-action.ts +++ b/src/material/chips/chip-action.ts @@ -6,22 +6,22 @@ * found in the LICENSE file at https://angular.dev/license */ +import {ENTER, SPACE} from '@angular/cdk/keycodes'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { Directive, ElementRef, Input, booleanAttribute, - numberAttribute, inject, + numberAttribute, } from '@angular/core'; -import {ENTER, SPACE} from '@angular/cdk/keycodes'; -import {MAT_CHIP} from './tokens'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import {_StructuralStylesLoader} from '../core'; +import {MAT_CHIP} from './tokens'; /** * Section within a chip. - * @docs-private + * @nodoc */ @Directive({ selector: '[matChipAction]', diff --git a/src/material/chips/chip-grid.ts b/src/material/chips/chip-grid.ts index 5dfe91e9233e..0efb11b2255c 100644 --- a/src/material/chips/chip-grid.ts +++ b/src/material/chips/chip-grid.ts @@ -16,12 +16,12 @@ import { ContentChildren, DoCheck, EventEmitter, + inject, Input, OnDestroy, Output, QueryList, ViewEncapsulation, - inject, } from '@angular/core'; import { ControlValueAccessor, @@ -30,10 +30,10 @@ import { NgForm, Validators, } from '@angular/forms'; -import {_ErrorStateTracker, ErrorStateMatcher} from '../core'; -import {MatFormFieldControl} from '../form-field'; import {merge, Observable, Subject} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; +import {_ErrorStateTracker, ErrorStateMatcher} from '../core'; +import {MatFormFieldControl} from '../form-field'; import {MatChipEvent} from './chip'; import {MatChipRow} from './chip-row'; import {MatChipSet} from './chip-set'; @@ -91,7 +91,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ readonly controlType: string = 'mat-chip-grid'; @@ -108,19 +108,19 @@ export class MatChipGrid /** * Function when touched. Set as part of ControlValueAccessor implementation. - * @docs-private + * @nodoc */ _onTouched = () => {}; /** * Function when changed. Set as part of ControlValueAccessor implementation. - * @docs-private + * @nodoc */ _onChange: (value: any) => void = () => {}; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input({transform: booleanAttribute}) override get disabled(): boolean { @@ -134,7 +134,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get id(): string { return this._chipInput.id; @@ -142,7 +142,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ override get empty(): boolean { return ( @@ -152,7 +152,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get placeholder(): string { @@ -171,7 +171,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input({transform: booleanAttribute}) get required(): boolean { @@ -185,7 +185,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get shouldLabelFloat(): boolean { return !this.empty || this.focused; @@ -193,7 +193,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get value(): any { @@ -225,7 +225,7 @@ export class MatChipGrid /** * Emits whenever the raw value of the chip-grid changes. This is here primarily * to facilitate the two-way binding for the `value` input. - * @docs-private + * @nodoc */ @Output() readonly valueChange: EventEmitter = new EventEmitter(); @@ -240,7 +240,7 @@ export class MatChipGrid /** * Emits whenever the component state changes and should cause the parent * form-field to update. Implemented as part of `MatFormFieldControl`. - * @docs-private + * @nodoc */ readonly stateChanges = new Subject(); @@ -315,7 +315,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ onContainerClick(event: MouseEvent) { if (!this.disabled && !this._originatesFromChip(event)) { @@ -351,7 +351,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get describedByIds(): string[] { return this._chipInput?.describedByIds || []; @@ -359,7 +359,7 @@ export class MatChipGrid /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ setDescribedByIds(ids: string[]) { // We must keep this up to date to handle the case where ids are set @@ -370,7 +370,7 @@ export class MatChipGrid /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ writeValue(value: any): void { // The user is responsible for creating the child chips, so we just store the value. @@ -379,7 +379,7 @@ export class MatChipGrid /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ registerOnChange(fn: (value: any) => void): void { this._onChange = fn; @@ -387,7 +387,7 @@ export class MatChipGrid /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ registerOnTouched(fn: () => void): void { this._onTouched = fn; @@ -395,7 +395,7 @@ export class MatChipGrid /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; diff --git a/src/material/chips/chip-input.ts b/src/material/chips/chip-input.ts index db6134d4d9fc..fe829fa17bcf 100644 --- a/src/material/chips/chip-input.ts +++ b/src/material/chips/chip-input.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator} from '@angular/cdk/a11y'; import {BACKSPACE, hasModifierKey} from '@angular/cdk/keycodes'; import { Directive, @@ -18,11 +19,10 @@ import { booleanAttribute, inject, } from '@angular/core'; -import {_IdGenerator} from '@angular/cdk/a11y'; -import {MatFormField, MAT_FORM_FIELD} from '../form-field'; -import {MatChipsDefaultOptions, MAT_CHIPS_DEFAULT_OPTIONS} from './tokens'; +import {MAT_FORM_FIELD, MatFormField} from '../form-field'; import {MatChipGrid} from './chip-grid'; import {MatChipTextControl} from './chip-text-control'; +import {MAT_CHIPS_DEFAULT_OPTIONS, MatChipsDefaultOptions} from './tokens'; /** Represents an input event on a `matChipInput`. */ export interface MatChipInputEvent { @@ -220,7 +220,7 @@ export class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy { /** * Implemented as part of MatChipTextControl. - * @docs-private + * @nodoc */ get describedByIds(): string[] { const element = this._elementRef.nativeElement; diff --git a/src/material/chips/chip-listbox.ts b/src/material/chips/chip-listbox.ts index 37c50d452712..640e65be2c66 100644 --- a/src/material/chips/chip-listbox.ts +++ b/src/material/chips/chip-listbox.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {TAB} from '@angular/cdk/keycodes'; import { AfterContentInit, booleanAttribute, @@ -24,11 +25,10 @@ import { import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; import {Observable} from 'rxjs'; import {startWith, takeUntil} from 'rxjs/operators'; -import {TAB} from '@angular/cdk/keycodes'; import {MatChip, MatChipEvent} from './chip'; +import {MatChipAction} from './chip-action'; import {MatChipOption, MatChipSelectionChange} from './chip-option'; import {MatChipSet} from './chip-set'; -import {MatChipAction} from './chip-action'; import {MAT_CHIPS_DEFAULT_OPTIONS} from './tokens'; /** Change event object that is emitted when the chip listbox value has changed. */ @@ -44,7 +44,7 @@ export class MatChipListboxChange { /** * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor. * This allows it to support [(ngModel)]. - * @docs-private + * @nodoc */ export const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -88,13 +88,13 @@ export class MatChipListbox { /** * Function when touched. Set as part of ControlValueAccessor implementation. - * @docs-private + * @nodoc */ _onTouched = () => {}; /** * Function when changed. Set as part of ControlValueAccessor implementation. - * @docs-private + * @nodoc */ _onChange: (value: any) => void = () => {}; @@ -247,7 +247,7 @@ export class MatChipListbox /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ writeValue(value: any): void { if (value != null) { @@ -259,7 +259,7 @@ export class MatChipListbox /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ registerOnChange(fn: (value: any) => void): void { this._onChange = fn; @@ -267,7 +267,7 @@ export class MatChipListbox /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ registerOnTouched(fn: () => void): void { this._onTouched = fn; @@ -275,7 +275,7 @@ export class MatChipListbox /** * Implemented as part of ControlValueAccessor. - * @docs-private + * @nodoc */ setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; diff --git a/src/material/core/animation/animation.ts b/src/material/core/animation/animation.ts index c228579047ab..f6e0e554c6cc 100644 --- a/src/material/core/animation/animation.ts +++ b/src/material/core/animation/animation.ts @@ -21,7 +21,7 @@ export const MATERIAL_ANIMATIONS = new InjectionToken('MATERIA /** * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 - * @docs-private + * @nodoc */ export class AnimationCurves { static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)'; @@ -33,7 +33,7 @@ export class AnimationCurves { /** * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 - * @docs-private + * @nodoc */ export class AnimationDurations { static COMPLEX = '375ms'; @@ -43,7 +43,7 @@ export class AnimationDurations { /** * Returns whether animations have been disabled by DI. Must be called in a DI context. - * @docs-private + * @nodoc */ export function _animationsDisabled(): boolean { if ( diff --git a/src/material/core/common-behaviors/error-state.ts b/src/material/core/common-behaviors/error-state.ts index eefe1baec6de..2f5cecb41a4c 100644 --- a/src/material/core/common-behaviors/error-state.ts +++ b/src/material/core/common-behaviors/error-state.ts @@ -15,7 +15,7 @@ interface ErrorStateMatcher extends _ErrorStateMatcher {} /** * Class that tracks the error state of a component. - * @docs-private + * @nodoc */ export class _ErrorStateTracker { /** Whether the tracker is currently in an error state. */ diff --git a/src/material/core/datetime/date-adapter.ts b/src/material/core/datetime/date-adapter.ts index fd995894afbd..4c3a8ba534f8 100644 --- a/src/material/core/datetime/date-adapter.ts +++ b/src/material/core/datetime/date-adapter.ts @@ -16,7 +16,7 @@ export const MAT_DATE_LOCALE = new InjectionToken<{}>('MAT_DATE_LOCALE', { }); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/core/focus-indicators/structural-styles.ts b/src/material/core/focus-indicators/structural-styles.ts index f099c01c6c38..1ef5026f6032 100644 --- a/src/material/core/focus-indicators/structural-styles.ts +++ b/src/material/core/focus-indicators/structural-styles.ts @@ -10,7 +10,7 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/co /** * Component used to load structural styles for focus indicators. - * @docs-private + * @nodoc */ @Component({ selector: 'structural-styles', diff --git a/src/material/core/internal-form-field/internal-form-field.ts b/src/material/core/internal-form-field/internal-form-field.ts index 72744db31924..d1d39ede8368 100644 --- a/src/material/core/internal-form-field/internal-form-field.ts +++ b/src/material/core/internal-form-field/internal-form-field.ts @@ -11,7 +11,7 @@ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@ang /** * Internal shared component used as a container in form field controls. * Not to be confused with `mat-form-field` which MDC calls a "text field". - * @docs-private + * @nodoc */ @Component({ // Use a `div` selector to match the old markup closer. diff --git a/src/material/core/line/line.ts b/src/material/core/line/line.ts index 6725bb44be79..f81be1434b11 100644 --- a/src/material/core/line/line.ts +++ b/src/material/core/line/line.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {NgModule, Directive, ElementRef, QueryList} from '@angular/core'; +import {Directive, ElementRef, NgModule, QueryList} from '@angular/core'; import {startWith} from 'rxjs/operators'; import {MatCommonModule} from '../common-behaviors/common-module'; @@ -23,7 +23,7 @@ export class MatLine {} /** * Helper that takes a query list of lines and sets the correct class on the host. - * @docs-private + * @nodoc */ export function setLines( lines: QueryList, diff --git a/src/material/core/option/option-parent.ts b/src/material/core/option/option-parent.ts index 8df8908f35a5..316ee7334bbd 100644 --- a/src/material/core/option/option-parent.ts +++ b/src/material/core/option/option-parent.ts @@ -11,7 +11,7 @@ import {InjectionToken, Signal} from '@angular/core'; /** * Describes a parent component that manages a list of options. * Contains properties that the options can inherit. - * @docs-private + * @nodoc */ export interface MatOptionParentComponent { disableRipple?: boolean | Signal; diff --git a/src/material/core/option/option.ts b/src/material/core/option/option.ts index 1edd226780ed..cb920dda026d 100644 --- a/src/material/core/option/option.ts +++ b/src/material/core/option/option.ts @@ -8,31 +8,31 @@ import {_IdGenerator, FocusableOption, FocusOrigin} from '@angular/cdk/a11y'; import {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes'; +import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; import { - Component, - ViewEncapsulation, + AfterViewChecked, + booleanAttribute, ChangeDetectionStrategy, - ElementRef, ChangeDetectorRef, - AfterViewChecked, - OnDestroy, - Input, - Output, + Component, + ElementRef, EventEmitter, - QueryList, - ViewChild, - booleanAttribute, inject, + Input, isSignal, + OnDestroy, + Output, + QueryList, Signal, + ViewChild, + ViewEncapsulation, } from '@angular/core'; import {Subject} from 'rxjs'; -import {MAT_OPTGROUP, MatOptgroup} from './optgroup'; -import {MatOptionParentComponent, MAT_OPTION_PARENT_COMPONENT} from './option-parent'; +import {_StructuralStylesLoader} from '../focus-indicators/structural-styles'; import {MatRipple} from '../ripple/ripple'; import {MatPseudoCheckbox} from '../selection/pseudo-checkbox/pseudo-checkbox'; -import {_StructuralStylesLoader} from '../focus-indicators/structural-styles'; -import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; +import {MAT_OPTGROUP, MatOptgroup} from './optgroup'; +import {MAT_OPTION_PARENT_COMPONENT, MatOptionParentComponent} from './option-parent'; /** Event object emitted by MatOption when selected or deselected. */ export class MatOptionSelectionChange { @@ -297,7 +297,7 @@ export class MatOption implements FocusableOption, AfterViewChecked, On * @param optionIndex Index of the option at which to start counting. * @param options Flat list of all of the options. * @param optionGroups Flat list of all of the option groups. - * @docs-private + * @nodoc */ export function _countGroupLabelsBeforeOption( optionIndex: number, @@ -327,7 +327,7 @@ export function _countGroupLabelsBeforeOption( * @param optionHeight Height of the options. * @param currentScrollPosition Current scroll position of the panel. * @param panelHeight Height of the panel. - * @docs-private + * @nodoc */ export function _getOptionScrollPosition( optionOffset: number, diff --git a/src/material/core/private/ripple-loader.ts b/src/material/core/private/ripple-loader.ts index 8725d58cb2e8..15aa1d368fdc 100644 --- a/src/material/core/private/ripple-loader.ts +++ b/src/material/core/private/ripple-loader.ts @@ -6,24 +6,23 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Platform, _getEventTarget} from '@angular/cdk/platform'; import { + DOCUMENT, Injectable, Injector, NgZone, OnDestroy, RendererFactory2, inject, - DOCUMENT, } from '@angular/core'; +import {_animationsDisabled} from '../animation/animation'; import { MAT_RIPPLE_GLOBAL_OPTIONS, RippleRenderer, RippleTarget, defaultRippleAnimationConfig, } from '../ripple'; -import {Platform, _getEventTarget} from '@angular/cdk/platform'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; -import {_animationsDisabled} from '../animation/animation'; /** The options for the MatRippleLoader's event listeners. */ const eventListenerOptions = {capture: true}; @@ -53,7 +52,7 @@ const matRippleDisabled = 'mat-ripple-loader-disabled'; * This service allows us to avoid eagerly creating & attaching MatRipples. * It works by creating & attaching a ripple only when a component is first interacted with. * - * @docs-private + * @nodoc */ @Injectable({providedIn: 'root'}) export class MatRippleLoader implements OnDestroy { diff --git a/src/material/core/ripple/ripple-renderer.ts b/src/material/core/ripple/ripple-renderer.ts index 9342cbf18e08..cf8d4c823e1f 100644 --- a/src/material/core/ripple/ripple-renderer.ts +++ b/src/material/core/ripple/ripple-renderer.ts @@ -5,25 +5,25 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ +import {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '@angular/cdk/a11y'; +import {coerceElement} from '@angular/cdk/coercion'; +import {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { + ChangeDetectionStrategy, + Component, ElementRef, + Injector, NgZone, - Component, - ChangeDetectionStrategy, ViewEncapsulation, - Injector, } from '@angular/core'; -import {Platform, normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform'; -import {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '@angular/cdk/a11y'; -import {coerceElement} from '@angular/cdk/coercion'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; -import {RippleRef, RippleState, RippleConfig} from './ripple-ref'; import {RippleEventManager} from './ripple-event-manager'; +import {RippleConfig, RippleRef, RippleState} from './ripple-ref'; /** * Interface that describes the target for launching ripples. * It defines the ripple configuration and disabled state for interaction ripples. - * @docs-private + * @nodoc */ export interface RippleTarget { /** Configuration for ripples that are launched on pointer down. */ @@ -80,7 +80,7 @@ export class _MatRippleStylesLoader {} * The constructor takes a reference to the ripple directive's host element and a map of DOM * event handlers to be installed on the element that triggers ripple animations. * This will eventually become a custom renderer once Angular support exists. - * @docs-private + * @nodoc */ export class RippleRenderer implements EventListenerObject { /** Element where the ripples are being added to. */ @@ -314,7 +314,7 @@ export class RippleRenderer implements EventListenerObject { /** * Handles all registered events. - * @docs-private + * @nodoc */ handleEvent(event: Event) { if (event.type === 'mousedown') { diff --git a/src/material/core/ripple/ripple.ts b/src/material/core/ripple/ripple.ts index c5e6c603c2fe..58dfcd61d311 100644 --- a/src/material/core/ripple/ripple.ts +++ b/src/material/core/ripple/ripple.ts @@ -11,17 +11,16 @@ import { Directive, ElementRef, InjectionToken, + Injector, Input, NgZone, OnDestroy, OnInit, - Injector, inject, } from '@angular/core'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; +import {_animationsDisabled} from '../animation/animation'; import {RippleAnimationConfig, RippleConfig, RippleRef} from './ripple-ref'; import {RippleRenderer, RippleTarget} from './ripple-renderer'; -import {_animationsDisabled} from '../animation/animation'; /** Configurable options for `matRipple`. */ export interface RippleGlobalOptions { @@ -130,7 +129,7 @@ export class MatRipple implements OnInit, OnDestroy, RippleTarget { /** Options that are set globally for all ripples. */ private _globalOptions: RippleGlobalOptions; - /** @docs-private Whether ripple directive is initialized and the input bindings are set. */ + /** @nodoc Whether ripple directive is initialized and the input bindings are set. */ _isInitialized: boolean = false; constructor(...args: unknown[]); @@ -168,7 +167,7 @@ export class MatRipple implements OnInit, OnDestroy, RippleTarget { /** * Ripple configuration from the directive's input values. - * @docs-private Implemented as part of RippleTarget + * @nodoc Implemented as part of RippleTarget */ get rippleConfig(): RippleConfig { return { @@ -186,7 +185,7 @@ export class MatRipple implements OnInit, OnDestroy, RippleTarget { /** * Whether ripples on pointer-down are disabled or not. - * @docs-private Implemented as part of RippleTarget + * @nodoc Implemented as part of RippleTarget */ get rippleDisabled(): boolean { return this.disabled || !!this._globalOptions.disabled; diff --git a/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts b/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts index 79962f379ef6..582883b076c2 100644 --- a/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts +++ b/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Component, ViewEncapsulation, Input, ChangeDetectionStrategy} from '@angular/core'; +import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; import {_animationsDisabled} from '../../animation/animation'; /** * Possible states for a pseudo checkbox. - * @docs-private + * @nodoc */ export type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate'; @@ -26,7 +26,7 @@ export type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate'; * interchangeable with `` and should *not* be used if the user would directly * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail * of more complex components that appropriately handle selected / checked state. - * @docs-private + * @nodoc */ @Component({ encapsulation: ViewEncapsulation.None, diff --git a/src/material/datepicker/calendar-body.ts b/src/material/datepicker/calendar-body.ts index 34af64d8faba..7c9d16bbcd7a 100644 --- a/src/material/datepicker/calendar-body.ts +++ b/src/material/datepicker/calendar-body.ts @@ -6,28 +6,28 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator} from '@angular/cdk/a11y'; import {Platform} from '@angular/cdk/platform'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; +import {NgClass} from '@angular/common'; import { + afterNextRender, + AfterViewChecked, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, + inject, + Injector, Input, - Output, - ViewEncapsulation, NgZone, OnChanges, - SimpleChanges, OnDestroy, - AfterViewChecked, - inject, - afterNextRender, - Injector, + Output, Renderer2, + SimpleChanges, + ViewEncapsulation, } from '@angular/core'; -import {_IdGenerator} from '@angular/cdk/a11y'; -import {NgClass} from '@angular/common'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import {_StructuralStylesLoader} from '../core'; import {MatDatepickerIntl} from './datepicker-intl'; @@ -44,7 +44,7 @@ let uniqueIdCounter = 0; /** * An internal class that represents the data corresponding to a single calendar cell. - * @docs-private + * @nodoc */ export class MatCalendarCell { readonly id = uniqueIdCounter++; @@ -83,7 +83,7 @@ const passiveEventOptions = {passive: true}; /** * An internal component used to display calendar data in a table. - * @docs-private + * @nodoc */ @Component({ selector: '[mat-calendar-body]', diff --git a/src/material/datepicker/calendar.ts b/src/material/datepicker/calendar.ts index 48eaf22b7de7..de1e0458f9c0 100644 --- a/src/material/datepicker/calendar.ts +++ b/src/material/datepicker/calendar.ts @@ -6,7 +6,9 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator, CdkMonitorFocus} from '@angular/cdk/a11y'; import {CdkPortalOutlet, ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal'; +import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; import { AfterContentInit, AfterViewChecked, @@ -14,6 +16,7 @@ import { ChangeDetectorRef, Component, EventEmitter, + inject, Input, OnChanges, OnDestroy, @@ -22,11 +25,12 @@ import { SimpleChanges, ViewChild, ViewEncapsulation, - inject, } from '@angular/core'; -import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '../core'; import {Subject, Subscription} from 'rxjs'; -import {MatCalendarUserEvent, MatCalendarCellClassFunction} from './calendar-body'; +import {MatButton, MatIconButton} from '../button'; +import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '../core'; +import {MatCalendarCellClassFunction, MatCalendarUserEvent} from './calendar-body'; +import {DateRange, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model'; import {createMissingDateImplError} from './datepicker-errors'; import {MatDatepickerIntl} from './datepicker-intl'; import {MatMonthView} from './month-view'; @@ -37,14 +41,10 @@ import { yearsPerPage, } from './multi-year-view'; import {MatYearView} from './year-view'; -import {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, DateRange} from './date-selection-model'; -import {MatIconButton, MatButton} from '../button'; -import {_IdGenerator, CdkMonitorFocus} from '@angular/cdk/a11y'; -import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; /** * Possible views for the calendar. - * @docs-private + * @nodoc */ export type MatCalendarView = 'month' | 'year' | 'multi-year'; diff --git a/src/material/datepicker/date-range-input-parts.ts b/src/material/datepicker/date-range-input-parts.ts index 6bc39f0d527d..0a5f16ce89b3 100644 --- a/src/material/datepicker/date-range-input-parts.ts +++ b/src/material/datepicker/date-range-input-parts.ts @@ -31,9 +31,9 @@ import { } from '@angular/forms'; import {ErrorStateMatcher, _ErrorStateTracker} from '../core'; import {_computeAriaAccessibleName} from './aria-accessible-name'; +import {MatDateRangeInput} from './date-range-input'; import {DateRange, DateSelectionModelChange} from './date-selection-model'; import {MatDatepickerInputBase} from './datepicker-input-base'; -import {MatDateRangeInput} from './date-range-input'; /** * Base class for the individual inputs that can be projected inside a `mat-date-range-input`. @@ -52,7 +52,7 @@ abstract class MatDateRangeInputPartBase /** * Form control bound to this input part. - * @docs-private + * @nodoc */ ngControl: NgControl; diff --git a/src/material/datepicker/date-range-input.ts b/src/material/datepicker/date-range-input.ts index 0d507fd3c24a..67c452a053dd 100644 --- a/src/material/datepicker/date-range-input.ts +++ b/src/material/datepicker/date-range-input.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {_IdGenerator, CdkMonitorFocus, FocusOrigin} from '@angular/cdk/a11y'; +import {CdkMonitorFocus, FocusOrigin, _IdGenerator} from '@angular/cdk/a11y'; import { AfterContentInit, ChangeDetectionStrategy, @@ -19,13 +19,13 @@ import { SimpleChanges, ViewEncapsulation, booleanAttribute, - signal, inject, + signal, } from '@angular/core'; import {ControlContainer, NgControl, Validators} from '@angular/forms'; +import {Subject, Subscription, merge} from 'rxjs'; import {DateAdapter, ThemePalette} from '../core'; import {MAT_FORM_FIELD, MatFormFieldControl} from '../form-field'; -import {Subject, Subscription, merge} from 'rxjs'; import type {MatEndDate, MatStartDate} from './date-range-input-parts'; import {MatDateRangePickerInput} from './date-range-picker'; import {DateRange, MatDateSelectionModel} from './date-selection-model'; @@ -97,7 +97,7 @@ export class MatDateRangeInput /** * Implemented as a part of `MatFormFieldControl`. * Set the placeholder attribute on `matStartDate` and `matEndDate`. - * @docs-private + * @nodoc */ get placeholder() { const start = this._startInput?._getPlaceholder() || ''; @@ -250,7 +250,7 @@ export class MatDateRangeInput /** * Implemented as a part of `MatFormFieldControl`. * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands. - * @docs-private + * @nodoc */ ngControl: NgControl | null; @@ -259,7 +259,7 @@ export class MatDateRangeInput /** * Disable the automatic labeling to avoid issues like #27241. - * @docs-private + * @nodoc */ readonly disableAutomaticLabeling = true; @@ -286,7 +286,7 @@ export class MatDateRangeInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get describedByIds(): string[] { const element = this._elementRef.nativeElement; @@ -297,7 +297,7 @@ export class MatDateRangeInput /** * Implemented as a part of `MatFormFieldControl`. - * @docs-private + * @nodoc */ setDescribedByIds(ids: string[]): void { this._ariaDescribedBy = ids.length ? ids.join(' ') : null; @@ -305,7 +305,7 @@ export class MatDateRangeInput /** * Implemented as a part of `MatFormFieldControl`. - * @docs-private + * @nodoc */ onContainerClick(): void { if (!this.focused && !this.disabled) { diff --git a/src/material/datepicker/date-range-picker.ts b/src/material/datepicker/date-range-picker.ts index f833b24c9d1f..6a244ad7af7b 100644 --- a/src/material/datepicker/date-range-picker.ts +++ b/src/material/datepicker/date-range-picker.ts @@ -7,13 +7,13 @@ */ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; -import {MatDatepickerBase, MatDatepickerContent, MatDatepickerControl} from './datepicker-base'; -import {MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, DateRange} from './date-selection-model'; import {MAT_CALENDAR_RANGE_STRATEGY_PROVIDER} from './date-range-selection-strategy'; +import {DateRange, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model'; +import {MatDatepickerBase, MatDatepickerContent, MatDatepickerControl} from './datepicker-base'; /** * Input that can be associated with a date range picker. - * @docs-private + * @nodoc */ export interface MatDateRangePickerInput extends MatDatepickerControl { _getEndDateAccessibleName(): string | null; diff --git a/src/material/datepicker/date-range-selection-strategy.ts b/src/material/datepicker/date-range-selection-strategy.ts index 8bd18c4c779d..243f855b2056 100644 --- a/src/material/datepicker/date-range-selection-strategy.ts +++ b/src/material/datepicker/date-range-selection-strategy.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Injectable, InjectionToken, Optional, SkipSelf, FactoryProvider} from '@angular/core'; +import {FactoryProvider, Injectable, InjectionToken, Optional, SkipSelf} from '@angular/core'; import {DateAdapter} from '../core'; import {DateRange} from './date-selection-model'; @@ -132,7 +132,7 @@ export class DefaultMatCalendarRangeStrategy implements MatDateRangeSelection } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -144,7 +144,7 @@ export function MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY( } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/datepicker/date-selection-model.ts b/src/material/datepicker/date-selection-model.ts index 76d04b29273d..93708e2aac9f 100644 --- a/src/material/datepicker/date-selection-model.ts +++ b/src/material/datepicker/date-selection-model.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.dev/license */ -import {FactoryProvider, Injectable, Optional, SkipSelf, OnDestroy} from '@angular/core'; -import {DateAdapter} from '../core'; +import {FactoryProvider, Injectable, OnDestroy, Optional, SkipSelf} from '@angular/core'; import {Observable, Subject} from 'rxjs'; +import {DateAdapter} from '../core'; /** A class representing a range of dates. */ export class DateRange { @@ -29,13 +29,13 @@ export class DateRange { /** * Conditionally picks the date type, if a DateRange is passed in. - * @docs-private + * @nodoc */ export type ExtractDateTypeFromSelection = T extends DateRange ? D : NonNullable; /** * Event emitted by the date selection model when its selection changes. - * @docs-private + * @nodoc */ export interface DateSelectionModelChange { /** New value for the selection. */ @@ -50,7 +50,7 @@ export interface DateSelectionModelChange { /** * A selection model containing a date selection. - * @docs-private + * @nodoc */ @Injectable() export abstract class MatDateSelectionModel> @@ -103,7 +103,7 @@ export abstract class MatDateSelectionModel extends MatDateSelectionModel { @@ -142,7 +142,7 @@ export class MatSingleDateSelectionModel extends MatDateSelectionModel extends MatDateSelectionModel, D> { @@ -212,7 +212,7 @@ export class MatRangeDateSelectionModel extends MatDateSelectionModel ScrollStrategy>( @@ -93,7 +93,7 @@ export const MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStr ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -109,7 +109,7 @@ export type DatepickerDropdownPositionX = 'start' | 'end'; export type DatepickerDropdownPositionY = 'above' | 'below'; /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -124,7 +124,7 @@ export const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = { * MatCalendar directly as the content so we can control the initial focus. This also gives us a * place to put additional features of the overlay that are not part of the calendar itself in the * future. (e.g. confirmation buttons). - * @docs-private + * @nodoc */ @Component({ selector: 'mat-datepicker-content', diff --git a/src/material/datepicker/datepicker-errors.ts b/src/material/datepicker/datepicker-errors.ts index 0bfc68179624..103b08718538 100644 --- a/src/material/datepicker/datepicker-errors.ts +++ b/src/material/datepicker/datepicker-errors.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -/** @docs-private */ +/** @nodoc */ export function createMissingDateImplError(provider: string) { return Error( `MatDatepicker: No provider found for ${provider}. You must add one of the following ` + diff --git a/src/material/datepicker/datepicker-input-base.ts b/src/material/datepicker/datepicker-input-base.ts index 632cec9d45a4..532c8d6e08c8 100644 --- a/src/material/datepicker/datepicker-input-base.ts +++ b/src/material/datepicker/datepicker-input-base.ts @@ -8,17 +8,17 @@ import {DOWN_ARROW, hasModifierKey, ModifierKey} from '@angular/cdk/keycodes'; import { + AfterViewInit, + booleanAttribute, Directive, ElementRef, EventEmitter, + inject, Input, + OnChanges, OnDestroy, Output, - AfterViewInit, - OnChanges, SimpleChanges, - booleanAttribute, - inject, } from '@angular/core'; import { AbstractControl, @@ -27,14 +27,14 @@ import { Validator, ValidatorFn, } from '@angular/forms'; +import {Subject, Subscription} from 'rxjs'; import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats, ThemePalette} from '../core'; -import {Subscription, Subject} from 'rxjs'; -import {createMissingDateImplError} from './datepicker-errors'; import { + DateSelectionModelChange, ExtractDateTypeFromSelection, MatDateSelectionModel, - DateSelectionModelChange, } from './date-selection-model'; +import {createMissingDateImplError} from './datepicker-errors'; /** * An event used for datepicker input and change events. We don't always have access to a native @@ -279,12 +279,12 @@ export abstract class MatDatepickerInputBase void): void { this._validatorOnChange = fn; } - /** @docs-private */ + /** @nodoc */ validate(c: AbstractControl): ValidationErrors | null { return this._validator ? this._validator(c) : null; } diff --git a/src/material/datepicker/datepicker-input.ts b/src/material/datepicker/datepicker-input.ts index d555a1b5812e..61dcfc768e7a 100644 --- a/src/material/datepicker/datepicker-input.ts +++ b/src/material/datepicker/datepicker-input.ts @@ -6,24 +6,24 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Directive, ElementRef, forwardRef, Input, OnDestroy, signal, inject} from '@angular/core'; +import {Directive, ElementRef, forwardRef, inject, Input, OnDestroy, signal} from '@angular/core'; import {NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidatorFn, Validators} from '@angular/forms'; +import {Subscription} from 'rxjs'; import {ThemePalette} from '../core'; import {MAT_FORM_FIELD} from '../form-field'; import {MAT_INPUT_VALUE_ACCESSOR} from '../input'; -import {Subscription} from 'rxjs'; import {DateSelectionModelChange} from './date-selection-model'; import {MatDatepickerControl, MatDatepickerPanel} from './datepicker-base'; import {_MatFormFieldPartial, DateFilterFn, MatDatepickerInputBase} from './datepicker-input-base'; -/** @docs-private */ +/** @nodoc */ export const MAT_DATEPICKER_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MatDatepickerInput), multi: true, }; -/** @docs-private */ +/** @nodoc */ export const MAT_DATEPICKER_VALIDATORS: any = { provide: NG_VALIDATORS, useExisting: forwardRef(() => MatDatepickerInput), diff --git a/src/material/datepicker/month-view.ts b/src/material/datepicker/month-view.ts index c9067801d168..bb7d93371eac 100644 --- a/src/material/datepicker/month-view.ts +++ b/src/material/datepicker/month-view.ts @@ -6,20 +6,22 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Directionality} from '@angular/cdk/bidi'; import { DOWN_ARROW, END, ENTER, + ESCAPE, HOME, LEFT_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, - UP_ARROW, SPACE, - ESCAPE, + UP_ARROW, hasModifierKey, } from '@angular/cdk/keycodes'; +import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; import { AfterContentInit, ChangeDetectionStrategy, @@ -27,31 +29,29 @@ import { Component, EventEmitter, Input, - Output, - ViewEncapsulation, - ViewChild, + OnChanges, OnDestroy, + Output, SimpleChanges, - OnChanges, + ViewChild, + ViewEncapsulation, inject, } from '@angular/core'; +import {Subscription} from 'rxjs'; +import {startWith} from 'rxjs/operators'; import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '../core'; -import {Directionality} from '@angular/cdk/bidi'; import { MatCalendarBody, MatCalendarCell, - MatCalendarUserEvent, MatCalendarCellClassFunction, + MatCalendarUserEvent, } from './calendar-body'; -import {createMissingDateImplError} from './datepicker-errors'; -import {Subscription} from 'rxjs'; -import {startWith} from 'rxjs/operators'; -import {DateRange} from './date-selection-model'; import { - MatDateRangeSelectionStrategy, MAT_DATE_RANGE_SELECTION_STRATEGY, + MatDateRangeSelectionStrategy, } from './date-range-selection-strategy'; -import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private'; +import {DateRange} from './date-selection-model'; +import {createMissingDateImplError} from './datepicker-errors'; const DAYS_PER_WEEK = 7; @@ -59,7 +59,7 @@ let uniqueIdCounter = 0; /** * An internal component used to display a single month in the datepicker. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-month-view', diff --git a/src/material/datepicker/multi-year-view.ts b/src/material/datepicker/multi-year-view.ts index be12f2ea1c44..c494e76408a5 100644 --- a/src/material/datepicker/multi-year-view.ts +++ b/src/material/datepicker/multi-year-view.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Directionality} from '@angular/cdk/bidi'; import { DOWN_ARROW, END, @@ -15,8 +16,8 @@ import { PAGE_DOWN, PAGE_UP, RIGHT_ARROW, - UP_ARROW, SPACE, + UP_ARROW, } from '@angular/cdk/keycodes'; import { AfterContentInit, @@ -25,24 +26,23 @@ import { Component, EventEmitter, Input, + OnDestroy, Output, ViewChild, ViewEncapsulation, - OnDestroy, inject, } from '@angular/core'; +import {Subscription} from 'rxjs'; +import {startWith} from 'rxjs/operators'; import {DateAdapter} from '../core'; -import {Directionality} from '@angular/cdk/bidi'; import { MatCalendarBody, MatCalendarCell, - MatCalendarUserEvent, MatCalendarCellClassFunction, + MatCalendarUserEvent, } from './calendar-body'; -import {createMissingDateImplError} from './datepicker-errors'; -import {Subscription} from 'rxjs'; -import {startWith} from 'rxjs/operators'; import {DateRange} from './date-selection-model'; +import {createMissingDateImplError} from './datepicker-errors'; export const yearsPerPage = 24; @@ -50,7 +50,7 @@ export const yearsPerRow = 4; /** * An internal component used to display a year selector in the datepicker. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-multi-year-view', diff --git a/src/material/datepicker/year-view.ts b/src/material/datepicker/year-view.ts index 011e2a556cce..85b5b9319dcd 100644 --- a/src/material/datepicker/year-view.ts +++ b/src/material/datepicker/year-view.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Directionality} from '@angular/cdk/bidi'; import { DOWN_ARROW, END, @@ -15,8 +16,8 @@ import { PAGE_DOWN, PAGE_UP, RIGHT_ARROW, - UP_ARROW, SPACE, + UP_ARROW, } from '@angular/cdk/keycodes'; import { AfterContentInit, @@ -25,28 +26,27 @@ import { Component, EventEmitter, Input, + OnDestroy, Output, ViewChild, ViewEncapsulation, - OnDestroy, inject, } from '@angular/core'; +import {Subscription} from 'rxjs'; +import {startWith} from 'rxjs/operators'; import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '../core'; -import {Directionality} from '@angular/cdk/bidi'; import { MatCalendarBody, MatCalendarCell, - MatCalendarUserEvent, MatCalendarCellClassFunction, + MatCalendarUserEvent, } from './calendar-body'; -import {createMissingDateImplError} from './datepicker-errors'; -import {Subscription} from 'rxjs'; -import {startWith} from 'rxjs/operators'; import {DateRange} from './date-selection-model'; +import {createMissingDateImplError} from './datepicker-errors'; /** * An internal component used to display a single year in the datepicker. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-year-view', diff --git a/src/material/dialog/dialog-animations.ts b/src/material/dialog/dialog-animations.ts index cd7ef6b4433b..ac623494419c 100644 --- a/src/material/dialog/dialog-animations.ts +++ b/src/material/dialog/dialog-animations.ts @@ -8,7 +8,7 @@ /** * Default parameters for the animation for backwards compatibility. - * @docs-private + * @nodoc * @deprecated Will stop being exported. * @breaking-change 21.0.0 */ @@ -18,7 +18,7 @@ export const _defaultParams = { /** * Animations used by MatDialog. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/expansion/accordion-base.ts b/src/material/expansion/accordion-base.ts index db94a151bc8b..604164b8a46a 100644 --- a/src/material/expansion/accordion-base.ts +++ b/src/material/expansion/accordion-base.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import {InjectionToken} from '@angular/core'; import {CdkAccordion} from '@angular/cdk/accordion'; +import {InjectionToken} from '@angular/core'; /** MatAccordion's display modes. */ export type MatAccordionDisplayMode = 'default' | 'flat'; @@ -17,7 +17,7 @@ export type MatAccordionTogglePosition = 'before' | 'after'; /** * Base interface for a `MatAccordion`. - * @docs-private + * @nodoc */ export interface MatAccordionBase extends CdkAccordion { /** Whether the expansion indicator should be hidden. */ diff --git a/src/material/expansion/expansion-animations.ts b/src/material/expansion/expansion-animations.ts index e1ce64e525d3..3524771c17af 100644 --- a/src/material/expansion/expansion-animations.ts +++ b/src/material/expansion/expansion-animations.ts @@ -33,7 +33,7 @@ export const EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2, * * Angular Bug: https://github.com/angular/angular/issues/18847 * - * @docs-private + * @nodoc * @deprecated No longer being used, to be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/expansion/expansion-panel-base.ts b/src/material/expansion/expansion-panel-base.ts index d241f4655947..f39fe51da6d2 100644 --- a/src/material/expansion/expansion-panel-base.ts +++ b/src/material/expansion/expansion-panel-base.ts @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.dev/license */ -import {InjectionToken} from '@angular/core'; import {CdkAccordionItem} from '@angular/cdk/accordion'; +import {InjectionToken} from '@angular/core'; /** * Base interface for a `MatExpansionPanel`. - * @docs-private + * @nodoc */ export interface MatExpansionPanelBase extends CdkAccordionItem { /** Whether the toggle indicator should be hidden. */ diff --git a/src/material/expansion/expansion-panel-header.ts b/src/material/expansion/expansion-panel-header.ts index a9641381d280..9e0c385c069e 100644 --- a/src/material/expansion/expansion-panel-header.ts +++ b/src/material/expansion/expansion-panel-header.ts @@ -8,6 +8,7 @@ import {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; import {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterViewInit, ChangeDetectionStrategy, @@ -15,23 +16,22 @@ import { Component, Directive, ElementRef, + HostAttributeToken, + inject, Input, numberAttribute, OnDestroy, ViewEncapsulation, - inject, - HostAttributeToken, } from '@angular/core'; import {EMPTY, merge, Subscription} from 'rxjs'; import {filter} from 'rxjs/operators'; +import {_StructuralStylesLoader} from '../core'; import {MatAccordionTogglePosition} from './accordion-base'; import { + MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, MatExpansionPanel, MatExpansionPanelDefaultOptions, - MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, } from './expansion-panel'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; -import {_StructuralStylesLoader} from '../core'; /** * Header element of a ``. @@ -122,7 +122,7 @@ export class MatExpansionPanelHeader implements AfterViewInit, OnDestroy, Focusa /** * Whether the associated panel is disabled. Implemented as a part of `FocusableOption`. - * @docs-private + * @nodoc */ get disabled(): boolean { return this.panel.disabled; @@ -198,7 +198,7 @@ export class MatExpansionPanelHeader implements AfterViewInit, OnDestroy, Focusa /** * Focuses the panel header. Implemented as a part of `FocusableOption`. * @param origin Origin of the action that triggered the focus. - * @docs-private + * @nodoc */ focus(origin?: FocusOrigin, options?: FocusOptions) { if (origin) { diff --git a/src/material/form-field/form-field-animations.ts b/src/material/form-field/form-field-animations.ts index d0f5f0f3dee8..b66b3b5237ea 100644 --- a/src/material/form-field/form-field-animations.ts +++ b/src/material/form-field/form-field-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by the MatFormField. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/form-field/form-field-errors.ts b/src/material/form-field/form-field-errors.ts index 90ca8417a84f..b7b49ba23499 100644 --- a/src/material/form-field/form-field-errors.ts +++ b/src/material/form-field/form-field-errors.ts @@ -6,17 +6,17 @@ * found in the LICENSE file at https://angular.dev/license */ -/** @docs-private */ +/** @nodoc */ export function getMatFormFieldPlaceholderConflictError(): Error { return Error('Placeholder attribute and child element were both specified.'); } -/** @docs-private */ +/** @nodoc */ export function getMatFormFieldDuplicatedHintError(align: string): Error { return Error(`A hint was already declared for 'align="${align}"'.`); } -/** @docs-private */ +/** @nodoc */ export function getMatFormFieldMissingControlError(): Error { return Error('mat-form-field must contain a MatFormFieldControl.'); } diff --git a/src/material/form-field/form-field.ts b/src/material/form-field/form-field.ts index c3c81b054553..8e1641b01a0a 100644 --- a/src/material/form-field/form-field.ts +++ b/src/material/form-field/form-field.ts @@ -131,7 +131,7 @@ const FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM = `translateY(-50%)`; * is configured to use type information to rename properties, because it can't figure out which * class properties are coming from. This interface seems to work around the issue while preserving * our type safety (alternative being using `any` everywhere). - * @docs-private + * @nodoc */ interface MatFormFieldControl extends _MatFormFieldControl {} diff --git a/src/material/grid-list/grid-list-base.ts b/src/material/grid-list/grid-list-base.ts index 198abc830ab9..25db90bfa42e 100644 --- a/src/material/grid-list/grid-list-base.ts +++ b/src/material/grid-list/grid-list-base.ts @@ -10,13 +10,13 @@ import {InjectionToken} from '@angular/core'; /** * Injection token used to provide a grid list to a tile and to avoid circular imports. - * @docs-private + * @nodoc */ export const MAT_GRID_LIST = new InjectionToken('MAT_GRID_LIST'); /** * Base interface for a `MatGridList`. - * @docs-private + * @nodoc */ export interface MatGridListBase { cols: number; diff --git a/src/material/grid-list/grid-tile.ts b/src/material/grid-list/grid-tile.ts index 733da2c79ecb..90902def484a 100644 --- a/src/material/grid-list/grid-tile.ts +++ b/src/material/grid-list/grid-tile.ts @@ -6,20 +6,20 @@ * found in the LICENSE file at https://angular.dev/license */ +import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import { + AfterContentInit, + ChangeDetectionStrategy, Component, - ViewEncapsulation, - ElementRef, - Input, ContentChildren, - QueryList, - AfterContentInit, Directive, - ChangeDetectionStrategy, + ElementRef, inject, + Input, + QueryList, + ViewEncapsulation, } from '@angular/core'; import {MatLine, setLines} from '../core'; -import {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion'; import {MAT_GRID_LIST, MatGridListBase} from './grid-list-base'; @Component({ @@ -95,7 +95,7 @@ export class MatGridTileText implements AfterContentInit { /** * Directive whose purpose is to add the mat- CSS styling to this selector. - * @docs-private + * @nodoc */ @Directive({ selector: '[mat-grid-avatar], [matGridAvatar]', @@ -105,7 +105,7 @@ export class MatGridAvatarCssMatStyler {} /** * Directive whose purpose is to add the mat- CSS styling to this selector. - * @docs-private + * @nodoc */ @Directive({ selector: 'mat-grid-tile-header', @@ -115,7 +115,7 @@ export class MatGridTileHeaderCssMatStyler {} /** * Directive whose purpose is to add the mat- CSS styling to this selector. - * @docs-private + * @nodoc */ @Directive({ selector: 'mat-grid-tile-footer', diff --git a/src/material/grid-list/tile-coordinator.ts b/src/material/grid-list/tile-coordinator.ts index 4a072fc99ae2..870a217c6435 100644 --- a/src/material/grid-list/tile-coordinator.ts +++ b/src/material/grid-list/tile-coordinator.ts @@ -8,7 +8,7 @@ /** * Interface describing a tile. - * @docs-private + * @nodoc */ export interface Tile { /** Amount of rows that the tile takes up. */ @@ -32,7 +32,7 @@ export interface Tile { * decrements each value in the tracking array (indicating that the column is one cell closer to * being free). * - * @docs-private + * @nodoc */ export class TileCoordinator { /** Tracking array (see class description). */ @@ -176,7 +176,7 @@ export class TileCoordinator { /** * Simple data structure for tile position (row, col). - * @docs-private + * @nodoc */ export class TilePosition { constructor( diff --git a/src/material/grid-list/tile-styler.ts b/src/material/grid-list/tile-styler.ts index 286637a301eb..d3c99ae79649 100644 --- a/src/material/grid-list/tile-styler.ts +++ b/src/material/grid-list/tile-styler.ts @@ -25,7 +25,7 @@ export interface TileStyleTarget { /** * Sets the style properties for an individual tile, given the position calculated by the * Tile Coordinator. - * @docs-private + * @nodoc */ export abstract class TileStyler { _gutterSize: string; @@ -137,7 +137,7 @@ export abstract class TileStyler { /** * Sets the vertical placement of the tile in the list. * This method will be implemented by each type of TileStyler. - * @docs-private + * @nodoc */ abstract setRowStyles( tile: MatGridTile, @@ -149,7 +149,7 @@ export abstract class TileStyler { /** * Calculates the computed height and returns the correct style property to set. * This method can be implemented by each type of TileStyler. - * @docs-private + * @nodoc */ getComputedHeight(): [string, string] | null { return null; @@ -158,7 +158,7 @@ export abstract class TileStyler { /** * Called when the tile styler is swapped out with a different one. To be used for cleanup. * @param list Grid list that the styler was attached to. - * @docs-private + * @nodoc */ abstract reset(list: TileStyleTarget): void; } @@ -166,7 +166,7 @@ export abstract class TileStyler { /** * This type of styler is instantiated when the user passes in a fixed row height. * Example `` - * @docs-private + * @nodoc */ export class FixedTileStyler extends TileStyler { constructor(public fixedRowHeight: string) { @@ -209,7 +209,7 @@ export class FixedTileStyler extends TileStyler { /** * This type of styler is instantiated when the user passes in a width:height ratio * for the row height. Example `` - * @docs-private + * @nodoc */ export class RatioTileStyler extends TileStyler { /** Ratio width:height given by user to determine row height. */ @@ -269,7 +269,7 @@ export class RatioTileStyler extends TileStyler { * In other words, the row height will reflect the total height of the container divided * by the number of rows. Example `` * - * @docs-private + * @nodoc */ export class FitTileStyler extends TileStyler { setRowStyles(tile: MatGridTile, rowIndex: number): void { diff --git a/src/material/icon/fake-svgs.ts b/src/material/icon/fake-svgs.ts index fe211d4c56c9..163c35689d95 100644 --- a/src/material/icon/fake-svgs.ts +++ b/src/material/icon/fake-svgs.ts @@ -9,7 +9,7 @@ /** * Fake URLs and associated SVG documents used by tests. * The ID attribute is used to load the icons, the name attribute is only used for testing. - * @docs-private + * @nodoc */ export const FAKE_SVGS = { cat: '', diff --git a/src/material/icon/icon-registry.ts b/src/material/icon/icon-registry.ts index 64223ed3c809..9d4c45599416 100644 --- a/src/material/icon/icon-registry.ts +++ b/src/material/icon/icon-registry.ts @@ -8,6 +8,7 @@ import {HttpClient, HttpErrorResponse} from '@angular/common/http'; import { + DOCUMENT, ErrorHandler, Inject, Injectable, @@ -16,7 +17,6 @@ import { Optional, SecurityContext, SkipSelf, - DOCUMENT, } from '@angular/core'; import {DomSanitizer, SafeHtml, SafeResourceUrl} from '@angular/platform-browser'; import {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs'; @@ -26,7 +26,7 @@ import {TrustedHTML, trustedHTMLFromString} from './trusted-types'; /** * Returns an exception to be thrown in the case when attempting to * load an icon with a name that cannot be found. - * @docs-private + * @nodoc */ export function getMatIconNameNotFoundError(iconName: string): Error { return Error(`Unable to find icon with the name "${iconName}"`); @@ -35,7 +35,7 @@ export function getMatIconNameNotFoundError(iconName: string): Error { /** * Returns an exception to be thrown when the consumer attempts to use * `` without including @angular/common/http. - * @docs-private + * @nodoc */ export function getMatIconNoHttpProviderError(): Error { return Error( @@ -47,7 +47,7 @@ export function getMatIconNoHttpProviderError(): Error { /** * Returns an exception to be thrown when a URL couldn't be sanitized. * @param url URL that was attempted to be sanitized. - * @docs-private + * @nodoc */ export function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error { return Error( @@ -59,7 +59,7 @@ export function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error /** * Returns an exception to be thrown when a HTML string couldn't be sanitized. * @param literal HTML that was attempted to be sanitized. - * @docs-private + * @nodoc */ export function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error { return Error( @@ -94,7 +94,7 @@ export interface SafeResourceUrlWithIconOptions { /** * Configuration for an icon, including the URL and possibly the cached SVG element. - * @docs-private + * @nodoc */ class SvgIconConfig { svgElement: SVGElement | null; @@ -729,7 +729,7 @@ export class MatIconRegistry implements OnDestroy { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -744,7 +744,7 @@ export function ICON_REGISTRY_PROVIDER_FACTORY( } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/icon/icon.ts b/src/material/icon/icon.ts index 48d540b60ae0..0885305ca8fa 100644 --- a/src/material/icon/icon.ts +++ b/src/material/icon/icon.ts @@ -11,20 +11,20 @@ import { booleanAttribute, ChangeDetectionStrategy, Component, + DOCUMENT, ElementRef, ErrorHandler, + HostAttributeToken, inject, InjectionToken, Input, OnDestroy, OnInit, ViewEncapsulation, - HostAttributeToken, - DOCUMENT, } from '@angular/core'; -import {ThemePalette} from '../core'; import {Subscription} from 'rxjs'; import {take} from 'rxjs/operators'; +import {ThemePalette} from '../core'; import {MatIconRegistry} from './icon-registry'; @@ -50,7 +50,7 @@ export const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('mat-icon-location', { providedIn: 'root', @@ -59,14 +59,14 @@ export const MAT_ICON_LOCATION = new InjectionToken('mat-icon-l /** * Stubbed out location for `MatIcon`. - * @docs-private + * @nodoc */ export interface MatIconLocation { getPathname: () => string; } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/input/input-errors.ts b/src/material/input/input-errors.ts index faa79ef1475a..bbe9e14c825a 100644 --- a/src/material/input/input-errors.ts +++ b/src/material/input/input-errors.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -/** @docs-private */ +/** @nodoc */ export function getMatInputUnsupportedTypeError(type: string): Error { return Error(`Input type "${type}" isn't supported by matInput.`); } diff --git a/src/material/input/input.ts b/src/material/input/input.ts index b286d3aad979..27bf5e9b1832 100644 --- a/src/material/input/input.ts +++ b/src/material/input/input.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator} from '@angular/cdk/a11y'; import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {getSupportedInputTypes, Platform} from '@angular/cdk/platform'; import {AutofillMonitor} from '@angular/cdk/text-field'; @@ -26,11 +27,10 @@ import { Renderer2, WritableSignal, } from '@angular/core'; -import {_IdGenerator} from '@angular/cdk/a11y'; import {FormGroupDirective, NgControl, NgForm, Validators} from '@angular/forms'; -import {ErrorStateMatcher, _ErrorStateTracker} from '../core'; -import {MatFormFieldControl, MatFormField, MAT_FORM_FIELD} from '../form-field'; import {Subject} from 'rxjs'; +import {_ErrorStateTracker, ErrorStateMatcher} from '../core'; +import {MAT_FORM_FIELD, MatFormField, MatFormFieldControl} from '../form-field'; import {getMatInputUnsupportedTypeError} from './input-errors'; import {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor'; @@ -128,31 +128,31 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ focused: boolean = false; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ readonly stateChanges: Subject = new Subject(); /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ controlType: string = 'mat-input'; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ autofilled = false; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get disabled(): boolean { @@ -172,7 +172,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get id(): string { @@ -185,19 +185,19 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() placeholder: string; /** * Name of the input. - * @docs-private + * @nodoc */ @Input() name: string; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get required(): boolean { @@ -242,13 +242,13 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input('aria-describedby') userAriaDescribedBy: string; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input() get value(): string { @@ -511,7 +511,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get empty(): boolean { return ( @@ -524,7 +524,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get shouldLabelFloat(): boolean { if (this._isNativeSelect) { @@ -549,7 +549,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get describedByIds(): string[] { const element = this._elementRef.nativeElement; @@ -560,7 +560,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ setDescribedByIds(ids: string[]) { const element = this._elementRef.nativeElement; @@ -574,7 +574,7 @@ export class MatInput /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ onContainerClick() { // Do not re-focus the input element if the element is already focused. Otherwise it can happen @@ -623,7 +623,7 @@ export class MatInput * a tooltip once enables the mouse wheel input for all number inputs as long as it exists. In * order to get reliable and intuitive behavior we apply a wheel event on our own thus making * sure increment and decrement by mouse wheel works every time. - * @docs-private + * @nodoc */ private _ensureWheelDefaultBehavior(): void { this._cleanupWebkitWheel?.(); diff --git a/src/material/list/list-base.ts b/src/material/list/list-base.ts index eaa942ed0043..fc12e86de775 100644 --- a/src/material/list/list-base.ts +++ b/src/material/list/list-base.ts @@ -8,18 +8,20 @@ import {BooleanInput, coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion'; import {Platform} from '@angular/cdk/platform'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterViewInit, ContentChildren, Directive, ElementRef, inject, + Injector, Input, NgZone, OnDestroy, QueryList, - Injector, } from '@angular/core'; +import {merge, Subscription} from 'rxjs'; import { _animationsDisabled, _StructuralStylesLoader, @@ -29,13 +31,11 @@ import { RippleRenderer, RippleTarget, } from '../core'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; -import {Subscription, merge} from 'rxjs'; import { + MatListItemAvatar, + MatListItemIcon, MatListItemLine, MatListItemTitle, - MatListItemIcon, - MatListItemAvatar, } from './list-item-sections'; import {MAT_LIST_CONFIG} from './tokens'; @@ -44,7 +44,7 @@ import {MAT_LIST_CONFIG} from './tokens'; '[attr.aria-disabled]': 'disabled', }, }) -/** @docs-private */ +/** @nodoc */ export abstract class MatListBase { _isNonInteractive: boolean = true; @@ -81,7 +81,7 @@ export abstract class MatListBase { '[attr.disabled]': '(_isButtonElement && disabled) || null', }, }) -/** @docs-private */ +/** @nodoc */ export abstract class MatListItemBase implements AfterViewInit, OnDestroy, RippleTarget { _elementRef = inject>(ElementRef); protected _ngZone = inject(NgZone); @@ -164,13 +164,13 @@ export abstract class MatListItemBase implements AfterViewInit, OnDestroy, Rippl /** * Implemented as part of `RippleTarget`. - * @docs-private + * @nodoc */ rippleConfig: RippleConfig & RippleGlobalOptions; /** * Implemented as part of `RippleTarget`. - * @docs-private + * @nodoc */ get rippleDisabled(): boolean { return this.disableRipple || !!this.rippleConfig.disabled; diff --git a/src/material/list/list-item-sections.ts b/src/material/list/list-item-sections.ts index c2e77af868bb..5615827739aa 100644 --- a/src/material/list/list-item-sections.ts +++ b/src/material/list/list-item-sections.ts @@ -56,7 +56,7 @@ export class MatListItemLine { export class MatListItemMeta {} /** - * @docs-private + * @nodoc * * MDC uses the very intuitively named classes `.mdc-list-item__start` and `.mat-list-item__end` to * position content such as icons or checkboxes/radios that comes either before or after the text diff --git a/src/material/list/list-option-types.ts b/src/material/list/list-option-types.ts index 238f3f6dac9f..1083a4360f01 100644 --- a/src/material/list/list-option-types.ts +++ b/src/material/list/list-option-types.ts @@ -17,7 +17,7 @@ export type MatListOptionTogglePosition = 'before' | 'after'; /** * Interface describing a list option. This is used to avoid circular * dependencies between the list-option and the styler directives. - * @docs-private + * @nodoc */ export interface ListOption { _getTogglePosition(): MatListOptionTogglePosition; @@ -27,6 +27,6 @@ export interface ListOption { * Injection token that can be used to reference instances of an `ListOption`. It serves * as alternative token to an actual implementation which could result in undesired * retention of the class or circular references breaking runtime execution. - * @docs-private + * @nodoc */ export const LIST_OPTION = new InjectionToken('ListOption'); diff --git a/src/material/list/list-option.ts b/src/material/list/list-option.ts index 420ae7677d4e..9c8ac9c50511 100644 --- a/src/material/list/list-option.ts +++ b/src/material/list/list-option.ts @@ -8,6 +8,8 @@ import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; +import {CdkObserveContent} from '@angular/cdk/observers'; +import {NgTemplateOutlet} from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -27,22 +29,20 @@ import { } from '@angular/core'; import {ThemePalette} from '../core'; import {MatListBase, MatListItemBase} from './list-base'; -import {LIST_OPTION, ListOption, MatListOptionTogglePosition} from './list-option-types'; import {MatListItemLine, MatListItemTitle} from './list-item-sections'; -import {NgTemplateOutlet} from '@angular/common'; -import {CdkObserveContent} from '@angular/cdk/observers'; +import {LIST_OPTION, ListOption, MatListOptionTogglePosition} from './list-option-types'; /** * Injection token that can be used to reference instances of an `SelectionList`. It serves * as alternative token to an actual implementation which would result in circular references. - * @docs-private + * @nodoc */ export const SELECTION_LIST = new InjectionToken('SelectionList'); /** * Interface describing the containing list of a list option. This is used to avoid * circular dependencies between the list-option and the selection list. - * @docs-private + * @nodoc */ export interface SelectionList extends MatListBase { multiple: boolean; @@ -110,7 +110,7 @@ export class MatListOption extends MatListItemBase implements ListOption, OnInit /** * Emits when the selected state of the option has changed. * Use to facilitate two-data binding to the `selected` property. - * @docs-private + * @nodoc */ @Output() readonly selectedChange: EventEmitter = new EventEmitter(); diff --git a/src/material/list/subheader.ts b/src/material/list/subheader.ts index fc0b21dd2682..fd071b58f076 100644 --- a/src/material/list/subheader.ts +++ b/src/material/list/subheader.ts @@ -10,7 +10,7 @@ import {Directive} from '@angular/core'; /** * Directive whose purpose is to add the mat- CSS styling to this selector. - * @docs-private + * @nodoc */ @Directive({ selector: '[mat-subheader], [matSubheader]', diff --git a/src/material/list/testing/list-harness-base.ts b/src/material/list/testing/list-harness-base.ts index 7166168d331c..a34b3c423d89 100644 --- a/src/material/list/testing/list-harness-base.ts +++ b/src/material/list/testing/list-harness-base.ts @@ -30,7 +30,7 @@ export interface ListSection { * @template T A constructor type for a list item harness type used by this list harness. * @template C The list item harness type that `T` constructs. * @template F The filter type used filter list item harness of type `C`. - * @docs-private + * @nodoc */ export abstract class MatListHarnessBase< T extends ComponentHarnessConstructor & {with: (options?: F) => HarnessPredicate}, diff --git a/src/material/list/testing/list-item-harness-base.ts b/src/material/list/testing/list-item-harness-base.ts index e964b997824e..a5c697624fef 100644 --- a/src/material/list/testing/list-item-harness-base.ts +++ b/src/material/list/testing/list-item-harness-base.ts @@ -80,7 +80,7 @@ export enum MatListItemType { /** * Shared behavior among the harnesses for the various `MatListItem` flavors. - * @docs-private + * @nodoc */ export abstract class MatListItemHarnessBase extends ContentContainerComponentHarness { private _lines = this.locatorForAll('.mat-mdc-list-item-line'); diff --git a/src/material/menu/menu-animations.ts b/src/material/menu/menu-animations.ts index 29dc0ad5364d..09501d70f29b 100644 --- a/src/material/menu/menu-animations.ts +++ b/src/material/menu/menu-animations.ts @@ -10,7 +10,7 @@ * Animations used by the mat-menu component. * Animation duration and timing values are based on: * https://material.io/guidelines/components/menus.html#menus-usage - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -122,13 +122,13 @@ export const matMenuAnimations: { /** * @deprecated * @breaking-change 8.0.0 - * @docs-private + * @nodoc */ export const fadeInItems = matMenuAnimations.fadeInItems; /** * @deprecated * @breaking-change 8.0.0 - * @docs-private + * @nodoc */ export const transformMenu = matMenuAnimations.transformMenu; diff --git a/src/material/menu/menu-content.ts b/src/material/menu/menu-content.ts index ef6a3e3683a6..e7774c9536f1 100644 --- a/src/material/menu/menu-content.ts +++ b/src/material/menu/menu-content.ts @@ -11,6 +11,7 @@ import {DomPortalOutlet, TemplatePortal} from '@angular/cdk/portal'; import { ApplicationRef, ChangeDetectorRef, + DOCUMENT, Directive, InjectionToken, Injector, @@ -18,7 +19,6 @@ import { TemplateRef, ViewContainerRef, inject, - DOCUMENT, } from '@angular/core'; import {Subject} from 'rxjs'; @@ -54,7 +54,7 @@ export class MatMenuContent implements OnDestroy { /** * Attaches the content with a particular context. - * @docs-private + * @nodoc */ attach(context: any = {}) { if (!this._portal) { @@ -90,7 +90,7 @@ export class MatMenuContent implements OnDestroy { /** * Detaches the content. - * @docs-private + * @nodoc */ detach() { if (this._portal?.isAttached) { diff --git a/src/material/menu/menu-errors.ts b/src/material/menu/menu-errors.ts index 6511748851fc..f25ad6eefa18 100644 --- a/src/material/menu/menu-errors.ts +++ b/src/material/menu/menu-errors.ts @@ -9,7 +9,7 @@ /** * Throws an exception for the case when menu's x-position value isn't valid. * In other words, it doesn't match 'before' or 'after'. - * @docs-private + * @nodoc */ export function throwMatMenuInvalidPositionX() { throw Error(`xPosition value must be either 'before' or after'. @@ -19,7 +19,7 @@ export function throwMatMenuInvalidPositionX() { /** * Throws an exception for the case when menu's y-position value isn't valid. * In other words, it doesn't match 'above' or 'below'. - * @docs-private + * @nodoc */ export function throwMatMenuInvalidPositionY() { throw Error(`yPosition value must be either 'above' or below'. @@ -29,7 +29,7 @@ export function throwMatMenuInvalidPositionY() { /** * Throws an exception for the case when a menu is assigned * to a trigger that is placed inside the same menu. - * @docs-private + * @nodoc */ export function throwMatMenuRecursiveError() { throw Error( diff --git a/src/material/menu/menu-panel.ts b/src/material/menu/menu-panel.ts index b6814cbc2828..e992a534a1ec 100644 --- a/src/material/menu/menu-panel.ts +++ b/src/material/menu/menu-panel.ts @@ -6,21 +6,21 @@ * found in the LICENSE file at https://angular.dev/license */ -import {EventEmitter, TemplateRef, InjectionToken} from '@angular/core'; -import {MenuPositionX, MenuPositionY} from './menu-positions'; -import {Direction} from '@angular/cdk/bidi'; import {FocusOrigin} from '@angular/cdk/a11y'; +import {Direction} from '@angular/cdk/bidi'; +import {EventEmitter, InjectionToken, TemplateRef} from '@angular/core'; import {MatMenuContent} from './menu-content'; +import {MenuPositionX, MenuPositionY} from './menu-positions'; /** * Injection token used to provide the parent menu to menu-specific components. - * @docs-private + * @nodoc */ export const MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL'); /** * Interface for a custom menu panel that can be used with `matMenuTriggerFor`. - * @docs-private + * @nodoc */ export interface MatMenuPanel { xPosition: MenuPositionX; diff --git a/src/material/menu/menu-trigger.ts b/src/material/menu/menu-trigger.ts index 753ec907c611..7842b5c49e1d 100644 --- a/src/material/menu/menu-trigger.ts +++ b/src/material/menu/menu-trigger.ts @@ -44,12 +44,12 @@ import { } from '@angular/core'; import {merge, Observable, of as observableOf, Subscription} from 'rxjs'; import {filter, take, takeUntil} from 'rxjs/operators'; +import {_animationsDisabled} from '../core'; import {MatMenu, MenuCloseReason} from './menu'; import {throwMatMenuRecursiveError} from './menu-errors'; import {MatMenuItem} from './menu-item'; import {MAT_MENU_PANEL, MatMenuPanel} from './menu-panel'; import {MenuPositionX, MenuPositionY} from './menu-positions'; -import {_animationsDisabled} from '../core'; /** Injection token that determines the scroll handling while the menu is open. */ export const MAT_MENU_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>( @@ -64,7 +64,7 @@ export const MAT_MENU_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy> ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -74,7 +74,7 @@ export function MAT_MENU_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () => Scrol } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/menu/menu.ts b/src/material/menu/menu.ts index cffc817720fc..b5cc66333434 100644 --- a/src/material/menu/menu.ts +++ b/src/material/menu/menu.ts @@ -6,48 +6,48 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator, FocusKeyManager, FocusOrigin} from '@angular/cdk/a11y'; +import {Direction} from '@angular/cdk/bidi'; +import { + DOWN_ARROW, + ESCAPE, + hasModifierKey, + LEFT_ARROW, + RIGHT_ARROW, + UP_ARROW, +} from '@angular/cdk/keycodes'; import { AfterContentInit, + afterNextRender, + AfterRenderRef, + booleanAttribute, ChangeDetectionStrategy, + ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, + inject, InjectionToken, + Injector, Input, OnDestroy, + OnInit, Output, - TemplateRef, QueryList, + TemplateRef, ViewChild, ViewEncapsulation, - OnInit, - ChangeDetectorRef, - booleanAttribute, - afterNextRender, - AfterRenderRef, - inject, - Injector, } from '@angular/core'; -import {_IdGenerator, FocusKeyManager, FocusOrigin} from '@angular/cdk/a11y'; -import {Direction} from '@angular/cdk/bidi'; -import { - ESCAPE, - LEFT_ARROW, - RIGHT_ARROW, - DOWN_ARROW, - UP_ARROW, - hasModifierKey, -} from '@angular/cdk/keycodes'; import {merge, Observable, Subject} from 'rxjs'; import {startWith, switchMap} from 'rxjs/operators'; +import {_animationsDisabled} from '../core'; +import {MAT_MENU_CONTENT, MatMenuContent} from './menu-content'; +import {throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY} from './menu-errors'; import {MatMenuItem} from './menu-item'; -import {MatMenuPanel, MAT_MENU_PANEL} from './menu-panel'; +import {MAT_MENU_PANEL, MatMenuPanel} from './menu-panel'; import {MenuPositionX, MenuPositionY} from './menu-positions'; -import {throwMatMenuInvalidPositionX, throwMatMenuInvalidPositionY} from './menu-errors'; -import {MatMenuContent, MAT_MENU_CONTENT} from './menu-content'; -import {_animationsDisabled} from '../core'; /** Reason why the menu was closed. */ export type MenuCloseReason = void | 'click' | 'keydown' | 'tab'; @@ -83,7 +83,7 @@ export const MAT_MENU_DEFAULT_OPTIONS = new InjectionToken, OnI this.setPositionClasses(); } - /** @docs-private */ + /** @nodoc */ @ViewChild(TemplateRef) templateRef: TemplateRef; /** @@ -211,7 +211,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnI /** * Menu content that will be rendered lazily. - * @docs-private + * @nodoc */ @ContentChild(MAT_MENU_CONTENT) lazyContent: MatMenuContent; @@ -353,7 +353,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnI /* * Registers a menu item with the menu. - * @docs-private + * @nodoc * @deprecated No longer being used. To be removed. * @breaking-change 9.0.0 */ @@ -361,7 +361,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnI /** * Removes an item from the menu. - * @docs-private + * @nodoc * @deprecated No longer being used. To be removed. * @breaking-change 9.0.0 */ @@ -446,7 +446,7 @@ export class MatMenu implements AfterContentInit, MatMenuPanel, OnI * consumers to add specific styling based on the position. * @param posX Position of the menu along the x axis. * @param posY Position of the menu along the y axis. - * @docs-private + * @nodoc */ setPositionClasses(posX: MenuPositionX = this.xPosition, posY: MenuPositionY = this.yPosition) { this._classList = { diff --git a/src/material/paginator/paginator-intl.ts b/src/material/paginator/paginator-intl.ts index 94a187c59554..b84b20b0b7a3 100644 --- a/src/material/paginator/paginator-intl.ts +++ b/src/material/paginator/paginator-intl.ts @@ -59,7 +59,7 @@ export class MatPaginatorIntl { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -68,7 +68,7 @@ export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/progress-bar/progress-bar.ts b/src/material/progress-bar/progress-bar.ts index 5c94e128205c..9fe46e0bda56 100644 --- a/src/material/progress-bar/progress-bar.ts +++ b/src/material/progress-bar/progress-bar.ts @@ -7,22 +7,22 @@ */ import { + AfterViewInit, ChangeDetectionStrategy, + ChangeDetectorRef, Component, - ViewEncapsulation, + DOCUMENT, ElementRef, - NgZone, - Input, - Output, EventEmitter, - AfterViewInit, - OnDestroy, - ChangeDetectorRef, - InjectionToken, inject, + InjectionToken, + Input, + NgZone, numberAttribute, + OnDestroy, + Output, Renderer2, - DOCUMENT, + ViewEncapsulation, } from '@angular/core'; import {_animationsDisabled, ThemePalette} from '../core'; @@ -55,7 +55,7 @@ export const MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken( 'mat-progress-bar-location', @@ -64,14 +64,14 @@ export const MAT_PROGRESS_BAR_LOCATION = new InjectionToken string; } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/progress-spinner/progress-spinner.ts b/src/material/progress-spinner/progress-spinner.ts index d24223ead811..12aded06ce00 100644 --- a/src/material/progress-spinner/progress-spinner.ts +++ b/src/material/progress-spinner/progress-spinner.ts @@ -6,19 +6,19 @@ * found in the LICENSE file at https://angular.dev/license */ +import {NgTemplateOutlet} from '@angular/common'; import { ChangeDetectionStrategy, Component, ElementRef, + inject, InjectionToken, Input, + numberAttribute, ViewChild, ViewEncapsulation, - numberAttribute, - inject, } from '@angular/core'; import {_animationsDisabled, ThemePalette} from '../core'; -import {NgTemplateOutlet} from '@angular/common'; /** Possible mode for a progress spinner. */ export type ProgressSpinnerMode = 'determinate' | 'indeterminate'; @@ -52,7 +52,7 @@ export const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS = }); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/radio/radio.ts b/src/material/radio/radio.ts index 61e2df4c60fb..015869423538 100644 --- a/src/material/radio/radio.ts +++ b/src/material/radio/radio.ts @@ -6,8 +6,9 @@ * found in the LICENSE file at https://angular.dev/license */ -import {_IdGenerator, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; +import {FocusMonitor, FocusOrigin, _IdGenerator} from '@angular/cdk/a11y'; import {UniqueSelectionDispatcher} from '@angular/cdk/collections'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterContentInit, AfterViewInit, @@ -19,6 +20,7 @@ import { DoCheck, ElementRef, EventEmitter, + HostAttributeToken, InjectionToken, Injector, Input, @@ -27,6 +29,7 @@ import { OnInit, Output, QueryList, + Renderer2, ViewChild, ViewEncapsulation, afterNextRender, @@ -34,10 +37,9 @@ import { forwardRef, inject, numberAttribute, - HostAttributeToken, - Renderer2, } from '@angular/core'; import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms'; +import {Subscription} from 'rxjs'; import { MatRipple, ThemePalette, @@ -45,8 +47,6 @@ import { _StructuralStylesLoader, _animationsDisabled, } from '../core'; -import {Subscription} from 'rxjs'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; /** Change event object emitted by radio button and radio group. */ export class MatRadioChange { @@ -61,7 +61,7 @@ export class MatRadioChange { /** * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This * allows it to support [(ngModel)] and ngControl. - * @docs-private + * @nodoc */ export const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -99,7 +99,7 @@ export const MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken any = () => {}; diff --git a/src/material/select/select-animations.ts b/src/material/select/select-animations.ts index a6ceb0a8c225..29deaee9811f 100644 --- a/src/material/select/select-animations.ts +++ b/src/material/select/select-animations.ts @@ -11,7 +11,7 @@ * const containing the metadata for one animation. * * The values below match the implementation of the AngularJS Material mat-select animation. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/select/select-errors.ts b/src/material/select/select-errors.ts index d60346afacd6..baac2b1fe88c 100644 --- a/src/material/select/select-errors.ts +++ b/src/material/select/select-errors.ts @@ -12,7 +12,7 @@ /** * Returns an exception to be thrown when attempting to change a select's `multiple` option * after initialization. - * @docs-private + * @nodoc */ export function getMatSelectDynamicMultipleError(): Error { return Error('Cannot change `multiple` mode of select after initialization.'); @@ -22,7 +22,7 @@ export function getMatSelectDynamicMultipleError(): Error { * Returns an exception to be thrown when attempting to assign a non-array value to a select * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for * resetting the value. - * @docs-private + * @nodoc */ export function getMatSelectNonArrayValueError(): Error { return Error('Value must be an array in multiple-selection mode.'); diff --git a/src/material/select/select.ts b/src/material/select/select.ts index 4179e0d22544..e701821c9f8e 100644 --- a/src/material/select/select.ts +++ b/src/material/select/select.ts @@ -34,6 +34,7 @@ import { ScrollStrategy, } from '@angular/cdk/overlay'; import {ViewportRuler} from '@angular/cdk/scrolling'; +import {NgClass} from '@angular/common'; import { AfterContentInit, booleanAttribute, @@ -46,8 +47,10 @@ import { DoCheck, ElementRef, EventEmitter, + HostAttributeToken, inject, InjectionToken, + Injector, Input, numberAttribute, OnChanges, @@ -55,12 +58,10 @@ import { OnInit, Output, QueryList, + Renderer2, SimpleChanges, ViewChild, ViewEncapsulation, - HostAttributeToken, - Renderer2, - Injector, } from '@angular/core'; import { AbstractControl, @@ -70,6 +71,8 @@ import { NgForm, Validators, } from '@angular/forms'; +import {defer, merge, Observable, Subject} from 'rxjs'; +import {filter, map, startWith, switchMap, take, takeUntil} from 'rxjs/operators'; import { _animationsDisabled, _countGroupLabelsBeforeOption, @@ -83,14 +86,11 @@ import { MatOptionSelectionChange, } from '../core'; import {MAT_FORM_FIELD, MatFormField, MatFormFieldControl} from '../form-field'; -import {defer, merge, Observable, Subject} from 'rxjs'; -import {filter, map, startWith, switchMap, take, takeUntil} from 'rxjs/operators'; import { getMatSelectDynamicMultipleError, getMatSelectNonArrayValueError, getMatSelectNonFunctionValueError, } from './select-errors'; -import {NgClass} from '@angular/common'; /** Injection token that determines the scroll handling while a select is open. */ export const MAT_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>( @@ -105,7 +105,7 @@ export const MAT_SELECT_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrateg ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -147,7 +147,7 @@ export interface MatSelectConfig { export const MAT_SELECT_CONFIG = new InjectionToken('MAT_SELECT_CONFIG'); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -344,19 +344,19 @@ export class MatSelect /** * Emits whenever the component state changes and should cause the parent * form-field to update. Implemented as part of `MatFormFieldControl`. - * @docs-private + * @nodoc */ readonly stateChanges = new Subject(); /** * Disable the automatic labeling to avoid issues like #27241. - * @docs-private + * @nodoc */ readonly disableAutomaticLabeling = true; /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ @Input('aria-describedby') userAriaDescribedBy: string; @@ -605,7 +605,7 @@ export class MatSelect /** * Event that emits whenever the raw value of the select changes. This is here primarily * to facilitate the two-way binding for the `value` input. - * @docs-private + * @nodoc */ @Output() readonly valueChange: EventEmitter = new EventEmitter(); @@ -1462,7 +1462,7 @@ export class MatSelect /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get describedByIds(): string[] { const element = this._elementRef.nativeElement; @@ -1473,7 +1473,7 @@ export class MatSelect /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ setDescribedByIds(ids: string[]) { if (ids.length) { @@ -1485,7 +1485,7 @@ export class MatSelect /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ onContainerClick() { this.focus(); @@ -1494,7 +1494,7 @@ export class MatSelect /** * Implemented as part of MatFormFieldControl. - * @docs-private + * @nodoc */ get shouldLabelFloat(): boolean { // Since the panel doesn't overlap the trigger, we diff --git a/src/material/sidenav/drawer-animations.ts b/src/material/sidenav/drawer-animations.ts index 0d63a3a28001..bb9f9c83e48b 100644 --- a/src/material/sidenav/drawer-animations.ts +++ b/src/material/sidenav/drawer-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by the Material drawers. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/sidenav/drawer.ts b/src/material/sidenav/drawer.ts index 784d26902af6..8534c76dfeb6 100644 --- a/src/material/sidenav/drawer.ts +++ b/src/material/sidenav/drawer.ts @@ -28,6 +28,7 @@ import { ContentChild, ContentChildren, DoCheck, + DOCUMENT, ElementRef, EventEmitter, inject, @@ -41,7 +42,6 @@ import { Renderer2, ViewChild, ViewEncapsulation, - DOCUMENT, } from '@angular/core'; import {fromEvent, merge, Observable, Subject} from 'rxjs'; import {debounceTime, filter, map, mapTo, startWith, take, takeUntil} from 'rxjs/operators'; @@ -49,7 +49,7 @@ import {_animationsDisabled} from '../core'; /** * Throws an exception when two MatDrawer are matching the same position. - * @docs-private + * @nodoc */ export function throwMatDuplicatedDrawerError(position: string) { throw Error(`A drawer was already declared for 'position="${position}"'`); @@ -75,12 +75,12 @@ export const MAT_DRAWER_DEFAULT_AUTOSIZE = new InjectionToken( /** * Used to provide a drawer container to a drawer while avoiding circular references. - * @docs-private + * @nodoc */ export const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER'); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/sidenav/testing/drawer-harness.ts b/src/material/sidenav/testing/drawer-harness.ts index 151535da44eb..c28cba3e4629 100644 --- a/src/material/sidenav/testing/drawer-harness.ts +++ b/src/material/sidenav/testing/drawer-harness.ts @@ -11,7 +11,7 @@ import {DrawerHarnessFilters} from './drawer-harness-filters'; /** * Base class for the drawer harness functionality. - * @docs-private + * @nodoc */ export class MatDrawerHarnessBase extends ContentContainerComponentHarness { /** Whether the drawer is open. */ diff --git a/src/material/slider/slider-input.ts b/src/material/slider/slider-input.ts index 5631c1992a99..7e98672e4cee 100644 --- a/src/material/slider/slider-input.ts +++ b/src/material/slider/slider-input.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Platform} from '@angular/cdk/platform'; import { booleanAttribute, ChangeDetectorRef, @@ -25,20 +26,19 @@ import { import {ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR} from '@angular/forms'; import {Subject} from 'rxjs'; import { - _MatThumb, - MatSliderDragEvent, _MatSlider, _MatSliderRangeThumb, _MatSliderThumb, + _MatThumb, + MAT_SLIDER, MAT_SLIDER_RANGE_THUMB, MAT_SLIDER_THUMB, - MAT_SLIDER, + MatSliderDragEvent, } from './slider-interface'; -import {Platform} from '@angular/cdk/platform'; /** * Provider that allows the slider thumb to register as a ControlValueAccessor. - * @docs-private + * @nodoc */ export const MAT_SLIDER_THUMB_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -48,7 +48,7 @@ export const MAT_SLIDER_THUMB_VALUE_ACCESSOR: any = { /** * Provider that allows the range slider thumb to register as a ControlValueAccessor. - * @docs-private + * @nodoc */ export const MAT_SLIDER_RANGE_THUMB_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -136,7 +136,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * The current translateX in px of the slider visual thumb. - * @docs-private + * @nodoc */ get translateX(): number { if (this._slider.min >= this._slider.max) { @@ -155,11 +155,11 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * Indicates whether this thumb is the start or end thumb. - * @docs-private + * @nodoc */ thumbPosition: _MatThumb = _MatThumb.END; - /** @docs-private */ + /** @nodoc */ get min(): number { return numberAttribute(this._hostElement.min, 0); } @@ -168,7 +168,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA this._cdr.detectChanges(); } - /** @docs-private */ + /** @nodoc */ get max(): number { return numberAttribute(this._hostElement.max, 0); } @@ -185,7 +185,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA this._cdr.detectChanges(); } - /** @docs-private */ + /** @nodoc */ get disabled(): boolean { return booleanAttribute(this._hostElement.disabled); } @@ -206,7 +206,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA return (this.value - this._slider.min) / (this._slider.max - this._slider.min); } - /** @docs-private */ + /** @nodoc */ get fillPercentage(): number { if (!this._slider._cachedWidth) { return this._slider._isRtl ? 1 : 0; @@ -303,7 +303,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA this.dragEnd.complete(); } - /** @docs-private */ + /** @nodoc */ initProps(): void { this._updateWidthInactive(); @@ -319,7 +319,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA this._initValue(); } - /** @docs-private */ + /** @nodoc */ initUI(): void { this._updateThumbUIByValue(); } @@ -559,7 +559,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * Sets the input's value. * @param value The new value of the input - * @docs-private + * @nodoc */ writeValue(value: any): void { if (this._isControlInitialized || value !== null) { @@ -570,7 +570,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * Registers a callback to be invoked when the input's value changes from user input. * @param fn The callback to register - * @docs-private + * @nodoc */ registerOnChange(fn: any): void { this._onChangeFn = fn; @@ -580,7 +580,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * Registers a callback to be invoked when the input is blurred by the user. * @param fn The callback to register - * @docs-private + * @nodoc */ registerOnTouched(fn: any): void { this._onTouchedFn = fn; @@ -589,7 +589,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA /** * Sets the disabled state of the slider. * @param isDisabled The new disabled state - * @docs-private + * @nodoc */ setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; @@ -615,7 +615,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRangeThumb { override readonly _cdr = inject(ChangeDetectorRef); - /** @docs-private */ + /** @nodoc */ getSibling(): _MatSliderRangeThumb | undefined { if (!this._sibling) { this._sibling = this._slider._getInput(this._isEndThumb ? _MatThumb.START : _MatThumb.END) as @@ -628,7 +628,7 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan /** * Returns the minimum translateX position allowed for this slider input's visual thumb. - * @docs-private + * @nodoc */ getMinPos(): number { const sibling = this.getSibling(); @@ -640,7 +640,7 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan /** * Returns the maximum translateX position allowed for this slider input's visual thumb. - * @docs-private + * @nodoc */ getMaxPos(): number { const sibling = this.getSibling(); @@ -813,7 +813,7 @@ export class MatSliderRangeThumb extends MatSliderThumb implements _MatSliderRan /** * Sets the input's value. * @param value The new value of the input - * @docs-private + * @nodoc */ override writeValue(value: any): void { if (this._isControlInitialized || value !== null) { diff --git a/src/material/slider/slider-interface.ts b/src/material/slider/slider-interface.ts index b18da3f8fbb6..087fc666655f 100644 --- a/src/material/slider/slider-interface.ts +++ b/src/material/slider/slider-interface.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {InjectionToken, ChangeDetectorRef, WritableSignal} from '@angular/core'; +import {ChangeDetectorRef, InjectionToken, WritableSignal} from '@angular/core'; import {MatRipple, RippleGlobalOptions} from '../core'; /** @@ -28,28 +28,28 @@ export enum _MatTickMark { * Injection token that can be used for a `MatSlider` to provide itself as a * parent to the `MatSliderThumb` and `MatSliderRangeThumb`. * Used primarily to avoid circular imports. - * @docs-private + * @nodoc */ export const MAT_SLIDER = new InjectionToken<{}>('_MatSlider'); /** * Injection token that can be used to query for a `MatSliderThumb`. * Used primarily to avoid circular imports. - * @docs-private + * @nodoc */ export const MAT_SLIDER_THUMB = new InjectionToken<{}>('_MatSliderThumb'); /** * Injection token that can be used to query for a `MatSliderRangeThumb`. * Used primarily to avoid circular imports. - * @docs-private + * @nodoc */ export const MAT_SLIDER_RANGE_THUMB = new InjectionToken<{}>('_MatSliderRangeThumb'); /** * Injection token that can be used to query for a `MatSliderVisualThumb`. * Used primarily to avoid circular imports. - * @docs-private + * @nodoc */ export const MAT_SLIDER_VISUAL_THUMB = new InjectionToken<{}>('_MatSliderVisualThumb'); diff --git a/src/material/slider/slider-thumb.ts b/src/material/slider/slider-thumb.ts index 13f8ac1375fd..748feac30461 100644 --- a/src/material/slider/slider-thumb.ts +++ b/src/material/slider/slider-thumb.ts @@ -6,37 +6,37 @@ * found in the LICENSE file at https://angular.dev/license */ +import {Platform} from '@angular/cdk/platform'; import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, + inject, Input, NgZone, OnDestroy, Renderer2, ViewChild, ViewEncapsulation, - inject, } from '@angular/core'; import {MatRipple, RippleAnimationConfig, RippleRef, RippleState} from '../core'; import { - _MatThumb, _MatSlider, _MatSliderThumb, _MatSliderVisualThumb, + _MatThumb, MAT_SLIDER, MAT_SLIDER_VISUAL_THUMB, } from './slider-interface'; -import {Platform} from '@angular/cdk/platform'; /** * The visual slider thumb. * * Handles the slider thumb ripple states (hover, focus, and active), * and displaying the value tooltip on discrete sliders. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-slider-visual-thumb', diff --git a/src/material/slider/slider.ts b/src/material/slider/slider.ts index 823870215ca1..32d3b1c217a9 100644 --- a/src/material/slider/slider.ts +++ b/src/material/slider/slider.ts @@ -8,6 +8,7 @@ import {Directionality} from '@angular/cdk/bidi'; import {Platform} from '@angular/cdk/platform'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterViewInit, booleanAttribute, @@ -27,6 +28,7 @@ import { ViewChildren, ViewEncapsulation, } from '@angular/core'; +import {Subscription} from 'rxjs'; import { _animationsDisabled, _StructuralStylesLoader, @@ -34,21 +36,19 @@ import { RippleGlobalOptions, ThemePalette, } from '../core'; -import {Subscription} from 'rxjs'; import { - _MatThumb, - _MatTickMark, _MatSlider, _MatSliderRangeThumb, _MatSliderThumb, _MatSliderVisualThumb, + _MatThumb, + _MatTickMark, + MAT_SLIDER, MAT_SLIDER_RANGE_THUMB, MAT_SLIDER_THUMB, - MAT_SLIDER, MAT_SLIDER_VISUAL_THUMB, } from './slider-interface'; import {MatSliderVisualThumb} from './slider-thumb'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; // TODO(wagnermaciel): maybe handle the following edge case: // 1. start dragging discrete slider @@ -376,10 +376,10 @@ export class MatSlider implements AfterViewInit, OnDestroy, _MatSlider { // The value indicator tooltip text for the visual slider thumb(s). - /** @docs-private */ + /** @nodoc */ protected startValueIndicatorText: string = ''; - /** @docs-private */ + /** @nodoc */ protected endValueIndicatorText: string = ''; // Used to control the translateX of the visual slider thumb(s). diff --git a/src/material/snack-bar/snack-bar-animations.ts b/src/material/snack-bar/snack-bar-animations.ts index 027c430ba4d1..c8e924df9903 100644 --- a/src/material/snack-bar/snack-bar-animations.ts +++ b/src/material/snack-bar/snack-bar-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by the Material snack bar. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/snack-bar/snack-bar-container.ts b/src/material/snack-bar/snack-bar-container.ts index 5aa873d9ab83..606da9a14786 100644 --- a/src/material/snack-bar/snack-bar-container.ts +++ b/src/material/snack-bar/snack-bar-container.ts @@ -22,6 +22,7 @@ import { ChangeDetectorRef, Component, ComponentRef, + DOCUMENT, ElementRef, EmbeddedViewRef, inject, @@ -30,7 +31,6 @@ import { OnDestroy, ViewChild, ViewEncapsulation, - DOCUMENT, } from '@angular/core'; import {Observable, of, Subject} from 'rxjs'; import {_animationsDisabled} from '../core'; @@ -41,7 +41,7 @@ const EXIT_ANIMATION = '_mat-snack-bar-exit'; /** * Internal component that wraps user-provided snack bar content. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-snack-bar-container', diff --git a/src/material/snack-bar/snack-bar-ref.ts b/src/material/snack-bar/snack-bar-ref.ts index b5eaad9ab629..427413f4061c 100644 --- a/src/material/snack-bar/snack-bar-ref.ts +++ b/src/material/snack-bar/snack-bar-ref.ts @@ -28,7 +28,7 @@ export class MatSnackBarRef { /** * The instance of the component making up the content of the snack bar. - * @docs-private + * @nodoc */ containerInstance: MatSnackBarContainer; diff --git a/src/material/snack-bar/snack-bar.ts b/src/material/snack-bar/snack-bar.ts index 0b42da9d7a09..627352452b7f 100644 --- a/src/material/snack-bar/snack-bar.ts +++ b/src/material/snack-bar/snack-bar.ts @@ -15,26 +15,26 @@ import { OverlayConfig, OverlayRef, } from '@angular/cdk/overlay'; +import {ComponentPortal, TemplatePortal} from '@angular/cdk/portal'; import { ComponentRef, EmbeddedViewRef, + inject, Injectable, InjectionToken, Injector, OnDestroy, TemplateRef, - inject, } from '@angular/core'; +import {takeUntil} from 'rxjs/operators'; +import {_animationsDisabled} from '../core'; import {SimpleSnackBar, TextOnlySnackBar} from './simple-snack-bar'; -import {MatSnackBarContainer} from './snack-bar-container'; import {MAT_SNACK_BAR_DATA, MatSnackBarConfig} from './snack-bar-config'; +import {MatSnackBarContainer} from './snack-bar-container'; import {MatSnackBarRef} from './snack-bar-ref'; -import {ComponentPortal, TemplatePortal} from '@angular/cdk/portal'; -import {takeUntil} from 'rxjs/operators'; -import {_animationsDisabled} from '../core'; /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/sort/sort-animations.ts b/src/material/sort/sort-animations.ts index 1b77507f65f2..a25d3fde7b95 100644 --- a/src/material/sort/sort-animations.ts +++ b/src/material/sort/sort-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by MatSort. - * @docs-private + * @nodoc * @deprecated No longer being used, to be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/sort/sort-errors.ts b/src/material/sort/sort-errors.ts index 80ffc0b8379b..a34ca2b97337 100644 --- a/src/material/sort/sort-errors.ts +++ b/src/material/sort/sort-errors.ts @@ -6,22 +6,22 @@ * found in the LICENSE file at https://angular.dev/license */ -/** @docs-private */ +/** @nodoc */ export function getSortDuplicateSortableIdError(id: string): Error { return Error(`Cannot have two MatSortables with the same id (${id}).`); } -/** @docs-private */ +/** @nodoc */ export function getSortHeaderNotContainedWithinSortError(): Error { return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`); } -/** @docs-private */ +/** @nodoc */ export function getSortHeaderMissingIdError(): Error { return Error(`MatSortHeader must be provided with a unique id.`); } -/** @docs-private */ +/** @nodoc */ export function getSortInvalidDirectionError(direction: string): Error { return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`); } diff --git a/src/material/sort/sort-header-intl.ts b/src/material/sort/sort-header-intl.ts index a8b666831890..75fd3b321825 100644 --- a/src/material/sort/sort-header-intl.ts +++ b/src/material/sort/sort-header-intl.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Injectable, SkipSelf, Optional} from '@angular/core'; +import {Injectable, Optional, SkipSelf} from '@angular/core'; import {Subject} from 'rxjs'; /** @@ -23,7 +23,7 @@ export class MatSortHeaderIntl { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -32,7 +32,7 @@ export function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: MatSortHeaderI } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/sort/sort-header.ts b/src/material/sort/sort-header.ts index f6b8961f245f..8a984fa4a6ce 100644 --- a/src/material/sort/sort-header.ts +++ b/src/material/sort/sort-header.ts @@ -8,21 +8,23 @@ import {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y'; import {ENTER, SPACE} from '@angular/cdk/keycodes'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterViewInit, + booleanAttribute, ChangeDetectionStrategy, + ChangeDetectorRef, Component, ElementRef, + inject, Input, OnDestroy, OnInit, - ViewEncapsulation, - booleanAttribute, - inject, signal, - ChangeDetectorRef, + ViewEncapsulation, } from '@angular/core'; import {merge, Subscription} from 'rxjs'; +import {_animationsDisabled, _StructuralStylesLoader} from '../core'; import { MAT_SORT_DEFAULT_OPTIONS, MatSort, @@ -33,8 +35,6 @@ import { import {SortDirection} from './sort-direction'; import {getSortHeaderNotContainedWithinSortError} from './sort-errors'; import {MatSortHeaderIntl} from './sort-header-intl'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; -import {_animationsDisabled, _StructuralStylesLoader} from '../core'; /** * Valid positions for the arrow to be in for its opacity and translation. If the state is a @@ -42,7 +42,7 @@ import {_animationsDisabled, _StructuralStylesLoader} from '../core'; * hint, the arrow will be in the center with a slight opacity. Active state means the arrow will * be fully opaque in the center. * - * @docs-private + * @nodoc * @deprecated No longer being used, to be removed. * @breaking-change 21.0.0 */ @@ -51,7 +51,7 @@ export type ArrowViewState = SortDirection | 'hint' | 'active'; /** * States describing the arrow's animated position (animating fromState to toState). * If the fromState is not defined, there will be no animated transition to the toState. - * @docs-private + * @nodoc * @deprecated No longer being used, to be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/stepper/stepper-animations.ts b/src/material/stepper/stepper-animations.ts index 180e517360a7..2023fc3f5baf 100644 --- a/src/material/stepper/stepper-animations.ts +++ b/src/material/stepper/stepper-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by the Material steppers. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/stepper/stepper-intl.ts b/src/material/stepper/stepper-intl.ts index 436fdeb883aa..07f86ec831a9 100644 --- a/src/material/stepper/stepper-intl.ts +++ b/src/material/stepper/stepper-intl.ts @@ -29,7 +29,7 @@ export class MatStepperIntl { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -38,7 +38,7 @@ export function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl) { } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/table/cell.ts b/src/material/table/cell.ts index 20c1130b3193..956ffd5438ec 100644 --- a/src/material/table/cell.ts +++ b/src/material/table/cell.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Directive, Input} from '@angular/core'; import { CdkCell, CdkCellDef, @@ -16,6 +15,7 @@ import { CdkHeaderCell, CdkHeaderCellDef, } from '@angular/cdk/table'; +import {Directive, Input} from '@angular/core'; /** * Cell definition for the mat-table. @@ -72,7 +72,7 @@ export class MatColumnDef extends CdkColumnDef { * Add "mat-column-" prefix in addition to "cdk-column-" prefix. * In the future, this will only add "mat-column-" and columnCssClassName * will change from type string[] to string. - * @docs-private + * @nodoc */ protected override _updateColumnCssClassName() { super._updateColumnCssClassName(); diff --git a/src/material/table/table-data-source.ts b/src/material/table/table-data-source.ts index c19e8e1e921a..2e0e95dbc58f 100644 --- a/src/material/table/table-data-source.ts +++ b/src/material/table/table-data-source.ts @@ -6,7 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import {MatPaginator, PageEvent} from '../paginator'; +import {_isNumberValue} from '@angular/cdk/coercion'; +import {DataSource} from '@angular/cdk/collections'; import { BehaviorSubject, combineLatest, @@ -16,10 +17,9 @@ import { Subject, Subscription, } from 'rxjs'; -import {DataSource} from '@angular/cdk/collections'; -import {MatSort, Sort} from '../sort'; -import {_isNumberValue} from '@angular/cdk/coercion'; import {map} from 'rxjs/operators'; +import {MatPaginator, PageEvent} from '../paginator'; +import {MatSort, Sort} from '../sort'; /** * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to @@ -364,7 +364,7 @@ export class MatTableDataSource extend /** * Used by the MatTable. Called when it connects to the data source. - * @docs-private + * @nodoc */ connect() { if (!this._renderChangesSubscription) { @@ -376,7 +376,7 @@ export class MatTableDataSource extend /** * Used by the MatTable. Called when it disconnects from the data source. - * @docs-private + * @nodoc */ disconnect() { this._renderChangesSubscription?.unsubscribe(); diff --git a/src/material/tabs/ink-bar.ts b/src/material/tabs/ink-bar.ts index cadbee81ec08..c4c745f3e2a8 100644 --- a/src/material/tabs/ink-bar.ts +++ b/src/material/tabs/ink-bar.ts @@ -20,7 +20,7 @@ import { /** * Item inside a tab header relative to which the ink bar can be aligned. - * @docs-private + * @nodoc */ export interface MatInkBarItem extends OnInit, OnDestroy { elementRef: ElementRef; @@ -37,7 +37,7 @@ const NO_TRANSITION_CLASS = 'mdc-tab-indicator--no-transition'; /** * Abstraction around the MDC tab indicator that acts as the tab header's ink bar. - * @docs-private + * @nodoc */ export class MatInkBar { /** Item to which the ink bar is aligned currently. */ @@ -191,7 +191,7 @@ export interface _MatInkBarPositioner { /** * The default positioner function for the MatInkBar. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/tabs/paginated-tab-header.ts b/src/material/tabs/paginated-tab-header.ts index 6dbde9e09556..08baa448e485 100644 --- a/src/material/tabs/paginated-tab-header.ts +++ b/src/material/tabs/paginated-tab-header.ts @@ -65,7 +65,7 @@ export type MatPaginatedTabHeaderItem = FocusableOption & {elementRef: ElementRe /** * Base class for a tab header that supported pagination. - * @docs-private + * @nodoc */ @Directive() export abstract class MatPaginatedTabHeader diff --git a/src/material/tabs/tab-body.ts b/src/material/tabs/tab-body.ts index b1efb0801da8..269762051c79 100644 --- a/src/material/tabs/tab-body.ts +++ b/src/material/tabs/tab-body.ts @@ -34,7 +34,7 @@ import {_animationsDisabled} from '../core'; /** * The portal host directive for the contents of the tab. - * @docs-private + * @nodoc */ @Directive({selector: '[matTabBodyHost]'}) export class MatTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy { @@ -106,7 +106,7 @@ export type MatTabBodyOriginState = 'left' | 'right'; /** * Wrapper for the contents of a tab. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-tab-body', diff --git a/src/material/tabs/tab-group.ts b/src/material/tabs/tab-group.ts index 8077f02e1396..7efe5e2ce277 100644 --- a/src/material/tabs/tab-group.ts +++ b/src/material/tabs/tab-group.ts @@ -6,41 +6,41 @@ * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator, CdkMonitorFocus, FocusOrigin} from '@angular/cdk/a11y'; +import {Platform} from '@angular/cdk/platform'; +import {CdkPortalOutlet} from '@angular/cdk/portal'; import { AfterContentChecked, AfterContentInit, + AfterViewInit, + booleanAttribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, + inject, Input, + NgZone, + numberAttribute, OnDestroy, Output, QueryList, ViewChild, - ViewEncapsulation, - booleanAttribute, - inject, - numberAttribute, ViewChildren, - AfterViewInit, - NgZone, + ViewEncapsulation, } from '@angular/core'; -import {MAT_TAB_GROUP, MatTab} from './tab'; -import {MatTabHeader} from './tab-header'; -import {ThemePalette, MatRipple, _animationsDisabled} from '../core'; import {merge, Subscription} from 'rxjs'; -import {MAT_TABS_CONFIG, MatTabsConfig} from './tab-config'; import {startWith} from 'rxjs/operators'; -import {_IdGenerator, CdkMonitorFocus, FocusOrigin} from '@angular/cdk/a11y'; +import {_animationsDisabled, MatRipple, ThemePalette} from '../core'; +import {MAT_TAB_GROUP, MatTab} from './tab'; import {MatTabBody} from './tab-body'; -import {CdkPortalOutlet} from '@angular/cdk/portal'; +import {MAT_TABS_CONFIG, MatTabsConfig} from './tab-config'; +import {MatTabHeader} from './tab-header'; import {MatTabLabelWrapper} from './tab-label-wrapper'; -import {Platform} from '@angular/cdk/platform'; -/** @docs-private */ +/** @nodoc */ export interface MatTabGroupBaseHeader { _alignInkBarToSelectedTab(): void; updatePagination(): void; diff --git a/src/material/tabs/tab-header.ts b/src/material/tabs/tab-header.ts index f1cdd8b8d17d..b7f991e75c90 100644 --- a/src/material/tabs/tab-header.ts +++ b/src/material/tabs/tab-header.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ +import {CdkObserveContent} from '@angular/cdk/observers'; import { AfterContentChecked, AfterContentInit, @@ -21,18 +22,17 @@ import { ViewEncapsulation, booleanAttribute, } from '@angular/core'; -import {MatTabLabelWrapper} from './tab-label-wrapper'; +import {MatRipple} from '../core'; import {MatInkBar} from './ink-bar'; import {MatPaginatedTabHeader} from './paginated-tab-header'; -import {CdkObserveContent} from '@angular/cdk/observers'; -import {MatRipple} from '../core'; +import {MatTabLabelWrapper} from './tab-label-wrapper'; /** * The header of the tab group which displays a list of all the tabs in the tab group. Includes * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the * width of the header container, then arrows will be displayed to allow the user to scroll * left and right across the header. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-tab-header', diff --git a/src/material/tabs/tab-label-wrapper.ts b/src/material/tabs/tab-label-wrapper.ts index ecc1b226d2da..b77f341ab5cb 100644 --- a/src/material/tabs/tab-label-wrapper.ts +++ b/src/material/tabs/tab-label-wrapper.ts @@ -11,7 +11,7 @@ import {InkBarItem} from './ink-bar'; /** * Used in the `mat-tab-group` view to display tab labels. - * @docs-private + * @nodoc */ @Directive({ selector: '[matTabLabelWrapper]', diff --git a/src/material/tabs/tab-label.ts b/src/material/tabs/tab-label.ts index dff42617d012..72e16959a745 100644 --- a/src/material/tabs/tab-label.ts +++ b/src/material/tabs/tab-label.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Directive, InjectionToken, inject} from '@angular/core'; import {CdkPortal} from '@angular/cdk/portal'; +import {Directive, InjectionToken, inject} from '@angular/core'; /** * Injection token that can be used to reference instances of `MatTabLabel`. It serves as @@ -18,7 +18,7 @@ export const MAT_TAB_LABEL = new InjectionToken('MatTabLabel'); /** * Used to provide a tab label to a tab without causing a circular dependency. - * @docs-private + * @nodoc */ export const MAT_TAB = new InjectionToken('MAT_TAB'); diff --git a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts index 2ce296e3a663..a24ca0e0417e 100644 --- a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts +++ b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ +import {_IdGenerator, FocusableOption, FocusMonitor} from '@angular/cdk/a11y'; +import {ENTER, SPACE} from '@angular/cdk/keycodes'; +import {CdkObserveContent} from '@angular/cdk/observers'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { AfterContentInit, AfterViewInit, @@ -14,34 +18,30 @@ import { ContentChildren, ElementRef, forwardRef, + HostAttributeToken, + inject, Input, numberAttribute, OnDestroy, QueryList, ViewChild, ViewEncapsulation, - inject, - HostAttributeToken, } from '@angular/core'; +import {BehaviorSubject, Subject} from 'rxjs'; +import {startWith, takeUntil} from 'rxjs/operators'; import { + _animationsDisabled, + _StructuralStylesLoader, MAT_RIPPLE_GLOBAL_OPTIONS, MatRipple, RippleConfig, RippleGlobalOptions, RippleTarget, ThemePalette, - _StructuralStylesLoader, - _animationsDisabled, } from '../../core'; -import {_IdGenerator, FocusableOption, FocusMonitor} from '@angular/cdk/a11y'; -import {MatInkBar, InkBarItem} from '../ink-bar'; -import {BehaviorSubject, Subject} from 'rxjs'; -import {startWith, takeUntil} from 'rxjs/operators'; -import {ENTER, SPACE} from '@angular/cdk/keycodes'; -import {MAT_TABS_CONFIG, MatTabsConfig} from '../tab-config'; +import {InkBarItem, MatInkBar} from '../ink-bar'; import {MatPaginatedTabHeader} from '../paginated-tab-header'; -import {CdkObserveContent} from '@angular/cdk/observers'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; +import {MAT_TABS_CONFIG, MatTabsConfig} from '../tab-config'; /** * Navigation component matching the styles of the tab group header. @@ -290,13 +290,13 @@ export class MatTabLink * Ripple configuration for ripples that are launched on pointer down. The ripple config * is set to the global ripple options since we don't have any configurable options for * the tab link ripples. - * @docs-private + * @nodoc */ rippleConfig: RippleConfig & RippleGlobalOptions; /** * Whether ripples are disabled on interaction. - * @docs-private + * @nodoc */ get rippleDisabled(): boolean { return ( diff --git a/src/material/tabs/tab.ts b/src/material/tabs/tab.ts index e54b106c610a..3a9de472aee1 100644 --- a/src/material/tabs/tab.ts +++ b/src/material/tabs/tab.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ +import {TemplatePortal} from '@angular/cdk/portal'; +import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import { ChangeDetectionStrategy, Component, @@ -23,16 +25,14 @@ import { booleanAttribute, inject, } from '@angular/core'; -import {MatTabContent} from './tab-content'; -import {MAT_TAB, MatTabLabel} from './tab-label'; -import {TemplatePortal} from '@angular/cdk/portal'; import {Subject} from 'rxjs'; -import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; import {_StructuralStylesLoader} from '../core'; +import {MatTabContent} from './tab-content'; +import {MAT_TAB, MatTabLabel} from './tab-label'; /** * Used to provide a tab group to a tab without causing a circular dependency. - * @docs-private + * @nodoc */ export const MAT_TAB_GROUP = new InjectionToken('MAT_TAB_GROUP'); @@ -111,7 +111,7 @@ export class MatTab implements OnInit, OnChanges, OnDestroy { /** Portal that will be the hosted content of the tab */ private _contentPortal: TemplatePortal | null = null; - /** @docs-private */ + /** @nodoc */ get content(): TemplatePortal | null { return this._contentPortal; } @@ -163,7 +163,7 @@ export class MatTab implements OnInit, OnChanges, OnDestroy { * This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. - * @docs-private + * @nodoc */ private _setTemplateLabelInput(value: MatTabLabel | undefined) { // Only update the label if the query managed to find one. This works around an issue where a diff --git a/src/material/tabs/tabs-animations.ts b/src/material/tabs/tabs-animations.ts index 874fcdabba83..0f60aa5b9f05 100644 --- a/src/material/tabs/tabs-animations.ts +++ b/src/material/tabs/tabs-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by the Material tabs. - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0. */ diff --git a/src/material/timepicker/timepicker-input.ts b/src/material/timepicker/timepicker-input.ts index 3912a236e2d8..90e88a55361c 100644 --- a/src/material/timepicker/timepicker-input.ts +++ b/src/material/timepicker/timepicker-input.ts @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.dev/license */ +import {DOWN_ARROW, ESCAPE, hasModifierKey, UP_ARROW} from '@angular/cdk/keycodes'; +import {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform'; import { booleanAttribute, computed, @@ -24,7 +26,6 @@ import { Signal, signal, } from '@angular/core'; -import {DateAdapter, MAT_DATE_FORMATS} from '../core'; import { AbstractControl, ControlValueAccessor, @@ -35,13 +36,12 @@ import { ValidatorFn, Validators, } from '@angular/forms'; +import {Subscription} from 'rxjs'; +import {DateAdapter, MAT_DATE_FORMATS} from '../core'; import {MAT_FORM_FIELD} from '../form-field'; -import {MatTimepicker} from './timepicker'; import {MAT_INPUT_VALUE_ACCESSOR} from '../input'; -import {Subscription} from 'rxjs'; -import {DOWN_ARROW, ESCAPE, hasModifierKey, UP_ARROW} from '@angular/cdk/keycodes'; +import {MatTimepicker} from './timepicker'; import {validateAdapter} from './util'; -import {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform'; /** * Input that can be used to enter time and connect to a `mat-timepicker`. @@ -147,7 +147,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Whether the input should be disabled through the template. - * @docs-private + * @nodoc */ readonly disabledInput: InputSignalWithTransform = input(false, { transform: booleanAttribute, @@ -181,7 +181,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `ControlValueAccessor`. - * @docs-private + * @nodoc */ writeValue(value: any): void { // Note that we need to deserialize here, rather than depend on the value change effect, @@ -193,7 +193,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `ControlValueAccessor`. - * @docs-private + * @nodoc */ registerOnChange(fn: (value: any) => void): void { this._onChange = fn; @@ -201,7 +201,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `ControlValueAccessor`. - * @docs-private + * @nodoc */ registerOnTouched(fn: () => void): void { this._onTouched = fn; @@ -209,7 +209,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `ControlValueAccessor`. - * @docs-private + * @nodoc */ setDisabledState(isDisabled: boolean): void { this._accessorDisabled.set(isDisabled); @@ -217,7 +217,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `Validator`. - * @docs-private + * @nodoc */ validate(control: AbstractControl): ValidationErrors | null { return this._validator(control); @@ -225,7 +225,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O /** * Implemented as a part of `Validator`. - * @docs-private + * @nodoc */ registerOnValidatorChange(fn: () => void): void { this._validatorOnChange = fn; diff --git a/src/material/toolbar/toolbar.ts b/src/material/toolbar/toolbar.ts index d0fc68fd8fac..9fcb78277078 100644 --- a/src/material/toolbar/toolbar.ts +++ b/src/material/toolbar/toolbar.ts @@ -13,13 +13,13 @@ import { ChangeDetectionStrategy, Component, ContentChildren, + DOCUMENT, Directive, ElementRef, Input, QueryList, ViewEncapsulation, inject, - DOCUMENT, } from '@angular/core'; @Directive({ @@ -92,7 +92,7 @@ export class MatToolbar implements AfterViewInit { /** * Throws an exception when attempting to combine the different toolbar row modes. - * @docs-private + * @nodoc */ export function throwToolbarMixedModesError() { throw Error( diff --git a/src/material/tooltip/tooltip-animations.ts b/src/material/tooltip/tooltip-animations.ts index 8ae83dfd4608..0067e323a72b 100644 --- a/src/material/tooltip/tooltip-animations.ts +++ b/src/material/tooltip/tooltip-animations.ts @@ -8,7 +8,7 @@ /** * Animations used by MatTooltip. - * @docs-private + * @nodoc * @deprecated No longer being used, to be removed. * @breaking-change 21.0.0 */ diff --git a/src/material/tooltip/tooltip.ts b/src/material/tooltip/tooltip.ts index 55e3e3e42272..60d2d22f85b1 100644 --- a/src/material/tooltip/tooltip.ts +++ b/src/material/tooltip/tooltip.ts @@ -5,7 +5,8 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ -import {takeUntil} from 'rxjs/operators'; +import {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y'; +import {Directionality} from '@angular/cdk/bidi'; import { BooleanInput, coerceBooleanProperty, @@ -13,29 +14,6 @@ import { NumberInput, } from '@angular/cdk/coercion'; import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - Directive, - ElementRef, - InjectionToken, - Input, - NgZone, - OnDestroy, - ViewChild, - ViewContainerRef, - ViewEncapsulation, - inject, - afterNextRender, - Injector, - DOCUMENT, -} from '@angular/core'; -import {NgClass} from '@angular/common'; -import {normalizePassiveListenerOptions, Platform} from '@angular/cdk/platform'; -import {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y'; -import {Directionality} from '@angular/cdk/bidi'; import { ConnectedPosition, ConnectionPositionPair, @@ -51,8 +29,30 @@ import { ScrollStrategy, VerticalConnectionPos, } from '@angular/cdk/overlay'; +import {normalizePassiveListenerOptions, Platform} from '@angular/cdk/platform'; import {ComponentPortal} from '@angular/cdk/portal'; +import {NgClass} from '@angular/common'; +import { + afterNextRender, + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + Directive, + DOCUMENT, + ElementRef, + inject, + InjectionToken, + Injector, + Input, + NgZone, + OnDestroy, + ViewChild, + ViewContainerRef, + ViewEncapsulation, +} from '@angular/core'; import {Observable, Subject} from 'rxjs'; +import {takeUntil} from 'rxjs/operators'; import {_animationsDisabled} from '../core'; /** Possible positions for a tooltip. */ @@ -72,7 +72,7 @@ export const SCROLL_THROTTLE_MS = 20; /** * Creates an error to be thrown if the user supplied an invalid tooltip position. - * @docs-private + * @nodoc */ export function getMatTooltipInvalidPositionError(position: string) { return Error(`Tooltip position "${position}" is invalid.`); @@ -91,7 +91,7 @@ export const MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrate ); /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -101,7 +101,7 @@ export function MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(_overlay: unknown): () => Sc } /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -112,7 +112,7 @@ export const MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = { }; /** - * @docs-private + * @nodoc * @deprecated No longer used, will be removed. * @breaking-change 21.0.0 */ @@ -966,7 +966,7 @@ export class MatTooltip implements OnDestroy, AfterViewInit { /** * Internal component that wraps the tooltip's content. - * @docs-private + * @nodoc */ @Component({ selector: 'mat-tooltip-component', diff --git a/tools/dgeni/common/private-docs.ts b/tools/dgeni/common/private-docs.ts index 76ecdb4d7cde..5c207c586e57 100644 --- a/tools/dgeni/common/private-docs.ts +++ b/tools/dgeni/common/private-docs.ts @@ -58,9 +58,9 @@ function _isInternalMember(memberDoc: MemberDoc): boolean { return INTERNAL_METHODS.includes(memberDoc.name); } -/** Whether the given doc has a @docs-private tag set. */ +/** Whether the given doc has a @nodoc tag set. */ function _hasDocsPrivateTag(doc: ApiDoc): boolean { - return hasJsDocTag(doc, 'docs-private'); + return hasJsDocTag(doc, 'nodoc'); } /** diff --git a/tools/dgeni/docs-package.ts b/tools/dgeni/docs-package.ts index c006065849b2..61dfaec5ccb8 100644 --- a/tools/dgeni/docs-package.ts +++ b/tools/dgeni/docs-package.ts @@ -95,7 +95,7 @@ apiDocsPackage.config(function (computePathsProcessor: any) { // Configure custom JsDoc tags. apiDocsPackage.config(function (parseTagsProcessor: any) { parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions.concat([ - {name: 'docs-private'}, + {name: 'nodoc'}, {name: 'docs-public'}, {name: 'docs-primary-export'}, {name: 'breaking-change'}, @@ -112,7 +112,6 @@ apiDocsPackage.config(function (parseTagsProcessor: any) { {name: 'usageNotes'}, {name: 'publicApi'}, {name: 'ngModule', multi: true}, - {name: 'nodoc'}, ]); }); diff --git a/tools/dgeni/processors/docs-private-filter.ts b/tools/dgeni/processors/docs-private-filter.ts index b45296b8287a..42ca8f9e9fc5 100644 --- a/tools/dgeni/processors/docs-private-filter.ts +++ b/tools/dgeni/processors/docs-private-filter.ts @@ -30,7 +30,7 @@ export class DocsPrivateFilter implements Processor { } // Filter out private class members which could be annotated - // with the "@docs-private" tag. + // with the "@nodoc" tag. if (doc instanceof ClassExportDoc) { doc.members = doc.members.filter(isPublicDoc); doc.statics = doc.statics.filter(isPublicDoc); diff --git a/tools/dgeni/processors/resolve-inherited-docs.ts b/tools/dgeni/processors/resolve-inherited-docs.ts index 9ee96c2268a2..b3f2521be225 100644 --- a/tools/dgeni/processors/resolve-inherited-docs.ts +++ b/tools/dgeni/processors/resolve-inherited-docs.ts @@ -1,9 +1,9 @@ import {DocCollection, Document, Processor} from 'dgeni'; +import {ApiDoc} from 'dgeni-packages/typescript/api-doc-types/ApiDoc'; +import {ClassExportDoc} from 'dgeni-packages/typescript/api-doc-types/ClassExportDoc'; import {ClassLikeExportDoc} from 'dgeni-packages/typescript/api-doc-types/ClassLikeExportDoc'; import ts from 'typescript'; import {getInheritedDocsOfClass, isInheritanceCreatedDoc} from '../common/class-inheritance'; -import {ClassExportDoc} from 'dgeni-packages/typescript/api-doc-types/ClassExportDoc'; -import {ApiDoc} from 'dgeni-packages/typescript/api-doc-types/ApiDoc'; /** * Factory function for the "ResolvedInheritedDocs" processor. Dgeni does not support