@ifsworld/granite-components 11.2.0 → 11.4.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/index.d.ts CHANGED
@@ -46,6 +46,7 @@ export * from './lib/core/devices/client-output-desktop.directive';
46
46
  export * from './lib/core/devices/client-input-touch.directive';
47
47
  export * from './lib/core/devices/client-input-desktop.directive';
48
48
  export * from './lib/core/common-behaviors/disabled';
49
+ export * from './lib/core/hide-on-overflow.directive';
49
50
  export * from './lib/core/pipes/pure-pipes.module';
50
51
  export * from './lib/core/pipes/title.pipe';
51
52
  export * from './lib/core/types';
@@ -3,8 +3,9 @@ import * as i1 from "./devices/client-output-desktop.directive";
3
3
  import * as i2 from "./devices/client-output-touch.directive";
4
4
  import * as i3 from "./devices/client-input-desktop.directive";
5
5
  import * as i4 from "./devices/client-input-touch.directive";
6
+ import * as i5 from "./hide-on-overflow.directive";
6
7
  export declare class GraniteCoreModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteCoreModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteCoreModule, [typeof i1.ClientOutputDesktopDirective, typeof i2.ClientOutputTouchDirective, typeof i3.ClientInputDesktopDirective, typeof i4.ClientInputTouchDirective], never, [typeof i1.ClientOutputDesktopDirective, typeof i2.ClientOutputTouchDirective, typeof i3.ClientInputDesktopDirective, typeof i4.ClientInputTouchDirective]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteCoreModule, [typeof i1.ClientOutputDesktopDirective, typeof i2.ClientOutputTouchDirective, typeof i3.ClientInputDesktopDirective, typeof i4.ClientInputTouchDirective, typeof i5.GraniteHideOnOverflowDirective], never, [typeof i1.ClientOutputDesktopDirective, typeof i2.ClientOutputTouchDirective, typeof i3.ClientInputDesktopDirective, typeof i4.ClientInputTouchDirective, typeof i5.GraniteHideOnOverflowDirective]>;
9
10
  static ɵinj: i0.ɵɵInjectorDeclaration<GraniteCoreModule>;
10
11
  }
@@ -0,0 +1,21 @@
1
+ import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class GraniteHideOnOverflowDirective implements AfterViewInit, OnDestroy {
5
+ private _elementRef;
6
+ private renderer;
7
+ resizeObserver: ResizeObserver;
8
+ resizeSubscription: Subscription;
9
+ mutationObserver: MutationObserver;
10
+ constructor(_elementRef: ElementRef, renderer: Renderer2);
11
+ ngAfterViewInit(): void;
12
+ ngOnDestroy(): void;
13
+ hideOnOverflow(): void;
14
+ observeResize(): void;
15
+ unObserveResize(): void;
16
+ subscribeToResize(): void;
17
+ observeContentChange(): void;
18
+ unObserveContentChange(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<GraniteHideOnOverflowDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteHideOnOverflowDirective, "[graniteHideOnOverflow]", ["graniteHideOnOverflow"], {}, {}, never, never, false, never>;
21
+ }
@@ -5,7 +5,7 @@ import { AnimationEvent } from '@angular/animations';
5
5
  import { BehaviorSubject, Observable, Subject } from 'rxjs';
6
6
  import { ClientInputInterface, ClientOutputInterface } from '../core/client-environment';
7
7
  import { GraniteMenuItemComponent } from './menu-item.component';
8
- import { ClosedEventType, GraniteMenuPanelInterface } from './menu-panel';
8
+ import { ClosedEventType, OpenedEventType, GraniteMenuPanelInterface } from './menu-panel';
9
9
  import { MenuPositionX, MenuPositionY } from './menu-positions';
10
10
  import * as i0 from "@angular/core";
11
11
  /** Menu panel animation states */
@@ -46,6 +46,10 @@ export declare class _MenuBaseComponent implements AfterContentInit, OnDestroy,
46
46
  * Event emitted when the menu is closed
47
47
  */
48
48
  readonly closed: EventEmitter<ClosedEventType>;
49
+ /**
50
+ * Event emitted when the menu is opened
51
+ */
52
+ readonly opened: EventEmitter<OpenedEventType>;
49
53
  /**
50
54
  * Used for locating the panel in tests and setting the aria-control attribute
51
55
  * for the menu trigger.
@@ -185,6 +189,6 @@ export declare class _MenuBaseComponent implements AfterContentInit, OnDestroy,
185
189
  */
186
190
  private _updateDirectDescendants;
187
191
  static ɵfac: i0.ɵɵFactoryDeclaration<_MenuBaseComponent, never>;
188
- static ɵdir: i0.ɵɵDirectiveDeclaration<_MenuBaseComponent, never, never, { "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "openOnHover": { "alias": "openOnHover"; "required": false; }; }, { "closed": "closed"; }, ["_allItems"], never, false, never>;
192
+ static ɵdir: i0.ɵɵDirectiveDeclaration<_MenuBaseComponent, never, never, { "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "openOnHover": { "alias": "openOnHover"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; }, ["_allItems"], never, false, never>;
189
193
  }
190
194
  export {};
@@ -8,6 +8,7 @@ import { MenuPositionX, MenuPositionY } from './menu-positions';
8
8
  */
9
9
  export declare const GRANITE_MENU_PANEL: InjectionToken<GraniteMenuPanelInterface>;
10
10
  export type ClosedEventType = void | 'click' | 'keydown' | 'tab';
11
+ export type OpenedEventType = void | 'click' | 'keydown';
11
12
  export interface GraniteMenuPanelInterface {
12
13
  xPosition: MenuPositionX;
13
14
  yPosition: MenuPositionY;
@@ -16,6 +17,7 @@ export interface GraniteMenuPanelInterface {
16
17
  direction?: Direction;
17
18
  focusFirstItem: (origin?: FocusOrigin) => void;
18
19
  closed: EventEmitter<ClosedEventType>;
20
+ opened: EventEmitter<OpenedEventType>;
19
21
  readonly panelId?: string;
20
22
  showBackButton: boolean;
21
23
  }
@@ -76,6 +76,8 @@ export declare class GraniteMenuTriggerForDirective implements AfterContentInit,
76
76
  isOpen(): boolean;
77
77
  /** Open the associated menu */
78
78
  openMenu(): void;
79
+ /** Emits an eventtype when the menu is opened */
80
+ openedEvent(): void;
79
81
  /** Whether the menu triggers a sub-menu or a top-level one. */
80
82
  triggersSubmenu(): boolean;
81
83
  /** Toggles the menu between the open and closed states. */
@@ -9,8 +9,8 @@ export declare class GraniteProgressBarComponent implements OnChanges {
9
9
  DEFAULT_COLOR: string;
10
10
  total: number;
11
11
  getBackgroundColor(): string;
12
- getStackColor(color: string): string;
13
12
  getFontColor(color: string): string;
13
+ getStackColor(color: string): string;
14
14
  getColorVar(color: string): string;
15
15
  getWidth(value: number): number;
16
16
  getStringOfWidth(width: number): string;
@@ -1,8 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./progress-bar.component";
3
3
  import * as i2 from "@angular/common";
4
+ import * as i3 from "../core/core.module";
5
+ import * as i4 from "@ifsworld/granite-components/tooltip";
4
6
  export declare class GraniteProgressBarModule {
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteProgressBarModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteProgressBarModule, [typeof i1.GraniteProgressBarComponent], [typeof i2.CommonModule], [typeof i1.GraniteProgressBarComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteProgressBarModule, [typeof i1.GraniteProgressBarComponent], [typeof i2.CommonModule, typeof i3.GraniteCoreModule, typeof i4.GraniteTooltipModule], [typeof i1.GraniteProgressBarComponent]>;
7
9
  static ɵinj: i0.ɵɵInjectorDeclaration<GraniteProgressBarModule>;
8
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifsworld/granite-components",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": ">=16.2.12",
@@ -35,17 +35,17 @@
35
35
  "esm": "./esm2022/date-picker/ifsworld-granite-components-date-picker.mjs",
36
36
  "default": "./fesm2022/ifsworld-granite-components-date-picker.mjs"
37
37
  },
38
- "./tooltip": {
39
- "types": "./tooltip/index.d.ts",
40
- "esm2022": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
41
- "esm": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
42
- "default": "./fesm2022/ifsworld-granite-components-tooltip.mjs"
43
- },
44
38
  "./table": {
45
39
  "types": "./table/index.d.ts",
46
40
  "esm2022": "./esm2022/table/ifsworld-granite-components-table.mjs",
47
41
  "esm": "./esm2022/table/ifsworld-granite-components-table.mjs",
48
42
  "default": "./fesm2022/ifsworld-granite-components-table.mjs"
43
+ },
44
+ "./tooltip": {
45
+ "types": "./tooltip/index.d.ts",
46
+ "esm2022": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
47
+ "esm": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
48
+ "default": "./fesm2022/ifsworld-granite-components-tooltip.mjs"
49
49
  }
50
50
  },
51
51
  "sideEffects": false