@angular/material
Version:
Angular Material
59 lines (58 loc) • 2.34 kB
TypeScript
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { HighContrastModeDetector } from '@angular/cdk/a11y';
import { InjectionToken } from '@angular/core';
/** @docs-private */
export declare function MATERIAL_SANITY_CHECKS_FACTORY(): SanityChecks;
/** Injection token that configures whether the Material sanity checks are enabled. */
export declare const MATERIAL_SANITY_CHECKS: InjectionToken<SanityChecks>;
/**
* Possible sanity checks that can be enabled. If set to
* true/false, all checks will be enabled/disabled.
*/
export declare type SanityChecks = boolean | GranularSanityChecks;
/** Object that can be used to configure the sanity checks granularly. */
export interface GranularSanityChecks {
doctype: boolean;
theme: boolean;
version: boolean;
/**
* @deprecated No longer being used.
* @breaking-change 10.0.0
*/
hammer: boolean;
}
/**
* Module that captures anything that should be loaded and/or run for *all* Angular Material
* components. This includes Bidi, etc.
*
* This module should be imported to each top-level component module (e.g., MatTabsModule).
*/
export declare class MatCommonModule {
/** Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype). */
private _hasDoneGlobalChecks;
/** Configured sanity checks. */
private _sanityChecks;
/** Used to reference correct document/window */
protected _document?: Document;
constructor(highContrastModeDetector: HighContrastModeDetector, sanityChecks: any,
/** @breaking-change 11.0.0 make document required */
document?: any);
/** Access injected document if available or fallback to global document reference */
private _getDocument;
/** Use defaultView of injected document if available or fallback to global window reference */
private _getWindow;
/** Whether any sanity checks are enabled. */
private _checksAreEnabled;
/** Whether the code is running in tests. */
private _isTestEnv;
private _checkDoctypeIsDefined;
private _checkThemeIsPresent;
/** Checks whether the material version matches the cdk version */
private _checkCdkVersionMatch;
}