@ifsworld/granite-components 16.1.0-beta.1 → 16.1.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.
@@ -1,8 +1,10 @@
1
1
  import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
2
- import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
3
3
  import * as i0 from "@angular/core";
4
- export declare class GraniteInputFieldComponent implements OnInit, OnChanges {
4
+ export declare class GraniteInputFieldComponent implements OnInit, OnChanges, AfterViewInit {
5
5
  private _focusMonitor;
6
+ private _cdr;
7
+ private _elementRef;
6
8
  id: string | null;
7
9
  name: string | null;
8
10
  type: string;
@@ -24,16 +26,19 @@ export declare class GraniteInputFieldComponent implements OnInit, OnChanges {
24
26
  _empty: boolean;
25
27
  _passwordFieldIcon: string;
26
28
  _passwordField: boolean;
29
+ _hasSuffixButton: boolean;
27
30
  _currentCharCount: number;
28
31
  private _passwordToggled;
29
32
  private _lastEmittedValue;
30
- constructor(_focusMonitor: FocusMonitor);
33
+ constructor(_focusMonitor: FocusMonitor, _cdr: ChangeDetectorRef, _elementRef: ElementRef);
31
34
  ngOnInit(): void;
32
35
  ngOnChanges(changes: SimpleChanges): void;
36
+ ngAfterViewInit(): void;
33
37
  focus(origin?: FocusOrigin, options?: FocusOptions): void;
34
38
  _togglePassword(): void;
35
39
  _onInput(event: Event): void;
36
40
  protected _validateType(): void;
41
+ private _checkForSuffixButton;
37
42
  private _applyCharacterCount;
38
43
  private _getInputElement;
39
44
  private _getTextareaElement;
@@ -8,6 +8,7 @@ import { GraniteMenuItemComponent } from './menu-item.component';
8
8
  import { ClosedEventType, OpenedEventType, GraniteMenuPanelInterface } from './menu-panel';
9
9
  import { MenuPositionX, MenuPositionY } from './menu-positions';
10
10
  import { GraniteMenuCustomTemplateDirective } from './menu-custom-template.directive';
11
+ import { ConnectedPosition } from '@angular/cdk/overlay';
11
12
  import * as i0 from "@angular/core";
12
13
  /** Menu panel animation states */
13
14
  type TransformMenuStates = 'void' | 'enter' | 'enter-from-below' | 'below-with-delay' | 'below' | 'pan' | 'hide' | 'pan-hidden';
@@ -32,6 +33,13 @@ export declare class _MenuBaseComponent implements AfterContentInit, OnDestroy,
32
33
  /** Position of the menu in the Y axis. */
33
34
  get yPosition(): MenuPositionY;
34
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[];
35
43
  /** Optional touch menu panel title */
36
44
  title: string;
37
45
  /**
@@ -206,6 +214,6 @@ export declare class _MenuBaseComponent implements AfterContentInit, OnDestroy,
206
214
  */
207
215
  private _updateDirectDescendants;
208
216
  static ɵfac: i0.ɵɵFactoryDeclaration<_MenuBaseComponent, never>;
209
- 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; }; "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>;
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>;
210
218
  }
211
219
  export {};
@@ -12,13 +12,13 @@
12
12
  export declare function throwGraniteMenuMissingError(): void;
13
13
  /**
14
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' or 'after'.
15
+ * In other words, it doesn't match 'before', 'after', or 'center'.
16
16
  * @docs-private
17
17
  */
18
18
  export declare function throwGraniteMenuInvalidPositionX(): void;
19
19
  /**
20
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' or 'below'.
21
+ * In other words, it doesn't match 'above', 'below', or 'center'.
22
22
  * @docs-private
23
23
  */
24
24
  export declare function throwGraniteMenuInvalidPositionY(): void;
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- export type MenuPositionX = 'before' | 'after';
9
- export type MenuPositionY = 'above' | 'below';
8
+ export type MenuPositionX = 'before' | 'after' | 'center';
9
+ export type MenuPositionY = 'above' | 'below' | 'center';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifsworld/granite-components",
3
- "version": "16.1.0-beta.1",
3
+ "version": "16.1.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": ">=19.2.3",
@@ -1,3 +1,4 @@
1
1
  export declare class GraniteTooltipConstants {
2
+ static readonly OFFSET_X: number;
2
3
  static readonly OFFSET_Y: number;
3
4
  }
@@ -32,6 +32,8 @@ export declare class GraniteTooltipTriggerForDirective implements OnDestroy, OnI
32
32
  private _attachOverlay;
33
33
  private _detachOverlay;
34
34
  private _getTriggerElement;
35
+ private _createPositionPair;
36
+ private _getTooltipPositions;
35
37
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteTooltipTriggerForDirective, never>;
36
38
  static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteTooltipTriggerForDirective, "[graniteTooltipTriggerFor]", never, { "tooltip": { "alias": "graniteTooltipTriggerFor"; "required": false; }; "hideDelay": { "alias": "hideDelay"; "required": false; }; "showDelay": { "alias": "showDelay"; "required": false; }; "showOnKeyboardFocus": { "alias": "showOnKeyboardFocus"; "required": false; }; "showOnClick": { "alias": "showOnClick"; "required": false; }; }, {}, never, never, false, never>;
37
39
  }