@recursyve/nice-ui-kit.v2 14.0.0-beta.107 → 14.0.0-beta.108

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.
@@ -0,0 +1,65 @@
1
+ import { ChangeDetectorRef, ElementRef, OnDestroy } from "@angular/core";
2
+ import { Observable } from "rxjs";
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class _HintComponentBase implements OnDestroy {
5
+ private _changeDetectorRef;
6
+ /** The timeout ID of any current timer set to show the tooltip */
7
+ private _showTimeoutId;
8
+ /** The timeout ID of any current timer set to hide the tooltip */
9
+ private _hideTimeoutId;
10
+ /** Element that caused the tooltip to open. */
11
+ _triggerElement: HTMLElement;
12
+ /** Amount of milliseconds to delay the closing sequence. */
13
+ _mouseLeaveHideDelay: number;
14
+ /** Reference to the internal tooltip element. */
15
+ abstract _hint: ElementRef<HTMLElement>;
16
+ /** Whether interactions on the page should close the tooltip */
17
+ private _closeOnInteraction;
18
+ /** Whether the tooltip is currently visible. */
19
+ private _isVisible;
20
+ /** Subject for notifying that the tooltip has been hidden from the view */
21
+ private readonly _onHide;
22
+ constructor(_changeDetectorRef: ChangeDetectorRef);
23
+ /**
24
+ * Shows the tooltip with an animation originating from the provided origin
25
+ * @param delay Amount of milliseconds to the delay showing the tooltip.
26
+ */
27
+ show(delay: number): void;
28
+ /**
29
+ * Begins the animation to hide the tooltip after the provided delay in ms.
30
+ * @param delay Amount of milliseconds to delay showing the tooltip.
31
+ */
32
+ hide(delay: number): void;
33
+ /** Returns an observable that notifies when the tooltip has been hidden from view. */
34
+ afterHidden(): Observable<void>;
35
+ /** Whether the tooltip is being displayed. */
36
+ isVisible(): boolean;
37
+ ngOnDestroy(): void;
38
+ /**
39
+ * Interactions on the HTML body should close the tooltip immediately as defined in the
40
+ * material design spec.
41
+ * https://material.io/design/components/tooltips.html#behavior
42
+ */
43
+ _handleBodyInteraction(): void;
44
+ /**
45
+ * Marks that the tooltip needs to be checked in the next change detection run.
46
+ * Mainly used for rendering the initial text before positioning a tooltip, which
47
+ * can be problematic in components with OnPush change detection.
48
+ */
49
+ _markForCheck(): void;
50
+ _handleMouseLeave({ relatedTarget }: MouseEvent): void;
51
+ /**
52
+ * Callback for when the timeout in this.show() gets completed.
53
+ * This method is only needed by the mdc-tooltip, and so it is only implemented
54
+ * in the mdc-tooltip, not here.
55
+ */
56
+ protected _onShow(): void;
57
+ /** Cancels any pending animation sequences. */
58
+ _cancelPendingAnimations(): void;
59
+ /** Handles the cleanup after an animation has finished. */
60
+ private _finalizeAnimation;
61
+ /** Toggles the visibility of the tooltip element. */
62
+ private _toggleVisibility;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<_HintComponentBase, never>;
64
+ static ɵdir: i0.ɵɵDirectiveDeclaration<_HintComponentBase, never, never, {}, {}, never, never, false>;
65
+ }
@@ -1,15 +1,18 @@
1
+ import { FocusMonitor } from "@angular/cdk/a11y";
1
2
  import { Overlay } from "@angular/cdk/overlay";
2
3
  import { Platform } from "@angular/cdk/platform";
3
4
  import { AfterViewInit, ElementRef, NgZone, OnDestroy, ViewContainerRef } from "@angular/core";
5
+ import { _HintComponentBase } from "../components/hint-component-base";
4
6
  import { NiceNavigationItem } from "../navigation.types";
5
7
  import { NiceNavigationHintService } from "../providers/hint.service";
6
8
  import * as i0 from "@angular/core";
7
- export declare class NiceShowHintDirective implements AfterViewInit, OnDestroy {
9
+ export declare class NiceShowHintDirective<T extends _HintComponentBase> implements AfterViewInit, OnDestroy {
8
10
  private _overlay;
9
11
  private _elementRef;
10
12
  private _viewContainerRef;
11
13
  private _ngZone;
12
14
  private _platform;
15
+ private _focusMonitor;
13
16
  private _hintService;
14
17
  shouldShow: boolean;
15
18
  item: NiceNavigationItem;
@@ -19,7 +22,7 @@ export declare class NiceShowHintDirective implements AfterViewInit, OnDestroy {
19
22
  private _overlayRef;
20
23
  private readonly _passiveListeners;
21
24
  private readonly unsubscribeAll$;
22
- constructor(_overlay: Overlay, _elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _ngZone: NgZone, _platform: Platform, _hintService: NiceNavigationHintService);
25
+ constructor(_overlay: Overlay, _elementRef: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _ngZone: NgZone, _platform: Platform, _focusMonitor: FocusMonitor, _hintService: NiceNavigationHintService);
23
26
  ngAfterViewInit(): void;
24
27
  ngOnDestroy(): void;
25
28
  show(): void;
@@ -31,6 +34,6 @@ export declare class NiceShowHintDirective implements AfterViewInit, OnDestroy {
31
34
  private _setupPointerExitEventsIfNeeded;
32
35
  private _platformSupportsMouseEvents;
33
36
  private _addListeners;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<NiceShowHintDirective, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<NiceShowHintDirective, "[niceShowHint]", never, { "shouldShow": "shouldShow"; "item": "item"; }, {}, never, never, false>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceShowHintDirective<any>, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NiceShowHintDirective<any>, "[niceShowHint]", never, { "shouldShow": "shouldShow"; "item": "item"; }, {}, never, never, false>;
36
39
  }
@@ -1,3 +1,4 @@
1
+ export * from "./components/hint-component-base";
1
2
  export * from "./horizontal/horizontal.component";
2
3
  export * from "./horizontal/components/basic/basic.component";
3
4
  export * from "./horizontal/components/branch/branch.component";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-ui-kit.v2",
3
- "version": "14.0.0-beta.107",
3
+ "version": "14.0.0-beta.108",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",