@ifsworld/granite-components 16.1.2 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/carousel/index.d.ts +45 -2
- package/date-picker/index.d.ts +123 -4
- package/fesm2022/ifsworld-granite-components-carousel.mjs +11 -11
- package/fesm2022/ifsworld-granite-components-carousel.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-date-picker.mjs +40 -53
- package/fesm2022/ifsworld-granite-components-date-picker.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-file-upload.mjs +10 -10
- package/fesm2022/ifsworld-granite-components-file-upload.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-table.mjs +29 -29
- package/fesm2022/ifsworld-granite-components-table.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components-tooltip.mjs +23 -24
- package/fesm2022/ifsworld-granite-components-tooltip.mjs.map +1 -1
- package/fesm2022/ifsworld-granite-components.mjs +480 -564
- package/fesm2022/ifsworld-granite-components.mjs.map +1 -1
- package/file-upload/index.d.ts +99 -2
- package/index.d.ts +1981 -86
- package/package.json +8 -8
- package/table/index.d.ts +112 -4
- package/tooltip/index.d.ts +50 -3
- package/carousel/lib/carousel.component.d.ts +0 -34
- package/carousel/lib/carousel.module.d.ts +0 -10
- package/date-picker/lib/date-picker-base.d.ts +0 -34
- package/date-picker/lib/date-picker-trigger-for.directive.d.ts +0 -70
- package/date-picker/lib/date-picker.component.d.ts +0 -10
- package/date-picker/lib/date-picker.module.d.ts +0 -15
- package/date-picker/lib/date-range-picker.component.d.ts +0 -12
- package/file-upload/lib/directives/file-drag-and-drop.directive.d.ts +0 -18
- package/file-upload/lib/file-upload.component.d.ts +0 -51
- package/file-upload/lib/file-upload.constants.d.ts +0 -37
- package/file-upload/lib/file-upload.module.d.ts +0 -11
- package/file-upload/lib/file-upload.utils.d.ts +0 -1
- package/lib/arrange-grid/arrange-grid-item.component.d.ts +0 -30
- package/lib/arrange-grid/arrange-grid.component.d.ts +0 -58
- package/lib/arrange-grid/arrange-grid.module.d.ts +0 -9
- package/lib/avatar/avatar-default-status/avatar-default-status.component.d.ts +0 -15
- package/lib/avatar/avatar.component.d.ts +0 -23
- package/lib/avatar/avatar.component.public-types.d.ts +0 -7
- package/lib/avatar/avatar.module.d.ts +0 -11
- package/lib/avatar/custom-avatar-status.directive.d.ts +0 -9
- package/lib/avatar/empty-avatar/empty-avatar.component.d.ts +0 -7
- package/lib/badge/badge.component.d.ts +0 -19
- package/lib/badge/badge.module.d.ts +0 -8
- package/lib/badge/testing/badge.harness.d.ts +0 -21
- package/lib/button/button.component.d.ts +0 -38
- package/lib/button/button.module.d.ts +0 -7
- package/lib/card-list/card/card-avatar.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-actions.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-body.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-content.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-footer.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-header-subtitle.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-header-title.component.d.ts +0 -5
- package/lib/card-list/card/card-content/card-header.component.d.ts +0 -5
- package/lib/card-list/card/card.component.d.ts +0 -5
- package/lib/card-list/card-list.component.d.ts +0 -9
- package/lib/card-list/card-list.module.d.ts +0 -18
- package/lib/checkbox/checkbox-group.component.d.ts +0 -6
- package/lib/checkbox/checkbox.component.d.ts +0 -29
- package/lib/checkbox/checkbox.module.d.ts +0 -8
- package/lib/chips/chip-input.d.ts +0 -89
- package/lib/chips/chip-list.component.d.ts +0 -185
- package/lib/chips/chip.component.d.ts +0 -104
- package/lib/chips/chips.module.d.ts +0 -12
- package/lib/collapsible-group/collapsible-group-body.directive.d.ts +0 -7
- package/lib/collapsible-group/collapsible-group-header.directive.d.ts +0 -7
- package/lib/collapsible-group/collapsible-group.component.d.ts +0 -16
- package/lib/collapsible-group/collapsible-group.module.d.ts +0 -11
- package/lib/contacts/contact-item/contact-item.component.d.ts +0 -11
- package/lib/contacts/contact-item-default-status/contact-item-default-status.component.d.ts +0 -15
- package/lib/contacts/contact-item-title/contact-item-title.component.d.ts +0 -7
- package/lib/contacts/contacts-profile/contacts-profile.component.d.ts +0 -8
- package/lib/contacts/contacts-trigger/contacts-trigger-data.d.ts +0 -23
- package/lib/contacts/contacts-trigger/contacts-trigger-for.directive.d.ts +0 -69
- package/lib/contacts/contacts-types/contacts.component.private-types.d.ts +0 -8
- package/lib/contacts/contacts-types/contacts.component.public-types.d.ts +0 -30
- package/lib/contacts/contacts.component.d.ts +0 -29
- package/lib/contacts/contacts.module.d.ts +0 -17
- package/lib/contacts/custom-profile.directive.d.ts +0 -8
- package/lib/contacts/custom-status.directive.d.ts +0 -9
- package/lib/core/animation.d.ts +0 -23
- package/lib/core/client-environment.d.ts +0 -26
- package/lib/core/common-behaviors/disabled.d.ts +0 -10
- package/lib/core/core.module.d.ts +0 -12
- package/lib/core/devices/client-input-desktop.directive.d.ts +0 -9
- package/lib/core/devices/client-input-touch.directive.d.ts +0 -9
- package/lib/core/devices/client-output-desktop.directive.d.ts +0 -9
- package/lib/core/devices/client-output-touch.directive.d.ts +0 -9
- package/lib/core/hide-on-overflow.directive.d.ts +0 -21
- package/lib/core/overlay-base.d.ts +0 -16
- package/lib/core/overlay-position-config.d.ts +0 -12
- package/lib/core/overlay-trigger-for-base.directive.d.ts +0 -32
- package/lib/core/overlay.service.d.ts +0 -21
- package/lib/core/pipes/pure-pipes.module.d.ts +0 -7
- package/lib/core/pipes/title.pipe.d.ts +0 -7
- package/lib/core/radio-checkbox-base.d.ts +0 -8
- package/lib/core/services/names-utils-service.d.ts +0 -17
- package/lib/core/theme.library.d.ts +0 -38
- package/lib/core/types.d.ts +0 -2
- package/lib/grid/grid.component.d.ts +0 -75
- package/lib/grid/grid.module.d.ts +0 -8
- package/lib/icon/icon.component.d.ts +0 -13
- package/lib/icon/icon.module.d.ts +0 -7
- package/lib/input-field/input-field.component.d.ts +0 -48
- package/lib/input-field/input-field.module.d.ts +0 -10
- package/lib/label/label.component.d.ts +0 -10
- package/lib/label/label.module.d.ts +0 -8
- package/lib/menu/divider.directive.d.ts +0 -6
- package/lib/menu/menu-base.d.ts +0 -219
- package/lib/menu/menu-custom-template.directive.d.ts +0 -14
- package/lib/menu/menu-desktop-animations.d.ts +0 -12
- package/lib/menu/menu-errors.d.ts +0 -24
- package/lib/menu/menu-item.component.d.ts +0 -36
- package/lib/menu/menu-panel.d.ts +0 -23
- package/lib/menu/menu-positions.d.ts +0 -9
- package/lib/menu/menu-touch-animations.d.ts +0 -17
- package/lib/menu/menu-touch-close.component.d.ts +0 -5
- package/lib/menu/menu-touch-title.component.d.ts +0 -14
- package/lib/menu/menu-trigger-for.directive.d.ts +0 -200
- package/lib/menu/menu.component.d.ts +0 -6
- package/lib/menu/menu.module.d.ts +0 -18
- package/lib/menu/testing/menu.harness.d.ts +0 -68
- package/lib/menu/title.directive.d.ts +0 -5
- package/lib/progress-bar/progress-bar-legend/progress-bar-legend.component.d.ts +0 -8
- package/lib/progress-bar/progress-bar-legend-base.d.ts +0 -8
- package/lib/progress-bar/progress-bar-legend-trigger-for.directive.d.ts +0 -18
- package/lib/progress-bar/progress-bar.component.d.ts +0 -28
- package/lib/progress-bar/progress-bar.model.d.ts +0 -11
- package/lib/progress-bar/progress-bar.module.d.ts +0 -14
- package/lib/radio-button/radio-button.component.d.ts +0 -34
- package/lib/radio-button/radio-button.module.d.ts +0 -8
- package/lib/radio-button/radio-group.component.d.ts +0 -6
- package/lib/toggle-switch/toggle-switch.component.d.ts +0 -29
- package/lib/toggle-switch/toggle-switch.module.d.ts +0 -7
- package/table/lib/cell/cell-align/cell-align-classes.directive.d.ts +0 -9
- package/table/lib/cell/cell.d.ts +0 -8
- package/table/lib/cell/table-data-cell.component.d.ts +0 -12
- package/table/lib/cell/table-header-cell.component.d.ts +0 -6
- package/table/lib/column/table-column.directive.d.ts +0 -23
- package/table/lib/column-size/column-size.directive.d.ts +0 -11
- package/table/lib/table-constants.library.d.ts +0 -6
- package/table/lib/table.component.d.ts +0 -26
- package/table/lib/table.model.d.ts +0 -6
- package/table/lib/table.module.d.ts +0 -16
- package/tooltip/lib/Services/granite-tooltip.service.d.ts +0 -10
- package/tooltip/lib/tooltip-constants.library.d.ts +0 -4
- package/tooltip/lib/tooltip-trigger-for.directive.d.ts +0 -39
- package/tooltip/lib/tooltip.component.d.ts +0 -7
- package/tooltip/lib/tooltip.module.d.ts +0 -9
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FlexibleConnectedPositionStrategy, Overlay, OverlayConfig, OverlayOutsideClickDispatcher, OverlayRef, PositionStrategy } from '@angular/cdk/overlay';
|
|
2
|
-
import { ElementRef, ViewContainerRef } from '@angular/core';
|
|
3
|
-
import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
4
|
-
import { OverlayPositionConfig } from './overlay-position-config';
|
|
5
|
-
import { OverlayBaseComponent } from './overlay-base';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class OverlayService {
|
|
8
|
-
private _overlay;
|
|
9
|
-
private _focusMonitor;
|
|
10
|
-
private _outsideClickDispatcher;
|
|
11
|
-
constructor(_overlay: Overlay, _focusMonitor: FocusMonitor, _outsideClickDispatcher: OverlayOutsideClickDispatcher);
|
|
12
|
-
createOverlay(config: OverlayConfig, component: OverlayBaseComponent, viewContainerRef: ViewContainerRef): OverlayRef;
|
|
13
|
-
closeOverlay(overlayRef: OverlayRef, element: ElementRef<HTMLElement>): void;
|
|
14
|
-
restoreFocus(element: ElementRef<HTMLElement>, origin?: FocusOrigin, options?: FocusOptions): void;
|
|
15
|
-
desktopPositionStrategy(element: ElementRef<HTMLElement>, selector: string): FlexibleConnectedPositionStrategy;
|
|
16
|
-
touchPositionStrategy(): PositionStrategy;
|
|
17
|
-
setPosition(positionStrategy: FlexibleConnectedPositionStrategy, positionConfig: OverlayPositionConfig): FlexibleConnectedPositionStrategy;
|
|
18
|
-
subscribeOutsideClick(overlayRef: OverlayRef, callback?: () => void): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayService, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OverlayService>;
|
|
21
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./title.pipe";
|
|
3
|
-
export declare class PurePipesModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PurePipesModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PurePipesModule, [typeof i1.GraniteTitlePipe], never, [typeof i1.GraniteTitlePipe]>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<PurePipesModule>;
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GraniteTitlePipe implements PipeTransform {
|
|
4
|
-
transform(value: string): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteTitlePipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<GraniteTitlePipe, "graniteTitle", false>;
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Layout } from './types';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class GraniteRadioCheckboxBase {
|
|
4
|
-
layout: Layout;
|
|
5
|
-
ariaLabelledby: string | null;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteRadioCheckboxBase, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteRadioCheckboxBase, never, never, { "layout": { "alias": "layout"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type firstName = string;
|
|
2
|
-
type lastName = string;
|
|
3
|
-
type NamesFormat = {
|
|
4
|
-
firstName?: firstName | null;
|
|
5
|
-
lastName?: lastName | null;
|
|
6
|
-
name?: string;
|
|
7
|
-
};
|
|
8
|
-
type NameData = {
|
|
9
|
-
firstName?: firstName;
|
|
10
|
-
lastName?: lastName;
|
|
11
|
-
initials: string;
|
|
12
|
-
};
|
|
13
|
-
export declare class NamesUtilsService {
|
|
14
|
-
static getInitialsFrom(firstName: string): string;
|
|
15
|
-
static buildNameData(namesFormat: NamesFormat): NameData;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Theme, Tokens } from '@ifsworld/granite-tokens';
|
|
2
|
-
export declare const TOKEN_PREFIX = "granite-";
|
|
3
|
-
export declare const TOKEN_PREFIX_OLD = "fnd-";
|
|
4
|
-
/**
|
|
5
|
-
* Get the theme that corresponds to a given ID
|
|
6
|
-
*/
|
|
7
|
-
export declare function getThemeById(themes: Theme[], id: string): Theme | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Apply a theme to a DOM element by iterating though all tokens,
|
|
10
|
-
* setting a CSS variable for each one.
|
|
11
|
-
*
|
|
12
|
-
* @param theme Theme to set
|
|
13
|
-
* @param element Target element
|
|
14
|
-
*/
|
|
15
|
-
export declare function applyTheme(theme: Theme, element: HTMLElement): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set a CSS variable for each token on the specified element.
|
|
18
|
-
*
|
|
19
|
-
* @param theme Theme to set
|
|
20
|
-
* @param element Target element
|
|
21
|
-
*/
|
|
22
|
-
export declare function applyTokens(tokens: Tokens, element: HTMLElement): void;
|
|
23
|
-
/**
|
|
24
|
-
* Remove theme token CSS variables from an element using the specified keys
|
|
25
|
-
*
|
|
26
|
-
* @param theme Theme with tokens to clear
|
|
27
|
-
* @param element Target element
|
|
28
|
-
*/
|
|
29
|
-
export declare function clearTheme(theme: Theme, element: HTMLElement): void;
|
|
30
|
-
/**
|
|
31
|
-
* Remove token CSS variables from an element using the specified keys.
|
|
32
|
-
*
|
|
33
|
-
* @param keys Token keys
|
|
34
|
-
* @param element Target element
|
|
35
|
-
*/
|
|
36
|
-
export declare function clearTokens(keys: string[], element: HTMLElement): void;
|
|
37
|
-
export declare function isValidToken(key: string): boolean;
|
|
38
|
-
export declare function setPropertyValue(name: string, value: string, element: HTMLElement): void;
|
package/lib/core/types.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Grid item component
|
|
5
|
-
*
|
|
6
|
-
* Merely a wrapper for CSS Grid items, accepting item style as input parameters.
|
|
7
|
-
*/
|
|
8
|
-
export declare class GraniteGridItemComponent implements OnChanges {
|
|
9
|
-
private element;
|
|
10
|
-
private renderer;
|
|
11
|
-
columnStart: number;
|
|
12
|
-
columnEnd: number;
|
|
13
|
-
rowStart: number;
|
|
14
|
-
rowEnd: number;
|
|
15
|
-
constructor(element: ElementRef<HTMLElement>, renderer: Renderer2);
|
|
16
|
-
ngOnChanges(): void;
|
|
17
|
-
/**
|
|
18
|
-
* Update element styles
|
|
19
|
-
*/
|
|
20
|
-
updateStyles(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Sets the element style. Needs to be set manually to avoid "Changed after
|
|
23
|
-
* checked" errors that would occur with HostBinding.
|
|
24
|
-
*/
|
|
25
|
-
private setStyle;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteGridItemComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteGridItemComponent, "granite-grid-item", never, { "columnStart": { "alias": "columnStart"; "required": false; }; "columnEnd": { "alias": "columnEnd"; "required": false; }; "rowStart": { "alias": "rowStart"; "required": false; }; "rowEnd": { "alias": "rowEnd"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Grid
|
|
31
|
-
*
|
|
32
|
-
* A wrapper around a native CSS Grid. Anything can be used for grid items, but
|
|
33
|
-
* `GridItemComponent` is recommended for common cases.
|
|
34
|
-
*/
|
|
35
|
-
export declare class GraniteGridComponent implements AfterContentInit, OnChanges {
|
|
36
|
-
private element;
|
|
37
|
-
/**
|
|
38
|
-
* Number of grid columns, unless set via styling (grid-template-columns)
|
|
39
|
-
*
|
|
40
|
-
* Setting this value will produce equally sized columns
|
|
41
|
-
*/
|
|
42
|
-
set cols(value: number);
|
|
43
|
-
get cols(): number;
|
|
44
|
-
/** Number of columns to render */
|
|
45
|
-
protected _cols: number;
|
|
46
|
-
/**
|
|
47
|
-
* Number of grid rows, unless set via styling (grid-template-rows)
|
|
48
|
-
*
|
|
49
|
-
* Setting this value will produce equally sized rows
|
|
50
|
-
*/
|
|
51
|
-
set rows(value: number);
|
|
52
|
-
get rows(): number;
|
|
53
|
-
/** Number of rows to render */
|
|
54
|
-
protected _rows: number;
|
|
55
|
-
constructor(element: ElementRef<HTMLElement>);
|
|
56
|
-
ngAfterContentInit(): void;
|
|
57
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
58
|
-
/** Update element styles */
|
|
59
|
-
updateStyles(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Set CSS variable value or remove it if a null value is given.
|
|
62
|
-
* Would of course rather have used property binding but that is not
|
|
63
|
-
* supported until (perhaps) Angular 9.
|
|
64
|
-
* See: https://github.com/angular/angular/issues/9343
|
|
65
|
-
*
|
|
66
|
-
* TODO: Replace with property binding with Angular 9 upgrade
|
|
67
|
-
*/
|
|
68
|
-
protected setCssProperty(variable: string, value: string | null): void;
|
|
69
|
-
/** Update grid column template style */
|
|
70
|
-
protected updateColumnStyles(): void;
|
|
71
|
-
/** Update grid row template style */
|
|
72
|
-
protected updateRowStyles(): void;
|
|
73
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteGridComponent, never>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteGridComponent, "granite-grid", never, { "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
75
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./grid.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
export declare class GraniteGridModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteGridModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteGridModule, [typeof i1.GraniteGridComponent, typeof i1.GraniteGridItemComponent], [typeof i2.CommonModule], [typeof i1.GraniteGridComponent, typeof i1.GraniteGridItemComponent]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<GraniteGridModule>;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GraniteIconComponent implements OnChanges {
|
|
4
|
-
_elementRef: ElementRef;
|
|
5
|
-
private renderer;
|
|
6
|
-
fontIcon: string;
|
|
7
|
-
private _previousFontIconClass;
|
|
8
|
-
constructor(_elementRef: ElementRef, renderer: Renderer2, ariaHidden: string);
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
private _updateFontIcon;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteIconComponent, [null, null, { attribute: "aria-hidden"; }]>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteIconComponent, "granite-icon", never, { "fontIcon": { "alias": "fontIcon"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
13
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./icon.component";
|
|
3
|
-
export declare class GraniteIconModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteIconModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteIconModule, [typeof i1.GraniteIconComponent], never, [typeof i1.GraniteIconComponent]>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<GraniteIconModule>;
|
|
7
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class GraniteInputFieldComponent implements OnInit, OnChanges, AfterViewInit {
|
|
5
|
-
private _focusMonitor;
|
|
6
|
-
private _cdr;
|
|
7
|
-
private _elementRef;
|
|
8
|
-
id: string | null;
|
|
9
|
-
name: string | null;
|
|
10
|
-
type: string;
|
|
11
|
-
value: string | number;
|
|
12
|
-
required: boolean;
|
|
13
|
-
readonly: boolean;
|
|
14
|
-
invalid: boolean;
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
placeholder: string;
|
|
17
|
-
prefixicon: string;
|
|
18
|
-
maxlength: number;
|
|
19
|
-
countcharacters: boolean;
|
|
20
|
-
ariaLabel: string | null;
|
|
21
|
-
ariaLabelledby: string | null;
|
|
22
|
-
readonly valueChange: EventEmitter<string>;
|
|
23
|
-
private _inputElement;
|
|
24
|
-
private _textareaElement;
|
|
25
|
-
_supported: boolean;
|
|
26
|
-
_empty: boolean;
|
|
27
|
-
_passwordFieldIcon: string;
|
|
28
|
-
_passwordField: boolean;
|
|
29
|
-
_hasSuffixButton: boolean;
|
|
30
|
-
_currentCharCount: number;
|
|
31
|
-
private _passwordToggled;
|
|
32
|
-
private _lastEmittedValue;
|
|
33
|
-
constructor(_focusMonitor: FocusMonitor, _cdr: ChangeDetectorRef, _elementRef: ElementRef);
|
|
34
|
-
ngOnInit(): void;
|
|
35
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
36
|
-
ngAfterViewInit(): void;
|
|
37
|
-
focus(origin?: FocusOrigin, options?: FocusOptions): void;
|
|
38
|
-
_togglePassword(): void;
|
|
39
|
-
_onInput(event: Event): void;
|
|
40
|
-
protected _validateType(): void;
|
|
41
|
-
private _checkForSuffixButton;
|
|
42
|
-
private _applyCharacterCount;
|
|
43
|
-
private _getInputElement;
|
|
44
|
-
private _getTextareaElement;
|
|
45
|
-
private _emitValueIfChanged;
|
|
46
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteInputFieldComponent, never>;
|
|
47
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteInputFieldComponent, "granite-input-field", ["graniteInputField"], { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "prefixicon": { "alias": "prefixicon"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "countcharacters": { "alias": "countcharacters"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["[graniteInputSuffixButton]"], false, never>;
|
|
48
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./input-field.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "../icon/icon.module";
|
|
5
|
-
import * as i4 from "../button/button.module";
|
|
6
|
-
export declare class GraniteInputFieldModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteInputFieldModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteInputFieldModule, [typeof i1.GraniteInputFieldComponent], [typeof i2.CommonModule, typeof i3.GraniteIconModule, typeof i4.GraniteButtonModule], [typeof i1.GraniteInputFieldComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<GraniteInputFieldModule>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class GraniteLabelComponent implements OnChanges {
|
|
4
|
-
for: string | null;
|
|
5
|
-
form: string | null;
|
|
6
|
-
required: boolean;
|
|
7
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteLabelComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteLabelComponent, "granite-label", ["graniteLabel"], { "for": { "alias": "for"; "required": false; }; "form": { "alias": "form"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./label.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
export declare class GraniteLabelModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteLabelModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteLabelModule, [typeof i1.GraniteLabelComponent], [typeof i2.CommonModule], [typeof i1.GraniteLabelComponent]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<GraniteLabelModule>;
|
|
8
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class GraniteDividerDirective {
|
|
3
|
-
dividerDirection: string;
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteDividerDirective, never>;
|
|
5
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteDividerDirective, "[graniteDivider]", ["graniteDivider"], { "dividerDirection": { "alias": "dividerDirection"; "required": false; }; }, {}, never, never, false, never>;
|
|
6
|
-
}
|
package/lib/menu/menu-base.d.ts
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy, QueryList, TemplateRef } from '@angular/core';
|
|
2
|
-
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
3
|
-
import { Direction } from '@angular/cdk/bidi';
|
|
4
|
-
import { AnimationEvent } from '@angular/animations';
|
|
5
|
-
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
6
|
-
import { ClientInputInterface, ClientOutputInterface } from '../core/client-environment';
|
|
7
|
-
import { GraniteMenuItemComponent } from './menu-item.component';
|
|
8
|
-
import { ClosedEventType, OpenedEventType, GraniteMenuPanelInterface } from './menu-panel';
|
|
9
|
-
import { MenuPositionX, MenuPositionY } from './menu-positions';
|
|
10
|
-
import { GraniteMenuCustomTemplateDirective } from './menu-custom-template.directive';
|
|
11
|
-
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
/** Menu panel animation states */
|
|
14
|
-
type TransformMenuStates = 'void' | 'enter' | 'enter-from-below' | 'below-with-delay' | 'below' | 'pan' | 'hide' | 'pan-hidden';
|
|
15
|
-
/**
|
|
16
|
-
* Menu panel animation transform/state object. Has to be an object as we supply
|
|
17
|
-
* the `xOffset` parameter and not just the state name.
|
|
18
|
-
*/
|
|
19
|
-
type TransformMenu = {
|
|
20
|
-
/** Current animation state name */
|
|
21
|
-
value: TransformMenuStates;
|
|
22
|
-
params: {
|
|
23
|
-
/** How far the menu has been panned/swiped by the user */
|
|
24
|
-
xOffset: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
/** Base class with all of the menu functionality. */
|
|
28
|
-
export declare class _MenuBaseComponent implements AfterContentInit, OnDestroy, AfterContentChecked, GraniteMenuPanelInterface {
|
|
29
|
-
private _changeDetectorRef;
|
|
30
|
-
/** Position of the menu in the X axis. */
|
|
31
|
-
get xPosition(): MenuPositionX;
|
|
32
|
-
set xPosition(value: MenuPositionX);
|
|
33
|
-
/** Position of the menu in the Y axis. */
|
|
34
|
-
get yPosition(): MenuPositionY;
|
|
35
|
-
set yPosition(value: MenuPositionY);
|
|
36
|
-
/**
|
|
37
|
-
* Custom position configuration for the overlay.
|
|
38
|
-
* When provided, this overrides the default positioning logic based on
|
|
39
|
-
* xPosition and yPosition. Uses Angular CDK ConnectedPosition format.
|
|
40
|
-
* If empty or not provided, falls back to default positioning behavior.
|
|
41
|
-
*/
|
|
42
|
-
cdkConnectedOverlayPosition: ConnectedPosition[];
|
|
43
|
-
/** Optional touch menu panel title */
|
|
44
|
-
title: string;
|
|
45
|
-
/**
|
|
46
|
-
* Touch menu close button label. If not set, any label set by parent will
|
|
47
|
-
* be used.
|
|
48
|
-
*/
|
|
49
|
-
closeLabel: string;
|
|
50
|
-
openOnHover: boolean;
|
|
51
|
-
scrollStrategy: 'reposition' | 'close';
|
|
52
|
-
/**
|
|
53
|
-
* Styles to be applied to the menu.
|
|
54
|
-
* Added as there is no way to apply styles to the menu from the outside.
|
|
55
|
-
*/
|
|
56
|
-
styles: {
|
|
57
|
-
[key: string]: string;
|
|
58
|
-
};
|
|
59
|
-
touchStyles: {
|
|
60
|
-
[key: string]: string;
|
|
61
|
-
};
|
|
62
|
-
templateRef: TemplateRef<any>;
|
|
63
|
-
/** All items inside the menu. Includes items nested inside another menu. */
|
|
64
|
-
_allItems: QueryList<GraniteMenuItemComponent>;
|
|
65
|
-
/**
|
|
66
|
-
* Event emitted when the menu is closed
|
|
67
|
-
*/
|
|
68
|
-
readonly closed: EventEmitter<ClosedEventType>;
|
|
69
|
-
/**
|
|
70
|
-
* Event emitted when the menu is opened
|
|
71
|
-
*/
|
|
72
|
-
readonly opened: EventEmitter<OpenedEventType>;
|
|
73
|
-
/**
|
|
74
|
-
* Reference to the custom template directive if present
|
|
75
|
-
*/
|
|
76
|
-
customTemplate: GraniteMenuCustomTemplateDirective;
|
|
77
|
-
preventParentClose: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Used for locating the panel in tests and setting the aria-control attribute
|
|
80
|
-
* for the menu trigger.
|
|
81
|
-
*/
|
|
82
|
-
readonly panelId: string;
|
|
83
|
-
/** Parent menu of the current menu panel. */
|
|
84
|
-
parentMenu: GraniteMenuPanelInterface | undefined;
|
|
85
|
-
/** Layout direction of the menu. */
|
|
86
|
-
direction: Direction;
|
|
87
|
-
/** Whether to show back button in touch menu title bar */
|
|
88
|
-
showBackButton: boolean;
|
|
89
|
-
/** Whether to show touch menu title bar */
|
|
90
|
-
showTitle: boolean;
|
|
91
|
-
/** Whether to add a close button below the menu */
|
|
92
|
-
showCloseButton: boolean;
|
|
93
|
-
/** Observable current state of the panel animation. */
|
|
94
|
-
_transformMenu: BehaviorSubject<TransformMenu>;
|
|
95
|
-
/** Emits whenever an animation on the menu completes. */
|
|
96
|
-
_animationDone: Subject<AnimationEvent>;
|
|
97
|
-
/** Whether the menu is animating. */
|
|
98
|
-
_isAnimating: boolean;
|
|
99
|
-
/** Whether the menu is about to be destroyed. */
|
|
100
|
-
_isClosing: boolean;
|
|
101
|
-
/** Client input device information */
|
|
102
|
-
_clientInput: ClientInputInterface;
|
|
103
|
-
/** Client output device information */
|
|
104
|
-
_clientOutput: ClientOutputInterface;
|
|
105
|
-
private _menuEmpty$;
|
|
106
|
-
_isMenuEmpty$: Observable<boolean>;
|
|
107
|
-
/** Only the direct descendant menu items. */
|
|
108
|
-
private _directDescendantItems;
|
|
109
|
-
private _keyManager;
|
|
110
|
-
/** Subscription to tab events on the menu panel */
|
|
111
|
-
private _tabSubscription;
|
|
112
|
-
private _xPosition;
|
|
113
|
-
private _yPosition;
|
|
114
|
-
/** Current state of the panel animation. */
|
|
115
|
-
set _panelAnimationState(state: TransformMenuStates);
|
|
116
|
-
/**
|
|
117
|
-
* Current horizontal offset. Used with `pan` and `pan-hidden`
|
|
118
|
-
* animation states.
|
|
119
|
-
*/
|
|
120
|
-
private xOffset;
|
|
121
|
-
constructor(_changeDetectorRef: ChangeDetectorRef);
|
|
122
|
-
ngAfterContentChecked(): void;
|
|
123
|
-
ngAfterContentInit(): void;
|
|
124
|
-
ngOnDestroy(): void;
|
|
125
|
-
/**
|
|
126
|
-
* Stream that combines the `_hovered` observables of all the menu's items
|
|
127
|
-
* into a single observable. Emits whenever the hovered menu item changes.
|
|
128
|
-
*/
|
|
129
|
-
_hovered(): Observable<GraniteMenuItemComponent>;
|
|
130
|
-
/** Handle a keyboard event from the menu, delegating to the appropriate action. */
|
|
131
|
-
_handleKeydown(event: KeyboardEvent): void;
|
|
132
|
-
/**
|
|
133
|
-
* Focus the first item in the menu.
|
|
134
|
-
* @param origin Action from which the focus originated. Used to set the correct styling.
|
|
135
|
-
*/
|
|
136
|
-
focusFirstItem(origin?: FocusOrigin): void;
|
|
137
|
-
/** Updates the `showTitle` property for touch device UI */
|
|
138
|
-
_updateShowTitle(): void;
|
|
139
|
-
/** Starts the enter animation */
|
|
140
|
-
_startAnimation(): void;
|
|
141
|
-
/** Resets the panel animation to its initial state. */
|
|
142
|
-
_resetAnimation(): void;
|
|
143
|
-
/**
|
|
144
|
-
* Starts the 'below' animation, moving a menu down, out of view below the
|
|
145
|
-
* viewport. Used to close the whole menu, for example when clicking
|
|
146
|
-
* the backdrop.
|
|
147
|
-
*/
|
|
148
|
-
_startTouchCloseDownAnimation(): void;
|
|
149
|
-
/**
|
|
150
|
-
* Starts the 'below-with-delay' animation, moving a menu down, out of view below the
|
|
151
|
-
* viewport. Used to close the whole menu as a response to the user tapping
|
|
152
|
-
* a menu item. There is a short delay before the animation starts, to that
|
|
153
|
-
* the user gets a visual feedback on what item was selected.
|
|
154
|
-
*/
|
|
155
|
-
_startTouchCloseDownAnimationWithDelay(): void;
|
|
156
|
-
/**
|
|
157
|
-
* Starts the 'void' animation, moving a (sub) menu out of view to the side
|
|
158
|
-
* of the viewport. Used when going "back" from a sub menu.
|
|
159
|
-
*/
|
|
160
|
-
_startTouchCloseSideAnimation(): void;
|
|
161
|
-
/**
|
|
162
|
-
* Starts the enter-from-below animation, moving a (root) menu into view,
|
|
163
|
-
* Animates upwards from a starting position below the viewport.
|
|
164
|
-
*/
|
|
165
|
-
_startTouchRootEnterAnimation(): void;
|
|
166
|
-
/** Starts the enter animation, moving a (sub) menu into view. */
|
|
167
|
-
_startTouchSubmenuEnterAnimation(): void;
|
|
168
|
-
/**
|
|
169
|
-
* Starts the pan animation, to position a submenu in a response
|
|
170
|
-
* to user dragging sideways (panning).
|
|
171
|
-
*/
|
|
172
|
-
_startTouchPanAnimation(xOffset: number): void;
|
|
173
|
-
/**
|
|
174
|
-
* Starts the pan-hidden animation, to position a parent menu next to an
|
|
175
|
-
* active submenu that the user is dragging sideways (panning).
|
|
176
|
-
*/
|
|
177
|
-
_startTouchHidePanAnimation(xOffset: number): void;
|
|
178
|
-
/**
|
|
179
|
-
* Starts the hide animation, to make a parent menu slide out to leave
|
|
180
|
-
* space for a submenu.
|
|
181
|
-
*/
|
|
182
|
-
_startTouchHideAnimation(): void;
|
|
183
|
-
/** Callback that is invoked when the panel animation completes. */
|
|
184
|
-
_onAnimationDone(event: AnimationEvent): void;
|
|
185
|
-
_onAnimationStart(event: AnimationEvent): void;
|
|
186
|
-
/**
|
|
187
|
-
* Handle click on the menu by emitting on the `closed` emitter
|
|
188
|
-
* with a `click` reason
|
|
189
|
-
*/
|
|
190
|
-
_handleClick(event?: Event): void;
|
|
191
|
-
/**
|
|
192
|
-
* Handle click on the close button by emitting on the `closed` emitter
|
|
193
|
-
* without any particular reason
|
|
194
|
-
*/
|
|
195
|
-
_handleCloseClick(): void;
|
|
196
|
-
/**
|
|
197
|
-
* Handle click on the back icon by emitting on the `clicked` emitter
|
|
198
|
-
*/
|
|
199
|
-
_handleBackClick(e: MouseEvent): void;
|
|
200
|
-
/**
|
|
201
|
-
* Update client device information for the menu and its menu items.
|
|
202
|
-
*/
|
|
203
|
-
_setDevice(clientInput: ClientInputInterface, clientOutput: ClientOutputInterface): void;
|
|
204
|
-
/**
|
|
205
|
-
* Resets the active item in the menu. This is used when the menu is opened, allowing
|
|
206
|
-
* the user to start from the first option when pressing the down arrow.
|
|
207
|
-
*/
|
|
208
|
-
resetActiveItem(): void;
|
|
209
|
-
/**
|
|
210
|
-
* Sets up a stream that will keep track of any newly-added menu items and will update the list
|
|
211
|
-
* of direct descendants. We collect the descendants this way, because `_allItems` can include
|
|
212
|
-
* items that are part of child menus, and using a custom way of registering items is unreliable
|
|
213
|
-
* when it comes to maintaining the item order.
|
|
214
|
-
*/
|
|
215
|
-
private _updateDirectDescendants;
|
|
216
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<_MenuBaseComponent, never>;
|
|
217
|
-
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>;
|
|
218
|
-
}
|
|
219
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Directive to mark an element as a custom template area within a menu.
|
|
5
|
-
* This allows inserting custom content (dropdowns, inputs, etc.) anywhere
|
|
6
|
-
* within the menu, maintaining the natural DOM order.
|
|
7
|
-
*/
|
|
8
|
-
export declare class GraniteMenuCustomTemplateDirective {
|
|
9
|
-
private _elementRef;
|
|
10
|
-
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
11
|
-
_handleEvent(event: Event): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteMenuCustomTemplateDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteMenuCustomTemplateDirective, "[graniteMenuCustomTemplate]", ["graniteMenuCustomTemplate"], {}, {}, never, never, false, never>;
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
2
|
-
/**
|
|
3
|
-
* Animations used by the `granite-menu` component, showing the desktop interface.
|
|
4
|
-
* @docs-private
|
|
5
|
-
*/
|
|
6
|
-
export declare const graniteMenuDesktopAnimations: {
|
|
7
|
-
/**
|
|
8
|
-
* This animation trigger controls the menu panel's entry and exit from the
|
|
9
|
-
* stage on desktop output devices.
|
|
10
|
-
*/
|
|
11
|
-
readonly transformMenuDesktop: AnimationTriggerMetadata;
|
|
12
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Throws an exception for the case when menu trigger doesn't have a valid granite-menu instance
|
|
10
|
-
* @docs-private
|
|
11
|
-
*/
|
|
12
|
-
export declare function throwGraniteMenuMissingError(): void;
|
|
13
|
-
/**
|
|
14
|
-
* Throws an exception for the case when menu's x-position value isn't valid.
|
|
15
|
-
* In other words, it doesn't match 'before', 'after', or 'center'.
|
|
16
|
-
* @docs-private
|
|
17
|
-
*/
|
|
18
|
-
export declare function throwGraniteMenuInvalidPositionX(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Throws an exception for the case when menu's y-position value isn't valid.
|
|
21
|
-
* In other words, it doesn't match 'above', 'below', or 'center'.
|
|
22
|
-
* @docs-private
|
|
23
|
-
*/
|
|
24
|
-
export declare function throwGraniteMenuInvalidPositionY(): void;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { FocusableOption, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
-
import { ElementRef, OnDestroy } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { ClientInputInterface, ClientOutputInterface } from '../core/client-environment';
|
|
5
|
-
import { GraniteMenuPanelInterface } from './menu-panel';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class GraniteMenuItemComponent implements OnDestroy, FocusableOption {
|
|
8
|
-
private _elementRef;
|
|
9
|
-
private _focusMonitor;
|
|
10
|
-
_parentMenu?: GraniteMenuPanelInterface;
|
|
11
|
-
/** ARIA role for the menu item. */
|
|
12
|
-
role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox';
|
|
13
|
-
/** Stream that emits when the menu item is hovered. */
|
|
14
|
-
readonly _hovered: Subject<this>;
|
|
15
|
-
/** Stream that emits when the menu item is focused. */
|
|
16
|
-
readonly _focused: Subject<this>;
|
|
17
|
-
/** Whether the menu item acts as a trigger for a sub-menu (used for styling) */
|
|
18
|
-
_triggersSubmenu: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the menu item is highlighted, e.g. in the "breadcrumb" parent chain
|
|
21
|
-
* of sub menu trigger items
|
|
22
|
-
*/
|
|
23
|
-
_highlighted: boolean;
|
|
24
|
-
/** Client input device information */
|
|
25
|
-
_clientInput: ClientInputInterface;
|
|
26
|
-
/** Client output device information */
|
|
27
|
-
_clientOutput: ClientOutputInterface;
|
|
28
|
-
constructor(_elementRef: ElementRef<HTMLElement>, _focusMonitor: FocusMonitor, _parentMenu?: GraniteMenuPanelInterface);
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
/** Focuses the menu item. */
|
|
31
|
-
focus(origin?: FocusOrigin, options?: FocusOptions): void;
|
|
32
|
-
/** Returns the host DOM element. */
|
|
33
|
-
_getHostElement(): HTMLElement;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteMenuItemComponent, [null, null, { optional: true; }]>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteMenuItemComponent, "[graniteMenuItem]", ["graniteMenuItem"], { "role": { "alias": "role"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
36
|
-
}
|
package/lib/menu/menu-panel.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
-
import { Direction } from '@angular/cdk/bidi';
|
|
3
|
-
import { EventEmitter, InjectionToken, TemplateRef } from '@angular/core';
|
|
4
|
-
import { MenuPositionX, MenuPositionY } from './menu-positions';
|
|
5
|
-
/**
|
|
6
|
-
* Injection token used to provide the parent menu to menu-specific components.
|
|
7
|
-
* @docs-private
|
|
8
|
-
*/
|
|
9
|
-
export declare const GRANITE_MENU_PANEL: InjectionToken<GraniteMenuPanelInterface>;
|
|
10
|
-
export type ClosedEventType = void | 'click' | 'keydown' | 'tab';
|
|
11
|
-
export type OpenedEventType = void | 'click' | 'keydown';
|
|
12
|
-
export interface GraniteMenuPanelInterface {
|
|
13
|
-
xPosition: MenuPositionX;
|
|
14
|
-
yPosition: MenuPositionY;
|
|
15
|
-
templateRef: TemplateRef<any>;
|
|
16
|
-
parentMenu?: GraniteMenuPanelInterface | undefined;
|
|
17
|
-
direction?: Direction;
|
|
18
|
-
focusFirstItem: (origin?: FocusOrigin) => void;
|
|
19
|
-
closed: EventEmitter<ClosedEventType>;
|
|
20
|
-
opened: EventEmitter<OpenedEventType>;
|
|
21
|
-
readonly panelId?: string;
|
|
22
|
-
showBackButton: boolean;
|
|
23
|
-
}
|