import * as i0 from '@angular/core'; import { OnChanges, AfterContentInit, OnDestroy, QueryList, SimpleChanges, TemplateRef, EventEmitter, AfterContentChecked, ElementRef, OnInit, AfterViewInit, DoCheck, PipeTransform } from '@angular/core'; import * as i2 from '@angular/common'; import { ComponentHarness, BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing'; import { FocusOrigin, FocusableOption, FocusMonitor, FocusKeyManager } from '@angular/cdk/a11y'; import { Direction } from '@angular/cdk/bidi'; import { AnimationEvent, AnimationTriggerMetadata } from '@angular/animations'; import { Subject, BehaviorSubject, Observable, Subscription } from 'rxjs'; import { ClientInputInterface, ClientOutputInterface } from '@ifsworld/granite-components/core'; export * from '@ifsworld/granite-components/core'; import * as i10 from '@angular/cdk/overlay'; import { ConnectedPosition, PositionStrategy, RepositionScrollStrategy, BlockScrollStrategy, CloseScrollStrategy } from '@angular/cdk/overlay'; import * as i11 from '@angular/cdk/portal'; import { SelectionModel } from '@angular/cdk/collections'; import * as i5 from '@angular/forms'; import { NgForm, FormGroupDirective, NgControl, ControlValueAccessor } from '@angular/forms'; import * as i6 from '@ifsworld/granite-components/tooltip'; import * as i12 from '@angular/cdk/scrolling'; declare class GraniteArrangeGridItemComponent { /** * Column span to render. * For use in template only. Do not use outside of this component. * @ignore */ _columnSpan: number | null; private element; /** * Number of cells the item would span. Used by arrange grid in column * orientation to fill any unused space caused by wrapped items. */ set columnSpan(value: number | null); /** * Update element styles */ updateStyles(): void; /** * Set CSS variable value or remove it if a null value is given. * Would of course rather have used property binding but that is not * supported until (perhaps) Angular 9. * See: https://github.com/angular/angular/issues/9343 */ protected setCssProperty(variable: string, value: string | null): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare enum GraniteArrangeGridOrientation { columns = "columns", rows = "rows" } declare class GraniteArrangeGridComponent implements OnChanges, AfterContentInit, OnDestroy { orientation: GraniteArrangeGridOrientation; /** Default number of columns to use in column orientation */ /** Exposes column orientation to template */ classColumnOrientation: boolean; /** Exposes row orientation to template */ classRowOrientation: boolean; arrangeGridItemComponents: QueryList; static readonly defaultCols: number; /** How to present grid items; `columns` (default) or `rows` */ /** * Number of grid columns to use when orientation is set to `column`. The * default is two columns. */ set cols(value: number); get cols(): number; /** Number of columns to render */ protected _cols: number; /** * Number of rows to render. Will be set internally taking column count, * the number of items and any cell wrapping into consideration. */ protected _rows: number; set rows(value: number); get rows(): number; private element; /** Nexted on component destruction to complete other observables. */ private destroy$; ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; /** * Update grid row template style. * * Use content height of all but last row and let the last grow * to take up any remaining space. */ updateStyles(): void; /** * Set CSS variable value or remove it if a null value is given. * Would of course rather have used property binding but that is not * supported until (perhaps) Angular 9. * See: https://github.com/angular/angular/issues/9343 * * TODO: Replace with property binding with Angular 9 upgrade */ protected setCssProperty(variable: string, value: string | null): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteArrangeGridModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Grid item component * * Merely a wrapper for CSS Grid items, accepting item style as input parameters. */ declare class GraniteGridItemComponent implements OnChanges { columnStart: number; columnEnd: number; rowStart: number; rowEnd: number; private element; private renderer; ngOnChanges(): void; /** * Update element styles */ updateStyles(): void; /** * Sets the element style. Needs to be set manually to avoid "Changed after * checked" errors that would occur with HostBinding. */ private setStyle; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Grid * * A wrapper around a native CSS Grid. Anything can be used for grid items, but * `GridItemComponent` is recommended for common cases. */ declare class GraniteGridComponent implements AfterContentInit, OnChanges { /** * Number of grid columns, unless set via styling (grid-template-columns) * * Setting this value will produce equally sized columns */ set cols(value: number); get cols(): number; /** Number of columns to render */ protected _cols: number; /** * Number of grid rows, unless set via styling (grid-template-rows) * * Setting this value will produce equally sized rows */ set rows(value: number); get rows(): number; /** Number of rows to render */ protected _rows: number; private element; ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; /** Update element styles */ updateStyles(): void; /** * Set CSS variable value or remove it if a null value is given. * Would of course rather have used property binding but that is not * supported until (perhaps) Angular 9. * See: https://github.com/angular/angular/issues/9343 * * TODO: Replace with property binding with Angular 9 upgrade */ protected setCssProperty(variable: string, value: string | null): void; /** Update grid column template style */ protected updateColumnStyles(): void; /** Update grid row template style */ protected updateRowStyles(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteGridModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteBadgeComponent implements OnChanges { /** * Design token name to get the value for the Background color */ backgroundColor: string; /** * Design token name to get the value for the Font color */ color: string; /** Pill style badge */ pill: boolean; private elementRef; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteBadgeModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteBadgeHarness extends ComponentHarness { static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a `GraniteBadgeHarness` that meets * certain criteria. * @param options Options for filtering which badge instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: GraniteBadgeHarnessFilters): HarnessPredicate; /** Gets the Badge text. */ getText(): Promise; /** Whether it's a Pill type badge. */ isPill(): Promise; } /** A set of criteria that can be used to filter a list of `GraniteBadgeHarness` instances. */ interface GraniteBadgeHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; pill?: boolean; } /** * @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 */ type MenuPositionX = 'before' | 'after' | 'center'; type MenuPositionY = 'above' | 'below' | 'center'; type ClosedEventType = void | 'click' | 'keydown' | 'tab'; type OpenedEventType = void | 'click' | 'keydown'; interface GraniteMenuPanelInterface { xPosition: MenuPositionX; yPosition: MenuPositionY; templateRef: TemplateRef; parentMenu?: GraniteMenuPanelInterface | undefined; direction?: Direction; focusFirstItem: (origin?: FocusOrigin) => void; closed: EventEmitter; opened: EventEmitter; readonly panelId?: string; showBackButton: boolean; } declare class GraniteMenuItemComponent implements OnDestroy, FocusableOption { /** ARIA role for the menu item. */ role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox'; _parentMenu?: GraniteMenuPanelInterface; /** Stream that emits when the menu item is hovered. */ readonly _hovered: Subject; /** Stream that emits when the menu item is focused. */ readonly _focused: Subject; /** Whether the menu item acts as a trigger for a sub-menu (used for styling) */ _triggersSubmenu: boolean; /** * Whether the menu item is highlighted, e.g. in the "breadcrumb" parent chain * of sub menu trigger items */ _highlighted: boolean; /** Client input device information */ _clientInput: ClientInputInterface; /** Client output device information */ _clientOutput: ClientOutputInterface; private _elementRef; private _focusMonitor; constructor(); ngOnDestroy(): void; /** Focuses the menu item. */ focus(origin?: FocusOrigin, options?: FocusOptions): void; /** Returns the host DOM element. */ _getHostElement(): HTMLElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Directive to mark an element as a custom template area within a menu. * This allows inserting custom content (dropdowns, inputs, etc.) anywhere * within the menu, maintaining the natural DOM order. */ declare class GraniteMenuCustomTemplateDirective { private _elementRef; _handleEvent(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** Menu panel animation states */ type TransformMenuStates = 'void' | 'enter' | 'enter-from-below' | 'below-with-delay' | 'below' | 'pan' | 'hide' | 'pan-hidden'; /** * Menu panel animation transform/state object. Has to be an object as we supply * the `xOffset` parameter and not just the state name. */ type TransformMenu = { /** Current animation state name */ value: TransformMenuStates; params: { /** How far the menu has been panned/swiped by the user */ xOffset: number; }; }; /** Base class with all of the menu functionality. */ declare class _MenuBaseComponent implements AfterContentInit, OnDestroy, AfterContentChecked, GraniteMenuPanelInterface { /** Position of the menu in the X axis. */ get xPosition(): MenuPositionX; set xPosition(value: MenuPositionX); /** Position of the menu in the Y axis. */ get yPosition(): MenuPositionY; set yPosition(value: MenuPositionY); /** * Custom position configuration for the overlay. * When provided, this overrides the default positioning logic based on * xPosition and yPosition. Uses Angular CDK ConnectedPosition format. * If empty or not provided, falls back to default positioning behavior. */ cdkConnectedOverlayPosition: ConnectedPosition[]; /** Optional touch menu panel title */ title: string; /** * Touch menu close button label. If not set, any label set by parent will * be used. */ closeLabel: string; openOnHover: boolean; scrollStrategy: 'reposition' | 'close'; /** * Styles to be applied to the menu. * Added as there is no way to apply styles to the menu from the outside. */ styles: { [key: string]: string; }; touchStyles: { [key: string]: string; }; templateRef: TemplateRef; /** All items inside the menu. Includes items nested inside another menu. */ _allItems: QueryList; /** * Event emitted when the menu is closed */ readonly closed: EventEmitter; /** * Event emitted when the menu is opened */ readonly opened: EventEmitter; /** * Reference to the custom template directive if present */ customTemplate: GraniteMenuCustomTemplateDirective; preventParentClose: boolean; /** * Used for locating the panel in tests and setting the aria-control attribute * for the menu trigger. */ readonly panelId: string; /** Parent menu of the current menu panel. */ parentMenu: GraniteMenuPanelInterface | undefined; /** Layout direction of the menu. */ direction: Direction; /** Whether to show back button in touch menu title bar */ showBackButton: boolean; /** Whether to show touch menu title bar */ showTitle: boolean; /** Whether to add a close button below the menu */ showCloseButton: boolean; /** Observable current state of the panel animation. */ _transformMenu: BehaviorSubject; /** Emits whenever an animation on the menu completes. */ _animationDone: Subject; /** Whether the menu is animating. */ _isAnimating: boolean; /** Whether the menu is about to be destroyed. */ _isClosing: boolean; /** Whether this menu participates in the menu stack. */ _usesMenuStack: boolean; /** Client input device information */ _clientInput: ClientInputInterface; /** Client output device information */ _clientOutput: ClientOutputInterface; private _changeDetectorRef; private _menuStack; private _menuEmpty$; _isMenuEmpty$: Observable; /** Only the direct descendant menu items. */ private _directDescendantItems; private _keyManager; /** Subscription to tab events on the menu panel */ private _tabSubscription; private _xPosition; private _yPosition; /** Current state of the panel animation. */ set _panelAnimationState(state: TransformMenuStates); /** * Current horizontal offset. Used with `pan` and `pan-hidden` * animation states. */ private xOffset; ngAfterContentChecked(): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** * Stream that combines the `_hovered` observables of all the menu's items * into a single observable. Emits whenever the hovered menu item changes. */ _hovered(): Observable; /** Handle a keyboard event from the menu, delegating to the appropriate action. */ _handleKeydown(event: KeyboardEvent): void; /** * Focus the first item in the menu. * @param origin Action from which the focus originated. Used to set the correct styling. */ focusFirstItem(origin?: FocusOrigin): void; /** Updates the `showTitle` property for touch device UI */ _updateShowTitle(): void; /** Starts the enter animation */ _startAnimation(): void; /** Resets the panel animation to its initial state. */ _resetAnimation(): void; /** * Starts the 'below' animation, moving a menu down, out of view below the * viewport. Used to close the whole menu, for example when clicking * the backdrop. */ _startTouchCloseDownAnimation(): void; /** * Starts the 'below-with-delay' animation, moving a menu down, out of view below the * viewport. Used to close the whole menu as a response to the user tapping * a menu item. There is a short delay before the animation starts, to that * the user gets a visual feedback on what item was selected. */ _startTouchCloseDownAnimationWithDelay(): void; /** * Starts the 'void' animation, moving a (sub) menu out of view to the side * of the viewport. Used when going "back" from a sub menu. */ _startTouchCloseSideAnimation(): void; /** * Starts the enter-from-below animation, moving a (root) menu into view, * Animates upwards from a starting position below the viewport. */ _startTouchRootEnterAnimation(): void; /** Starts the enter animation, moving a (sub) menu into view. */ _startTouchSubmenuEnterAnimation(): void; /** * Starts the pan animation, to position a submenu in a response * to user dragging sideways (panning). */ _startTouchPanAnimation(xOffset: number): void; /** * Starts the pan-hidden animation, to position a parent menu next to an * active submenu that the user is dragging sideways (panning). */ _startTouchHidePanAnimation(xOffset: number): void; /** * Starts the hide animation, to make a parent menu slide out to leave * space for a submenu. */ _startTouchHideAnimation(): void; /** Callback that is invoked when the panel animation completes. */ _onAnimationDone(event: AnimationEvent): void; _onAnimationStart(event: AnimationEvent): void; /** * Handle click on the menu by emitting on the `closed` emitter * with a `click` reason */ _handleClick(event?: Event): void; /** * Handle click on the close button by emitting on the `closed` emitter * without any particular reason. * For touch devices, only closes if this is the topmost menu in the stack. */ _handleCloseClick(event?: MouseEvent): void; /** * Handle click on the back icon by emitting on the `clicked` emitter */ _handleBackClick(e: MouseEvent): void; /** * Update client device information for the menu and its menu items. */ _setDevice(clientInput: ClientInputInterface, clientOutput: ClientOutputInterface): void; /** * Resets the active item in the menu. This is used when the menu is opened, allowing * the user to start from the first option when pressing the down arrow. */ resetActiveItem(): void; /** * Sets up a stream that will keep track of any newly-added menu items and will update the list * of direct descendants. We collect the descendants this way, because `_allItems` can include * items that are part of child menus, and using a custom way of registering items is unreliable * when it comes to maintaining the item order. */ private _updateDirectDescendants; static ɵfac: i0.ɵɵFactoryDeclaration<_MenuBaseComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<_MenuBaseComponent, never, never, { "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "cdkConnectedOverlayPosition": { "alias": "cdkConnectedOverlayPosition"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "openOnHover": { "alias": "openOnHover"; "required": false; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "touchStyles": { "alias": "touchStyles"; "required": false; }; "preventParentClose": { "alias": "preventParentClose"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; }, ["customTemplate", "_allItems"], never, true, never>; } declare class GraniteMenuComponent extends _MenuBaseComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Directive used to turn a button element into a (popup) menu trigger * * Stripped-down version of Angular Material's menu trigger directive (.../menu/menu-trigger.ts) */ declare class GraniteMenuTriggerForDirective implements AfterContentInit, OnDestroy, OnChanges { /** References the menu instance that the trigger is associated with. */ menu: _MenuBaseComponent; openOnClick?: boolean; /** Whether the associated menu is open */ isMenuOpened: boolean; private openedBy; private _isInCustomTemplate; private _hoverSubscription; private _menuCloseSubscription; private _closingActionsSubscription; private _portal; private _overlayRef; private _document?; private _overlay; private _element; private _viewContainerRef; private _changeDetectionRef; private _parentMenu; private _clientInput; private _clientOutput; private _menuItemInstance; private _dir; private _focusMonitor; private _menuStack; private _touchStartTime; private _touchTimeTaken; private _touchStartX; private _touchStartY; private _touchCurrentX; private _touchCurrentY; private _touchTranslateX; private _touchLockedX; private _touchMaxX; private _touchTouchingElement; constructor(); ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** Handles change of associated menu */ _handleMenuChange(): void; isOpen(): boolean; /** Open the associated menu */ openMenu(): void; /** Emits an eventtype when the menu is opened */ openedEvent(): void; /** Whether the menu triggers a sub-menu or a top-level one. */ triggersSubmenu(): boolean; /** Toggles the menu between the open and closed states. */ toggleMenu(): void; /** Close the associated menu */ closeMenu(): void; /** * Focuses the menu trigger. * @param origin Source of the menu trigger's focus. */ focus(origin?: FocusOrigin, options?: FocusOptions): void; /** Detach menu portal from overlay and update open state */ _destroyMenu(): void; /** Handles mouse presses on the trigger. */ _handleMousedown(event: MouseEvent): void; /** Handles key presses on the trigger. */ _handleKeydown(event: KeyboardEvent): void; /** Handles click events on the trigger. */ _handleClick(event: MouseEvent): void; /** * Handles touch start events on the trigger. * Needs to be an arrow function so we can easily use addEventListener and removeEventListener. */ private _handleTouchStart; /** Handles the cases where the user hovers over the trigger. */ private _handleHover; /** * Restores focus to the element that was focused before the menu was open. * Could be the root trigger button or a submenu trigger item */ private _restoreFocus; private _setIsMenuOpen; /** * This method checks that a valid instance of MenuComponent has been passed into * graniteMenuTriggerFor. If not, an exception is thrown. */ private _checkMenu; /** * Returns strategy for positioning the overlay for desktop devices: * Place adjacent to the trigger button (preferably immediately below) * in order to show as much of the menu as possible. */ private _desktopPositionStrategy; /** * Sets the appropriate positions on a position strategy * so the overlay connects with the trigger correctly. * @param positionStrategy Strategy whose position to update. */ private _setPosition; /** Returns a stream that emits whenever an action that should close the menu occurs. */ private _menuClosingActions; /** * Whether to automatically open submenus on hover. This is true when showing * desktop menus and having mouse support. */ private _openOnHover; /** * Whether to toggle submenus on click. This is true when showing desktop menus * without mouse support. Which, by the way, is not a great idea to begin with. */ private _toggleOnSubmenuClick; /** Set animation state to bring a newly opened menu into view */ private animateOpenMenu; private animateTouchOpenMenu; /** Set animation state to close the active menu */ private animateCloseMenu; private _animateTouchCloseMenu; /** * Set animation state to place the menu and any parent at the given * horizontal position, i.e. following touch pan movement. * * @param xOffset Horizontal offset */ private animateSetMenuPosition; /** * Returns strategy for positioning the overlay depending on what type of * device the menu is being shown on */ private _positionStrategy; /** * Returns strategy for positioning the overlay for touch devices: * Place centered at the bottom of the screen. */ private _touchPositionStrategy; /** * Handles touch start events on the overlay host element (wrapper). * Needs to be an arrow function so we can easily use addEventListener and removeEventListener. */ private _handleOverlayTouchStart; private _handleOverlayTouchMove; private _handleOverlayTouchEnd; /** * Remove touch device pan/swipe listeners from overlay host element */ private addOverlayListeners; /** * Remove touch device pan/swipe listeners from overlay host element */ private removeOverlayListeners; /** * Standard exponential ease out function * * @param current Current value * @param offset Offset value, to which calculated value will be added * @param target The target value * @param end Value to which current value is compared */ private easeOutExpo; /** * Sets the scroll strategy for the overlay based on the client output device and menu scroll strategy input. * * @param {OutputDeviceTypes} clientOutputDevice - The type of client output device (e.g., 'touch'). * @param {'reposition' | 'close'} menuScrollStrategyInput - The scroll strategy input for the menu. * @returns {ScrollStrategy} The appropriate scroll strategy for the overlay. */ private setScrollStrategyToOverylay; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteMenuTouchCloseComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteMenuTouchTitleItemComponent { /** * Whether the menu item acts as a trigger to return to a parent menu * (used for styling) */ _triggersBack: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteDividerDirective { dividerDirection: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteTitleDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteIconComponent implements OnChanges { fontIcon: string; _elementRef: ElementRef; private renderer; private _previousFontIconClass; constructor(); ngOnChanges(changes: SimpleChanges): void; private _updateFontIcon; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteIconModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Animations used by the `granite-menu` component, showing the desktop interface. * @docs-private */ declare const graniteMenuDesktopAnimations: { /** * This animation trigger controls the menu panel's entry and exit from the * stage on desktop output devices. */ readonly transformMenuDesktop: AnimationTriggerMetadata; }; /** * Animations used by the `granite-menu` component, showing the touch interface. * @docs-private */ declare const graniteMenuTouchAnimations: { /** * This animation trigger controls the menu panel's entry and exit from the * stage on touch output devices. */ readonly transformMenuTouch: AnimationTriggerMetadata; /** * This animation trigger controls the close button's entry and exit from the * stage on touch output devices, using the same states as the menu panel. */ readonly transformCloseButton: AnimationTriggerMetadata; }; /** * Test harness for menu component * * Stripped-down version of the Angular Material menu test harness (.../menu/menu-harness.ts) * just to get things going. */ declare class GraniteMenuHarness extends ComponentHarness { /** * The selector for the host element of a `MenuComponent` instance, * i.e. the button element used to open the menu. */ static hostSelector: string; private _documentRootLocator; /** * Gets a `HarnessPredicate` that can be used to search for a `MenuHarness` that meets * certain criteria. * @param options Options for filtering which menu item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: GraniteMenuHarnessFilters): HarnessPredicate; /** Gets the text of the menu trigger */ getText(): Promise; /** Opens the menu, unless already open */ open(): Promise; /** Closes the menu, unless already closed */ close(): Promise; /** Whether the menu is open */ isOpen(): Promise; /** * Gets a list of `GraniteMenuItemHarness` representing the items in the menu. * @param filters Optionally filters which menu items are included. */ getItems(filters?: Omit): Promise; /** Gets the menu panel (popup) associated with the menu */ private _getMenuPanel; /** Gets the id of the menu panel (popup) associated with this menu */ private _getPanelId; } declare class GraniteMenuItemHarness extends ComponentHarness { /** The selector for the host element of a `MenuItemComponent` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a `GraniteMenuItemHarness` that meets * certain criteria. * @param options Options for filtering which menu item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: GraniteMenuItemHarnessFilters): HarnessPredicate; /** Gets the text of the menu item. */ getText(): Promise; /** Whether this item has a submenu. */ hasSubmenu(): Promise; /** Gets the submenu associated with this menu item, or null if none. */ getSubmenu(): Promise; /** Clicks the menu item. */ click(): Promise; } /** A set of criteria that can be used to filter a list of `MenuHarness` instances. */ interface GraniteMenuHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; } /** A set of criteria that can be used to filter a list of `GraniteMenuItemHarness` instances. */ interface GraniteMenuItemHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; } type Position = 'before' | 'after'; type Layout = 'horizontal' | 'vertical'; declare class GraniteToggleSwitchComponent implements OnChanges { id: string | null; checked: boolean; disabled: boolean; readonly: boolean; labelPosition: Position; ariaLabel: string | null; ariaLabelledby: string | null; readonly valueChange: EventEmitter; readonly toggleChange: EventEmitter; readonly toggleBlur: EventEmitter; private _inputElement; _positionBefore: boolean; _toggleSwitchDisabled: boolean; private _focusMonitor; ngOnChanges(changes: SimpleChanges): void; focus(origin?: FocusOrigin, options?: FocusOptions): void; _onBlur(): void; _toggleSwitchChange(): void; _toggleSwitchClick(): void; private _getInputElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteToggleSwitchModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteRadioButtonComponent implements OnChanges, OnDestroy { value: any; id: string | null; name: string; checked: boolean; required: boolean; disabled: boolean; readonly: boolean; labelPosition: Position; ariaLabel: string | null; ariaLabelledby: string | null; readonly radioChange: EventEmitter; readonly radioBlur: EventEmitter; private _inputElement; _positionBefore: boolean; _radioDisabled: boolean; private _removeUniqueSelectionListenerFn; private _focusMonitor; private _radioDispatcher; constructor(); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; focus(origin?: FocusOrigin, options?: FocusOptions): void; _radioChange(element: Partial): void; _onBlur(): void; private _getInputElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare abstract class GraniteRadioCheckboxBase { layout: Layout; ariaLabelledby: string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteRadioGroupComponent extends GraniteRadioCheckboxBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteRadioButtonModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteCheckboxComponent implements OnChanges { id: string | null; checked: boolean; disabled: boolean; readonly: boolean; labelPosition: Position; ariaLabel: string | null; ariaLabelledby: string | null; readonly valueChange: EventEmitter; readonly checkboxChange: EventEmitter; readonly checkboxBlur: EventEmitter; private _inputElement; _positionBefore: boolean; _checkboxDisabled: boolean; private _focusMonitor; ngOnChanges(changes: SimpleChanges): void; focus(origin?: FocusOrigin, options?: FocusOptions): void; _onBlur(): void; _checkboxChange(): void; _checkboxClick(): void; private _getInputElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCheckboxGroupComponent extends GraniteRadioCheckboxBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCheckboxModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare enum ButtonSelectors { graniteButton = "granite-button", granitePrimaryButton = "granite-primary-button", graniteFlatButton = "granite-flat-button", graniteToolbarButton = "granite-toolbar-button" } declare const ButtonComponentMixin: { new (...args: any[]): { [x: string]: unknown; disabled: boolean; ngOnChanges(changes: SimpleChanges): void; }; } & (new (...args: any[]) => Record); declare class GraniteButtonComponent extends ButtonComponentMixin implements OnChanges { toggled: boolean; _buttonToggled: boolean; protected _focusMonitor: FocusMonitor; protected _elementRef: ElementRef; constructor(); ngOnChanges(changes: SimpleChanges): void; focus(origin?: FocusOrigin, options?: FocusOptions): void; private _getHostElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteAnchorComponent extends GraniteButtonComponent implements OnChanges { _anchorClick(event: Event): void; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteButtonModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteInputFieldComponent implements OnInit, OnChanges, AfterViewInit { id: string | null; name: string | null; type: string; value: string | number; required: boolean; readonly: boolean; invalid: boolean; disabled: boolean; placeholder: string; prefixicon: string; maxlength: number; countcharacters: boolean; ariaLabel: string | null; ariaLabelledby: string | null; readonly valueChange: EventEmitter; private _inputElement; private _textareaElement; _supported: boolean; _empty: boolean; _passwordFieldIcon: string; _passwordField: boolean; _hasSuffixButton: boolean; _currentCharCount: number; private _passwordToggled; private _focusMonitor; private _cdr; private _elementRef; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; focus(origin?: FocusOrigin, options?: FocusOptions): void; _togglePassword(): void; _onInput(event: Event): void; protected _validateType(): void; private _checkForSuffixButton; private _applyCharacterCount; private _getInputElement; private _getTextareaElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteInputFieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Event fired on an individual `granite-chip` element. */ interface GraniteChipEvent { /** The chip the event was fired on. */ chip: GraniteChipComponent; } /** Event object emitted by GraniteChip when selected or deselected. */ declare class GraniteChipSelectionChangeEvent { /** Reference to the chip that emitted the event. */ source: GraniteChipComponent; /** Whether the chip that emitted the event is selected. */ selected: boolean; /** Whether the selection change was a result of a user interaction. */ isUserInput: boolean; } declare class GraniteChipComponent implements FocusableOption, OnDestroy { /** ARIA role that should be applied to the chip. */ role: string; ariaLabel: string | null; ariaLabelledby: string | null; /** Emitted when the chip is selected or deselected. */ readonly selectionChange: EventEmitter; /** Emitted when a chip is to be removed. */ readonly removed: EventEmitter; /** Emitted when the chip is destroyed. */ readonly destroyed: EventEmitter; /** Emits when the chip is focused. */ readonly chipFocus: EventEmitter; /** Emits when the chip is blurred. */ readonly chipBlur: EventEmitter; /** Whether the chip is selected. */ get selected(): boolean; set selected(value: boolean); /** The value of the chip. Defaults to the text content inside `` tags. */ get value(): any; set value(val: any); /** * Whether or not the chip is selectable. When a chip is not selectable, * changes to its selected state are always ignored. By default a chip is * selectable, and it becomes non-selectable if its parent chip list is * not selectable. */ get selectable(): boolean; set selectable(value: boolean); /** Whether the chip is disabled. Also the individual chips are disabled when chip list is disabled */ get disabled(): boolean; set disabled(value: boolean); /** * Whether the chip can be removed from the list */ get removable(): boolean; set removable(value: boolean); /** Whether the chip is in an invalid state. */ get invalid(): boolean; set invalid(value: boolean); _elementRef: ElementRef; /** Whether the chip has focus. */ _hasFocus: boolean; /** Whether the chip list is selectable */ _chipListSelectable: boolean; /** Whether the chip list is in multi-selection mode. */ _chipListMultiple: boolean; /** Whether the chip list as a whole is disabled. */ _chipListDisabled: boolean; tabIndex: number; inputChip: boolean; protected _selected: boolean; protected _selectable: boolean; protected _disabled: boolean; protected _removable: boolean; protected _invalid: boolean; private _ngZone; private _changeDetectorRef; private _value; constructor(); ngOnDestroy(): void; /** Selects the chip. */ select(isUserInput?: boolean): void; /** Deselects the chip. */ deselect(): void; /** Toggles the current selected state of this chip. */ toggleSelected(isUserInput?: boolean): boolean; /** Allows for programmatic focusing of the chip unless it's disabled. */ focus(): void; /** * Allows for programmatic removal of the chip. * Called by the GraniteChipList when the DELETE or BACKSPACE keys are pressed. * Informs any listeners of the removal request. Does not remove the chip from the DOM. */ remove(): void; /** Handles click events on the chip. */ _handleClick(event: Event): void; /** Handle custom key presses. */ _handleKeydown(event: KeyboardEvent): void; _handleRemoveClick(event: Event): void; _blur(): void; private _dispatchSelectionChange; /** The ARIA selected applied to the chip. */ get ariaSelected(): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface GraniteChipTextControl { /** Unique identifier for the text control. */ id: string; /** The text control's placeholder text. */ placeholder: string; /** Whether the text control has browser focus. */ focused: boolean; /** Whether the text control is empty. */ empty: boolean; /** Focuses the text control. */ setFocus(options?: FocusOptions): void; } /** Represents an input event on a `graniteChipInput`. */ interface GraniteChipInputEvent { /** The native `` element that the event is being fired for. */ input: HTMLInputElement; /** The value of the input. */ value: string; /** Reference to the chip input that emitted the event. */ chipInput: GraniteChipInputDirective; } declare class GraniteChipInputDirective implements GraniteChipTextControl, OnChanges, OnDestroy, AfterContentInit { /** Unique id for the input. */ id: string; /** The input's placeholder text. */ placeholder: string; /** Emitted when a chip is to be added. */ readonly graniteChipInputTokenEnd: EventEmitter; /** Register input for chip list */ set graniteChipInputFor(value: GraniteChipListComponent); /** * The list of key codes that will trigger a chipEnd event. * * Defaults to `[ENTER]`. */ graniteChipInputSeparatorKeyCodes: readonly number[] | ReadonlySet; /** * Whether or not the chipEnd event will be emitted when the input is blurred. */ get graniteChipInputAddOnBlur(): boolean; set graniteChipInputAddOnBlur(value: boolean); _addOnBlur: boolean; /** * Whether this is a required field, currently we use it only for setting aria-required. */ get required(): boolean; set required(value: boolean); /** Whether the input is disabled. */ get disabled(): boolean; set disabled(value: boolean); /** The native input element to which this directive is attached. */ readonly inputElement: HTMLInputElement; _chipList: GraniteChipListComponent; focused: boolean; protected _elementRef: ElementRef; protected _required: boolean | undefined; /** Whether the input is empty. */ get empty(): boolean; private _disabled; /** Used to prevent focus moving to chips while user is holding backspace */ private _focusLastChipOnBackspace; constructor(); ngOnChanges(): void; ngOnDestroy(): void; ngAfterContentInit(): void; /** Utility method to make host definition/tests more clear. */ _keydown(event?: KeyboardEvent): void; /** * Pass events to the keyboard manager. Available here for tests. */ _keyup(event: KeyboardEvent): void; /** Checks to see if the blur should emit the (chipEnd) event. */ _blur(): void; _focus(): void; /** Checks to see if the (chipEnd) event needs to be emitted. */ _emitChipEnd(event?: KeyboardEvent): void; _onInput(): void; /** Focuses the input (called from parent level). */ setFocus(options?: FocusOptions): void; /** Clears the input */ clear(): void; /** Checks whether a keycode is one of the configured separators. */ private _isSeparatorKey; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class GraniteChipListBase { _parentForm: NgForm; _parentFormGroup: FormGroupDirective; ngControl: NgControl; readonly stateChanges: EventEmitter; constructor(_parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl); } declare class GraniteChipListComponent extends GraniteChipListBase implements ControlValueAccessor, AfterContentInit, DoCheck, OnInit, OnDestroy { ariaLabel: string | null; ariaLabelledby: string | null; ariaOrientation: 'horizontal' | 'vertical'; /** The chips contained within this chip list. */ chips: QueryList; /** The ARIA role applied to the chip list. */ get role(): string | null; set role(role: string | null); /** Whether the user should be allowed to select multiselect chips. */ get multiselect(): boolean; set multiselect(value: boolean); /** * Whether the chip list is disabled. */ get disabled(): boolean; set disabled(value: boolean); /** * Whether or not this chip list is selectable. When a chip list is not selectable, * the selected states for all the chips inside the chip list are always ignored. */ get selectable(): boolean; set selectable(value: boolean); set tabindex(value: number); readonly controlType: string; /** Uid of the chip list */ _uid: string; /** Tab index for the chip list. */ _tabIndex: number; /** * User defined tab index. * When it is not null, use user defined tab index. Otherwise use _tabIndex */ _userTabIndex: number | null; /** The FocusKeyManager which handles focus. */ _keyManager: FocusKeyManager; _selectionModel: SelectionModel; protected _elementRef: ElementRef; /** The chip input to add more chips */ protected _chipInput: GraniteChipTextControl; protected _disabled: boolean; protected _selectable: boolean; get focused(): boolean; get empty(): boolean; get chipSelectionChanges(): Observable; get chipFocusChanges(): Observable; get chipBlurChanges(): Observable; get chipRemoveChanges(): Observable; private _changeDetectorRef; private _dir; /** * When a chip is destroyed, we store the index of the destroyed chip until the chips * query list notifies about the update. This is necessary because we cannot determine an * appropriate chip that should receive focus until the array of chips updated completely. */ private _lastDestroyedChipIndex; /** Subject that emits when the component has been destroyed. */ private readonly _destroyed; /** Subscription to focus changes in the chips. */ private _chipFocusSubscription; /** Subscription to blur changes in the chips. */ private _chipBlurSubscription; /** Subscription to selection changes in chips. */ private _chipSelectionSubscription; /** Subscription to remove changes in chips. */ private _chipRemoveSubscription; private _explicitRole?; private _multiple; constructor(); /** Function when changed */ _onChange: (value: any) => void; /** Function when changed */ _onTouched: () => void; ngAfterContentInit(): void; ngOnInit(): void; ngDoCheck(): void; ngOnDestroy(): void; /** Associates an HTML input element with this chip list. */ registerInput(inputElement: GraniteChipTextControl): void; writeValue(value: any): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; /** * Focus chip list when click on the container. */ onContainerClick(event: MouseEvent): void; /** * Focuses the first non-disabled chip in this chip list, or the associated input when there * are no eligible chips. */ focus(options?: FocusOptions): void; /** Attempt to focus an input if we have one. */ _focusInput(options?: FocusOptions): void; /** * Pass events to the keyboard manager. Available here for tests. */ _keydown(event: KeyboardEvent): void; /** When blurred, mark the field as touched when focus moved outside the chip list. */ _blur(): void; /** Mark the field as touched */ _markAsTouched(): void; /** * Removes the `tabindex` from the chip list and resets it back afterwards, allowing the * user to tab out of it. This prevents the list from capturing focus and redirecting * it back to the first chip, creating a focus trap, if it user tries to tab away. */ _allowFocusEscape(): void; /** * Check the tab index as you should not be allowed to focus an empty list. */ protected _updateTabIndex(): void; /** * If the amount of chips changed, we need to update the * key manager state and focus the next closest chip. */ protected _updateFocusForDestroyedChips(): void; /** * Utility to ensure all indexes are valid. * * @param index The index to be checked. * @returns True if the index is valid for our list of chips. */ private _isValidIndex; private _setSelectionByValue; /** * Finds and selects the chip based on its value. * @returns Chip that has the corresponding value. */ private _selectValue; private _initializeSelection; /** * Deselects every chip in the list. * @param skip Chip that should not be deselected. */ private _clearSelection; /** * Sorts the model values, ensuring that they keep the same * order that they have in the panel. */ private _sortValues; private _compareWith; private _resetChips; private _dropSubscriptions; /** Listens to user-generated selection events on each chip. */ private _listenToChipsSelection; /** Listens to user-generated selection events on each chip. */ private _listenToChipsFocus; private _listenToChipsRemoved; /** Checks whether an event comes from inside a chip element. */ private _originatesFromChip; /** Checks whether any of the chips is focused. */ private _hasFocusedChip; /** Syncs the list's state with the individual chips. */ private _syncChipsState; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteChipsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteLabelComponent implements OnChanges { for: string | null; form: string | null; required: boolean; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteLabelModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } type ContactDefaultStatuses = (typeof CONTACT_DEFAULT_STATUS)[keyof typeof CONTACT_DEFAULT_STATUS]; declare const CONTACT_DEFAULT_STATUS: { readonly AVAILABLE: "Available"; readonly AWAY: "Away"; readonly BE_RIGHT_BACK: "BeRightBack"; readonly BUSY: "Busy"; readonly DO_NOT_DISTURB: "DoNotDisturb"; readonly OFFLINE: "Offline"; }; interface Contact { name: string; label: string; iconName?: string; status?: ContactDefaultStatuses | string; options?: ContactOption[]; disabled?: boolean; data?: T; } interface SelectedContact { contact: ContactOption; parent?: Contact; } type ContactOption = Omit, 'options'>; interface Profile { firstName?: string; lastName?: string; name?: string; jobTitle?: string; avatar?: string; } type PositionX$1 = 'before' | 'after'; type PositionY$1 = 'above' | 'below'; declare class ContactsTriggerDataComponent { templateRef: TemplateRef; xPosition: PositionX$1; yPosition: PositionY$1; direction: Direction; /** * Used for locating the panel in tests and setting the aria-control attribute * for the contacts trigger. */ readonly panelId: string; /** Client input device information */ clientInput: ClientInputInterface; /** Client output device information */ clientOutput: ClientOutputInterface; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteCustomStatusDirective { graniteCustomStatus: string; templateRef: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } interface ContactExtended extends Contact { statusTemplate?: TemplateRef; } type ProfileData = Omit & { initials: string; }; declare class GraniteCustomProfileDirective { templateRef: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteContactsComponent extends ContactsTriggerDataComponent implements OnChanges, AfterContentChecked { contacts: Contact[]; contactsClass: string; profile: Profile | unknown; profileClass: string; defaultShow: boolean; readonly selectedContact: EventEmitter>; _customStatuses: QueryList; customProfileDirective: GraniteCustomProfileDirective; _contactsExtended: ContactExtended[]; _profile: ProfileData; private cd; ngOnChanges(changes: SimpleChanges): void; ngAfterContentChecked(): void; onSelectedContact(contact: SelectedContact): void; private setProperCustomStatusTemplates; private applyTemplates; private createProfileData; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteContactsProfileComponent { profile: ProfileData; profileClass: any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteContactItemComponent { contact: ContactExtended; readonly selectedContact: EventEmitter>; emitSelectedContact(selectedContact: SelectedContact): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ContactItemDefaultStatusComponent { status: ContactDefaultStatuses; CONTACT_STATUS: { readonly AVAILABLE: "Available"; readonly AWAY: "Away"; readonly BE_RIGHT_BACK: "BeRightBack"; readonly BUSY: "Busy"; readonly DO_NOT_DISTURB: "DoNotDisturb"; readonly OFFLINE: "Offline"; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteContactItemTitleComponent { contact: ContactExtended; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteContactsTriggerForDirective implements AfterContentInit, OnDestroy { /** References the contacts instance that the trigger is associated with. */ contacts: GraniteContactsComponent; _clientInput: ClientInputInterface; _clientOutput: ClientOutputInterface; /** Whether the associated contacts is open */ _isContactsOpen: boolean; private _overlay; private _element; private _viewContainerRef; private _outsideClickDispatcher; private _dir; private _focusMonitor; private _contactsCloseSubscription; private _portal; private _overlayRef; ngAfterContentInit(): void; ngOnDestroy(): void; isOpen(): boolean; openContacts(): void; /** Toggles the contacts between the open and closed states. */ toggleContacts(): void; /** Close the associated contacts */ closeContacts(): void; /** Handles key presses on the trigger. */ _handleKeydown(event: KeyboardEvent): void; /** Handles click events on the trigger. */ _handleClick(): void; /** * Restores focus to the element that was focused before the contacts was open. */ _restoreFocus(origin?: FocusOrigin, options?: FocusOptions): void; /** * Returns strategy for positioning the overlay for desktop devices: */ private _desktopPositionStrategy; /** * Sets the appropriate positions on a position strategy * so the overlay connects with the trigger correctly. * @param positionStrategy Strategy whose position to update. */ private _setPosition; /** * Returns strategy for positioning the overlay depending on what type of * device the contacts is being shown on */ private _positionStrategy; /** * Returns strategy for positioning the overlay for touch devices: * Place centered in the screen. */ private _touchPositionStrategy; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteCustomAvatarStatusDirective { graniteCustomAvatarStatus: string; templateRef: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type AvatarDefaultStatuses = (typeof AVATAR_DEFAULT_STATUS)[keyof typeof AVATAR_DEFAULT_STATUS]; declare const AVATAR_DEFAULT_STATUS: { readonly AVAILABLE: "Available"; readonly DO_NOT_DISTURB: "DoNotDisturb"; readonly DISABLED: "Disabled"; readonly AWAY: "Away"; }; declare class GraniteAvatarComponent extends ContactsTriggerDataComponent implements AfterContentChecked, OnChanges { name: string; firstName: string; lastName: string; avatar: string; status: AvatarDefaultStatuses; ariaLabel: string | null; _customStatusesQueryList: QueryList; _customStatusDirectives: Record>; _nameInitials: string; avatarAriaLabel: string; private cd; ngOnChanges(changes: SimpleChanges): void; ngAfterContentChecked(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type StatusClasses = 'available' | 'do-not-disturb' | 'disabled' | 'away'; declare class GraniteAvatarDefaultStatusComponent { status: AvatarDefaultStatuses; AVATAR_STATUS: { readonly AVAILABLE: "Available"; readonly DO_NOT_DISTURB: "DoNotDisturb"; readonly DISABLED: "Disabled"; readonly AWAY: "Away"; }; get statusClass(): StatusClasses; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteEmptyAvatarComponent { initials: string; ariaLabel: string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteAvatarModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteContactsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface GraniteProgressInterface { value: number; label?: string; valueLabel?: string; backgroundColor?: string; foregroundColor?: string; } interface GraniteProgressLegendInterface { label: string; backgroundColor: string; } declare class GraniteProgressBarComponent implements OnChanges { progressBarData: GraniteProgressInterface[]; legendData: GraniteProgressLegendInterface[]; showLabel: boolean; showLegend: boolean; DEFAULT_TOTAL: number; DEFAULT_BACKGROUND: string; DEFAULT_STACK_COLOR: string; DEFAULT_COLOR: string; total: number; legendItems: GraniteProgressLegendInterface[]; getBackgroundColor(): string; getFontColor(color: string): string; getStackColor(color: string): string; getColorVar(color: string): string; getWidth(value: number): number; getStringOfWidth(width: number): string; checkStackTotal(): void; getStackTotal(): number; setLegendItems(): void; getLegendItems(data: GraniteProgressInterface[] | GraniteProgressLegendInterface[]): GraniteProgressLegendInterface[]; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type PositionX = 'before' | 'after'; type PositionY = 'above' | 'below'; declare class OverlayBaseComponent { templateRef: TemplateRef; xPosition: PositionX; yPosition: PositionY; direction: Direction; clientInput: ClientInputInterface; clientOutput: ClientOutputInterface; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class LegendBaseComponent extends OverlayBaseComponent { readonly panelId: string; xPosition: PositionX; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteProgressBarLegendComponent extends LegendBaseComponent { legendItems: GraniteProgressLegendInterface[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface OverlayPositionConfig { originX?: 'start' | 'center' | 'end'; originFallbackX?: 'start' | 'center' | 'end'; originY?: 'top' | 'center' | 'bottom'; originFallbackY?: 'top' | 'center' | 'bottom'; overlayX?: 'start' | 'center' | 'end'; overlayFallbackX?: 'start' | 'center' | 'end'; overlayY?: 'top' | 'center' | 'bottom'; overlayFallbackY?: 'top' | 'center' | 'bottom'; offsetX?: number; offsetY?: number; } declare class GraniteOverlayTriggerForBaseDirective implements OnDestroy { /** Client output device information */ private _clientOutput; /** Client input device information */ private _clientInput; private _dir; protected componentRef: OverlayBaseComponent; protected selector: string; protected offsetX: number; protected offsetY: number; private _overlayRef; private _overlay; private _element; private _viewContainerRef; private _overlayService; ngOnDestroy(): void; protected getPositionConfig(): OverlayPositionConfig; protected getPositionStrategy(): PositionStrategy; protected getScrollStrategy(): RepositionScrollStrategy | BlockScrollStrategy | CloseScrollStrategy; protected setScrollStrategy(scrollStrategy: 'reposition' | 'block' | 'close'): RepositionScrollStrategy | BlockScrollStrategy | CloseScrollStrategy; protected toggleOverlay(isOpen: boolean): boolean; protected onOutsideClick(): void; private _openOverlay; private _closeOverlay; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteProgressBarLegendTriggerForDirective extends GraniteOverlayTriggerForBaseDirective { get legend(): OverlayBaseComponent; set legend(value: GraniteProgressBarLegendComponent); isLegendOpen: boolean; protected selector: string; protected offsetY: number; handleKeydown(event: KeyboardEvent): void; handleClick(): void; onOutsideClick(): void; getScrollStrategy(): RepositionScrollStrategy | BlockScrollStrategy | CloseScrollStrategy; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive used to tell components and their sub components that client output * should be adapted for desktop devices like personal computers. */ declare class ClientOutputDesktopDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive used to tell components and their sub components that client output * should be adapted for touch devices like mobiles and tablets. */ declare class ClientOutputTouchDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive used to tell components and their sub components that client input * should be adapted for desktop devices, like personal computers. */ declare class ClientInputDesktopDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive used to tell components and their sub components that client input * should be adapted for touch devices, like mobiles and tablets. */ declare class ClientInputTouchDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteHideOnOverflowDirective implements AfterViewInit, OnDestroy { resizeObserver: ResizeObserver; resizeSubscription: Subscription; mutationObserver: MutationObserver; private _elementRef; private renderer; ngAfterViewInit(): void; ngOnDestroy(): void; hideOnOverflow(): void; observeResize(): void; unObserveResize(): void; subscribeToResize(): void; observeContentChange(): void; unObserveContentChange(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteCoreModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteProgressBarModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } type Constructor = new (...args: any[]) => T; declare const disabledMixin: >>(Base?: T) => { new (...args: any[]): { [x: string]: unknown; disabled: boolean; ngOnChanges(changes: SimpleChanges): void; }; } & T; declare class GraniteTitlePipe implements PipeTransform { transform(value: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class PurePipesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteCardComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardListComponent { /**Present cards in vertically or horizontally */ orientation: 'horizontal' | 'vertical'; wrap: 'wrap' | 'nowrap'; gap: 'small' | 'medium' | 'large'; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardContentComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardHeaderComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardActionsComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardBodyComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardFooterComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardAvatarComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardHeaderTitleComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardHeaderSubTitleComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCardListModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class GraniteCollapsibleConditionalBodyDirective { template: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteCollapsibleConditionalHeaderDirective { template: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class GraniteCollapsibleGroupComponent { collapsed: boolean; id: string; arialabel: string | null; readonly collapsedChanged: EventEmitter; conditionalBodyContentRef: GraniteCollapsibleConditionalBodyDirective; conditionalHeaderContentRef: GraniteCollapsibleConditionalHeaderDirective; toggleCollapsibleGroup(): void; _toogleCollapsing(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GraniteCollapsibleGroupModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { AVATAR_DEFAULT_STATUS, ButtonSelectors, CONTACT_DEFAULT_STATUS, ClientInputDesktopDirective, ClientInputTouchDirective, ClientOutputDesktopDirective, ClientOutputTouchDirective, ContactItemDefaultStatusComponent, GraniteAnchorComponent, GraniteArrangeGridComponent, GraniteArrangeGridItemComponent, GraniteArrangeGridModule, GraniteArrangeGridOrientation, GraniteAvatarComponent, GraniteAvatarDefaultStatusComponent, GraniteAvatarModule, GraniteBadgeComponent, GraniteBadgeHarness, GraniteBadgeModule, GraniteButtonComponent, GraniteButtonModule, GraniteCardActionsComponent, GraniteCardAvatarComponent, GraniteCardBodyComponent, GraniteCardComponent, GraniteCardContentComponent, GraniteCardFooterComponent, GraniteCardHeaderComponent, GraniteCardHeaderSubTitleComponent, GraniteCardHeaderTitleComponent, GraniteCardListComponent, GraniteCardListModule, GraniteCheckboxComponent, GraniteCheckboxGroupComponent, GraniteCheckboxModule, GraniteChipComponent, GraniteChipInputDirective, GraniteChipListComponent, GraniteChipSelectionChangeEvent, GraniteChipsModule, GraniteCollapsibleConditionalBodyDirective, GraniteCollapsibleConditionalHeaderDirective, GraniteCollapsibleGroupComponent, GraniteCollapsibleGroupModule, GraniteContactItemComponent, GraniteContactItemTitleComponent, GraniteContactsComponent, GraniteContactsModule, GraniteContactsProfileComponent, GraniteContactsTriggerForDirective, GraniteCoreModule, GraniteCustomAvatarStatusDirective, GraniteCustomProfileDirective, GraniteCustomStatusDirective, GraniteDividerDirective, GraniteEmptyAvatarComponent, GraniteGridComponent, GraniteGridItemComponent, GraniteGridModule, GraniteHideOnOverflowDirective, GraniteIconComponent, GraniteIconModule, GraniteInputFieldComponent, GraniteInputFieldModule, GraniteLabelComponent, GraniteLabelModule, GraniteMenuComponent, GraniteMenuCustomTemplateDirective, GraniteMenuHarness, GraniteMenuItemComponent, GraniteMenuItemHarness, GraniteMenuModule, GraniteMenuTouchCloseComponent, GraniteMenuTouchTitleItemComponent, GraniteMenuTriggerForDirective, GraniteProgressBarComponent, GraniteProgressBarModule, GraniteRadioButtonComponent, GraniteRadioButtonModule, GraniteRadioGroupComponent, GraniteTitleDirective, GraniteTitlePipe, GraniteToggleSwitchComponent, GraniteToggleSwitchModule, PurePipesModule, disabledMixin, graniteMenuDesktopAnimations, graniteMenuTouchAnimations }; export type { AvatarDefaultStatuses, Contact, ContactDefaultStatuses, ContactOption, GraniteBadgeHarnessFilters, GraniteChipEvent, GraniteChipInputEvent, GraniteChipTextControl, GraniteMenuHarnessFilters, GraniteMenuItemHarnessFilters, GraniteProgressInterface, GraniteProgressLegendInterface, Layout, Position, Profile, SelectedContact, StatusClasses };