@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
138 lines (137 loc) • 5.02 kB
TypeScript
import { EventEmitter, Injector, NgZone, OnInit } from '@angular/core';
import { CoreBaseComponent } from '../common/base.component';
import { Layout } from '../common/layout';
import * as i0 from "@angular/core";
export interface LintSettings {
disableAccessibility: boolean;
disableStyle: boolean;
disableRecursiveCheck: boolean;
}
/**
* Defines the settings of a deprecated object
*/
export interface DeprecationSettings {
/**
* An additional message to include in the warning to users about the deprecation
*/
message?: string;
/**
* The alternative to suggest using instead
*/
alternateSignature?: string;
/**
* Date that this was deprecated in the mm/dd/yy format.
*/
deprecatedSince: string;
/**
* Date that this was obsolete in the mm/dd/yy format. (required if 'obsolete' is true)
*/
obsoleteSince?: string;
/**
* Indicates that this is obsolete
*/
obsolete?: boolean;
}
/**
* This is the root component for every angular sme application.
* It provides common styles, layout, and logic needed to make SME controls behave correctly.
*/
export declare class SmeUxComponent extends CoreBaseComponent implements Layout, OnInit {
private ngZone;
/**
* The source name to use for logging
*/
protected get logSourceName(): string;
private static elementsAlreadyChecked;
private static classesAlreadyChecked;
private static smeLintDisable;
private static smeLintDisableSelf;
private static deprecatedClasses;
/**
* It implements the ILayout interface. It's triggered when the layout is changed.
* It's used to tell the child components to coordinate with the layout change.
*/
layoutChanged: EventEmitter<void>;
/**
* Implementation of the Layout interface. It's only triggered when the window breakpoint defined has been changed.
* This special breakpoint change event will be fired for control's special layout change.
*/
windowBreakpointChanged: EventEmitter<void>;
constructor(injector: Injector, ngZone: NgZone);
ngOnInit(): void;
/**
* Starts listening to DOM mutations and reporting them to handlers
*/
private startDOMListener;
/**
* Occurs when there are DOM mutations to examine
* @param mutations the DOM mutations
*/
private onProductionMutation;
/**
* Occurs when there are DOM mutations to examine in debug mode only
* @param mutations the DOM mutations
*/
private onDebugMutation;
/**
* Checks a NodeList for lint issues recursively
*/
private checkNodes;
/**
* Checks to see if an element is using deprecated styles or structure.
* @param element the element to check
*/
private checkForDeprecation;
/**
* Check accessibility rules for the given element
* @param element the element
*/
checkForAccessibility(element: HTMLElement): void;
/**
* Checks that the given element and its children are not mixed use zones
* A mixed use zone has a child that is a zone and a child that is a non-zone focusable element at the same level
* @param element the element
*/
private checkNoMixedUseZones;
/**
* Checks any anchor tags on the element or it's children either have an href or a role and tabindex
* @param element the element
*/
private checkAnchorTagRequirements;
/**
* Checks that the element or it's children are not forms outside of dialogs
* @param element the element
*/
private checkNoDialogsInForms;
/**
* Checks that the element and its children are not inputs without form wrappers
* @param element the element
*/
private checkNoInputsOutsideForms;
/**
* determines if accessibility error logging is enabled for the given element
* @param element the element
*/
private shouldShowAccessibilityLog;
/**
* determines if style warning logging is enabled for the given element
* @param element the element
*/
private shouldShowStyleLog;
/**
* Gets lint settings for the given element
* @param element the element
* @param lintAttribute the lint attribute to check 'sme-lint-disable' or 'sme-lint-disable-self'
*/
private getLintDisableSettings;
/**
* Gets the initial host classes to be applied to this element
*/
protected getInitialHostClasses(): string[];
/**
* Listen to window resizes and emit a debounced layout changed.
*/
onWindowResized(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SmeUxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SmeUxComponent, "sme-ux", never, {}, { "layoutChanged": "layoutChanged"; "windowBreakpointChanged": "windowBreakpointChanged"; }, never, ["*"], false, never>;
}