@evotor-dev/ui-kit 6.17.0 → 6.17.2
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/bundles/evotor-dev-ui-kit.umd.js +1233 -277
- package/bundles/evotor-dev-ui-kit.umd.js.map +1 -1
- package/esm2015/lib/components/evo-navigation-tabs/evo-navigation-tab.directive.js +52 -0
- package/esm2015/lib/components/evo-navigation-tabs/evo-navigation-tabs.component.js +112 -0
- package/esm2015/lib/components/evo-navigation-tabs/evo-navigation-tabs.module.js +20 -0
- package/esm2015/lib/components/evo-navigation-tabs/index.js +2 -0
- package/esm2015/lib/components/evo-navigation-tabs/public-api.js +5 -0
- package/esm2015/lib/components/evo-navigation-tabs/types/evo-navigation-tabs-size.js +2 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-arrow-size.js +3 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-config.js +5 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-connected-position.js +100 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-default-positions-order.js +16 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-fadein.animation.js +8 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-offset.js +3 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-priority-positions-order.js +8 -0
- package/esm2015/lib/components/evo-tooltip/constants/evo-tooltip-radius.js +3 -0
- package/esm2015/lib/components/evo-tooltip/directives/evo-tooltip.directive.js +98 -0
- package/esm2015/lib/components/evo-tooltip/enums/evo-tooltip-position.js +16 -0
- package/esm2015/lib/components/evo-tooltip/enums/evo-tooltip-variable-arrow-position.js +6 -0
- package/esm2015/lib/components/evo-tooltip/evo-tooltip.component.js +102 -0
- package/esm2015/lib/components/evo-tooltip/evo-tooltip.module.js +20 -0
- package/esm2015/lib/components/evo-tooltip/index.js +2 -0
- package/esm2015/lib/components/evo-tooltip/interfaces/evo-tooltip-config.js +2 -0
- package/esm2015/lib/components/evo-tooltip/interfaces/evo-tooltip-styles.js +2 -0
- package/esm2015/lib/components/evo-tooltip/public-api.js +3 -0
- package/esm2015/lib/components/evo-tooltip/services/evo-tooltip.service.js +180 -0
- package/esm2015/lib/components/evo-tooltip/types/evo-tooltip-position-type.js +2 -0
- package/esm2015/lib/services/mutation-observer.service.js +59 -0
- package/esm2015/lib/services/router-link-active.service.js +41 -0
- package/esm2015/lib/utils/observables/zone-free.js +64 -0
- package/esm2015/lib/utils/tokens/animation-frame.js +27 -0
- package/esm2015/public_api.js +3 -1
- package/fesm2015/evotor-dev-ui-kit.js +918 -57
- package/fesm2015/evotor-dev-ui-kit.js.map +1 -1
- package/lib/components/evo-navigation-tabs/evo-navigation-tab.directive.d.ts +19 -0
- package/lib/components/evo-navigation-tabs/evo-navigation-tabs.component.d.ts +32 -0
- package/lib/components/evo-navigation-tabs/evo-navigation-tabs.module.d.ts +10 -0
- package/lib/components/evo-navigation-tabs/index.d.ts +1 -0
- package/lib/components/evo-navigation-tabs/public-api.d.ts +4 -0
- package/lib/components/evo-navigation-tabs/types/evo-navigation-tabs-size.d.ts +1 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-arrow-size.d.ts +1 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-config.d.ts +2 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-connected-position.d.ts +16 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-default-positions-order.d.ts +2 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-fadein.animation.d.ts +1 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-offset.d.ts +1 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-priority-positions-order.d.ts +4 -0
- package/lib/components/evo-tooltip/constants/evo-tooltip-radius.d.ts +1 -0
- package/lib/components/evo-tooltip/directives/evo-tooltip.directive.d.ts +31 -0
- package/lib/components/evo-tooltip/enums/evo-tooltip-position.d.ts +14 -0
- package/lib/components/evo-tooltip/enums/evo-tooltip-variable-arrow-position.d.ts +4 -0
- package/lib/components/evo-tooltip/evo-tooltip.component.d.ts +26 -0
- package/lib/components/evo-tooltip/evo-tooltip.module.d.ts +10 -0
- package/lib/components/evo-tooltip/index.d.ts +1 -0
- package/lib/components/evo-tooltip/interfaces/evo-tooltip-config.d.ts +4 -0
- package/lib/components/evo-tooltip/interfaces/evo-tooltip-styles.d.ts +4 -0
- package/lib/components/evo-tooltip/public-api.d.ts +2 -0
- package/lib/components/evo-tooltip/services/evo-tooltip.service.d.ts +50 -0
- package/lib/components/evo-tooltip/types/evo-tooltip-position-type.d.ts +2 -0
- package/lib/services/mutation-observer.service.d.ts +34 -0
- package/lib/services/router-link-active.service.d.ts +16 -0
- package/lib/utils/observables/zone-free.d.ts +54 -0
- package/lib/utils/tokens/animation-frame.d.ts +10 -0
- package/package.json +1 -1
- package/public_api.d.ts +2 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { RouterLinkActive } from '@angular/router';
|
|
3
|
+
import { RouterLinkActiveService } from '../../services/router-link-active.service';
|
|
4
|
+
import { MutationObserverService } from '../../services/mutation-observer.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare const EVO_TAB_ACTIVATE = "evo-tab-activate";
|
|
7
|
+
export declare class EvoNavigationTabDirective implements OnDestroy {
|
|
8
|
+
private readonly el;
|
|
9
|
+
private readonly routerLinkActiveService;
|
|
10
|
+
private readonly rla;
|
|
11
|
+
private readonly mutation;
|
|
12
|
+
tabClass: boolean;
|
|
13
|
+
private readonly destroy$;
|
|
14
|
+
constructor(el: ElementRef, routerLinkActiveService: RouterLinkActiveService, rla: RouterLinkActive, mutation: MutationObserverService);
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
private initSubscriptions;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoNavigationTabDirective, [null, null, { optional: true; }, { optional: true; }]>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EvoNavigationTabDirective, "button[evoNavigationTab]:not([routerLink]), button[evoNavigationTab][routerLink][routerLinkActive]", never, {}, {}, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AfterViewChecked, AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { EvoNavigationTabsSize } from './types/evo-navigation-tabs-size';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EvoNavigationTabsComponent implements AfterViewInit, AfterViewChecked, OnDestroy {
|
|
5
|
+
private readonly el;
|
|
6
|
+
tabs: {
|
|
7
|
+
label: string;
|
|
8
|
+
link?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
size: EvoNavigationTabsSize;
|
|
12
|
+
set setActiveIndex(index: number);
|
|
13
|
+
set setDisabled(disabled: boolean);
|
|
14
|
+
activeItemIndexChange: EventEmitter<number>;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
private activeIndex;
|
|
17
|
+
private readonly disabledSubject$;
|
|
18
|
+
private readonly nextRenderSubject$;
|
|
19
|
+
private readonly destroy$;
|
|
20
|
+
constructor(el: ElementRef);
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
ngAfterViewChecked(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
onActivate(event: Event, element: HTMLButtonElement): void;
|
|
25
|
+
private get tabsList();
|
|
26
|
+
private get activeElement();
|
|
27
|
+
private markTabAsActive;
|
|
28
|
+
private markTabAsDisabled;
|
|
29
|
+
private initSubscriptions;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoNavigationTabsComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EvoNavigationTabsComponent, "evo-navigation-tabs", never, { "tabs": "tabs"; "size": "size"; "setActiveIndex": "activeIndex"; "setDisabled": "disabled"; }, { "activeItemIndexChange": "activeItemIndexChange"; }, never, ["[position=start]", "*"]>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./evo-navigation-tabs.component";
|
|
3
|
+
import * as i2 from "./evo-navigation-tab.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/router";
|
|
6
|
+
export declare class EvoNavigationTabsModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoNavigationTabsModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EvoNavigationTabsModule, [typeof i1.EvoNavigationTabsComponent, typeof i2.EvoNavigationTabDirective], [typeof i3.CommonModule, typeof i4.RouterModule], [typeof i1.EvoNavigationTabsComponent, typeof i2.EvoNavigationTabDirective]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EvoNavigationTabsModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type EvoNavigationTabsSize = 'small' | 'normal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVO_TOOLTIP_ARROW_SIZE = 16;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
|
+
import { EvoTooltipPosition } from '../enums/evo-tooltip-position';
|
|
3
|
+
export declare const EVO_CONNECTED_POSITION: (offset: number) => {
|
|
4
|
+
"top-start": ConnectedPosition;
|
|
5
|
+
top: ConnectedPosition;
|
|
6
|
+
"top-end": ConnectedPosition;
|
|
7
|
+
"bottom-start": ConnectedPosition;
|
|
8
|
+
bottom: ConnectedPosition;
|
|
9
|
+
"bottom-end": ConnectedPosition;
|
|
10
|
+
"right-start": ConnectedPosition;
|
|
11
|
+
right: ConnectedPosition;
|
|
12
|
+
"right-end": ConnectedPosition;
|
|
13
|
+
"left-start": ConnectedPosition;
|
|
14
|
+
left: ConnectedPosition;
|
|
15
|
+
"left-end": ConnectedPosition;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVO_TOOLTIP_FADEIN_ANIMATION: import("@angular/animations").AnimationTriggerMetadata;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVO_TOOLTIP_OFFSET: (hasArrow: boolean) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVO_TOOLTIP_RADIUS = 8;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { EvoTooltipService } from '../services/evo-tooltip.service';
|
|
4
|
+
import { EvoTooltipPositionType } from '../types/evo-tooltip-position-type';
|
|
5
|
+
import { EvoTooltipConfig } from '../interfaces/evo-tooltip-config';
|
|
6
|
+
import { EvoTooltipStyles } from '../interfaces/evo-tooltip-styles';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class EvoTooltipDirective implements OnInit, OnDestroy {
|
|
9
|
+
private readonly elementRef;
|
|
10
|
+
private readonly tooltipService;
|
|
11
|
+
content: string | TemplateRef<HTMLElement>;
|
|
12
|
+
position: EvoTooltipPositionType | string;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
config: Partial<EvoTooltipConfig>;
|
|
15
|
+
set evoTooltipVisibleArrow(visibleArrow: boolean);
|
|
16
|
+
set evoTooltipStyles(tooltipStyles: EvoTooltipStyles);
|
|
17
|
+
set evoTooltipClass(tooltipClass: string | string[]);
|
|
18
|
+
evoTooltipOpen: EventEmitter<void>;
|
|
19
|
+
evoTooltipClose: EventEmitter<void>;
|
|
20
|
+
get hostClasses(): string[];
|
|
21
|
+
readonly isOpen$: Observable<boolean>;
|
|
22
|
+
private readonly destroy$;
|
|
23
|
+
constructor(elementRef: ElementRef, tooltipService: EvoTooltipService);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
hide(): void;
|
|
27
|
+
show(event?: MouseEvent): void;
|
|
28
|
+
private initSubscriptions;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoTooltipDirective, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EvoTooltipDirective, "[evoTooltip]", ["evoTooltip"], { "content": "evoTooltip"; "position": "evoTooltipPosition"; "disabled": "evoTooltipDisabled"; "config": "evoTooltipConfig"; "evoTooltipVisibleArrow": "evoTooltipVisibleArrow"; "evoTooltipStyles": "evoTooltipStyles"; "evoTooltipClass": "evoTooltipClass"; }, { "evoTooltipOpen": "evoTooltipOpen"; "evoTooltipClose": "evoTooltipClose"; }, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum EvoTooltipPosition {
|
|
2
|
+
TOP_START = "top-start",
|
|
3
|
+
TOP = "top",
|
|
4
|
+
TOP_END = "top-end",
|
|
5
|
+
BOTTOM_START = "bottom-start",
|
|
6
|
+
BOTTOM = "bottom",
|
|
7
|
+
BOTTOM_END = "bottom-end",
|
|
8
|
+
RIGHT_START = "right-start",
|
|
9
|
+
RIGHT = "right",
|
|
10
|
+
RIGHT_END = "right-end",
|
|
11
|
+
LEFT_START = "left-start",
|
|
12
|
+
LEFT = "left",
|
|
13
|
+
LEFT_END = "left-end"
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { EvoTooltipService } from './services/evo-tooltip.service';
|
|
4
|
+
import { EvoTooltipStyles } from './interfaces/evo-tooltip-styles';
|
|
5
|
+
import { EvoTooltipPosition } from './enums/evo-tooltip-position';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class EvoTooltipComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
8
|
+
private readonly elementRef;
|
|
9
|
+
private readonly tooltipService;
|
|
10
|
+
private readonly renderer;
|
|
11
|
+
readonly position$: Observable<EvoTooltipPosition>;
|
|
12
|
+
readonly stringContent$: Observable<string>;
|
|
13
|
+
readonly templateContent$: Observable<TemplateRef<unknown>>;
|
|
14
|
+
readonly visibleArrow$: Observable<boolean>;
|
|
15
|
+
readonly styles$: Observable<EvoTooltipStyles>;
|
|
16
|
+
fadeIn: boolean;
|
|
17
|
+
private readonly _positionArrowStyles$;
|
|
18
|
+
private readonly _destroy$;
|
|
19
|
+
constructor(elementRef: ElementRef, tooltipService: EvoTooltipService, renderer: Renderer2);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
private setArrowPosition;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoTooltipComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EvoTooltipComponent, "evo-tooltip", never, {}, {}, never, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./evo-tooltip.component";
|
|
3
|
+
import * as i2 from "./directives/evo-tooltip.directive";
|
|
4
|
+
import * as i3 from "@angular/cdk/overlay";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
export declare class EvoTooltipModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoTooltipModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EvoTooltipModule, [typeof i1.EvoTooltipComponent, typeof i2.EvoTooltipDirective], [typeof i3.OverlayModule, typeof i4.CommonModule], [typeof i2.EvoTooltipDirective]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EvoTooltipModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ElementRef, Injector, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Overlay, OverlayPositionBuilder } from '@angular/cdk/overlay';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { EvoTooltipConfig } from '../interfaces/evo-tooltip-config';
|
|
5
|
+
import { EvoTooltipPosition } from '../enums/evo-tooltip-position';
|
|
6
|
+
import { EvoTooltipStyles } from '../interfaces/evo-tooltip-styles';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class EvoTooltipService {
|
|
9
|
+
private readonly overlay;
|
|
10
|
+
private readonly overlayPositionBuilder;
|
|
11
|
+
private readonly injector;
|
|
12
|
+
readonly stringContent$: Observable<string | null>;
|
|
13
|
+
readonly templateContent$: Observable<TemplateRef<HTMLElement> | null>;
|
|
14
|
+
readonly position$: Observable<EvoTooltipPosition>;
|
|
15
|
+
readonly parentRef$: Observable<ElementRef>;
|
|
16
|
+
readonly tooltipClasses$: Observable<string[]>;
|
|
17
|
+
readonly styles$: Observable<EvoTooltipStyles>;
|
|
18
|
+
readonly visibleArrow$: Observable<boolean>;
|
|
19
|
+
readonly isOpen$: Observable<boolean>;
|
|
20
|
+
private readonly _stringContent$;
|
|
21
|
+
private readonly _templateContent$;
|
|
22
|
+
private readonly _position$;
|
|
23
|
+
private readonly _parentRef$;
|
|
24
|
+
private readonly _tooltipClasses$;
|
|
25
|
+
private readonly _config$;
|
|
26
|
+
private readonly _styles$;
|
|
27
|
+
private readonly _visibleArrow$;
|
|
28
|
+
private readonly _isOpen$;
|
|
29
|
+
private overlayRef;
|
|
30
|
+
private positionStrategy;
|
|
31
|
+
private tooltipComponentRef;
|
|
32
|
+
private targetElement;
|
|
33
|
+
constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, injector: Injector);
|
|
34
|
+
showTooltip(parentRef: ElementRef, content: string | TemplateRef<HTMLElement>, position: EvoTooltipPosition, config: EvoTooltipConfig, targetElement?: EventTarget | null): void;
|
|
35
|
+
hideTooltip(): void;
|
|
36
|
+
setArrowVisibility(hasArrow: boolean): void;
|
|
37
|
+
setTooltipStyles(tooltipStyles: EvoTooltipStyles): void;
|
|
38
|
+
setTooltipClass(tooltipClassOrClasses: string | string[]): void;
|
|
39
|
+
get hasAttached(): boolean;
|
|
40
|
+
get config(): EvoTooltipConfig;
|
|
41
|
+
private get parentRef();
|
|
42
|
+
private setContent;
|
|
43
|
+
private createOverlay;
|
|
44
|
+
private createPortal;
|
|
45
|
+
private initSubscriptions;
|
|
46
|
+
private getPositions;
|
|
47
|
+
private getPositionsOrder;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvoTooltipService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EvoTooltipService>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Безопасная обёртка над `MutationObserver`, которая гарантирует,
|
|
5
|
+
* что код не упадёт в средах, где `MutationObserver` недоступен
|
|
6
|
+
* (например, серверный рендеринг или тесты без DOM).
|
|
7
|
+
*
|
|
8
|
+
* Если `MutationObserver` существует — используется он.
|
|
9
|
+
* Если нет — используется заглушка с пустыми методами.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SafeObserver: {
|
|
12
|
+
new (callback: MutationCallback): MutationObserver;
|
|
13
|
+
prototype: MutationObserver;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Сервис `MutationObserverService` предоставляет поток `Observable<MutationRecord[]>`,
|
|
17
|
+
* который эмитит записи изменений DOM для текущего элемента (`ElementRef`).
|
|
18
|
+
*
|
|
19
|
+
* Наблюдает за изменениями потомков, текстового содержимого и вложенных структур (`subtree: true`).
|
|
20
|
+
*
|
|
21
|
+
* Используется `SafeObserver`, чтобы гарантировать совместимость с SSR и тестовой средой.
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ Важно: требует, чтобы `ElementRef` был доступен через DI-контекст (т.е. работает в компонентах/директивах).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* this.mutationObserverService.subscribe(records => {
|
|
27
|
+
* console.log('Mutation detected!', records);
|
|
28
|
+
* });
|
|
29
|
+
*/
|
|
30
|
+
export declare class MutationObserverService extends Observable<readonly MutationRecord[]> {
|
|
31
|
+
constructor();
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MutationObserverService, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MutationObserverService>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { RouterLinkActive } from '@angular/router';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Сервис создает поток, отслеживающий состояние активности
|
|
7
|
+
* `RouterLinkActive` в реальном времени с использованием `requestAnimationFrame`.
|
|
8
|
+
*
|
|
9
|
+
* Наследуется от `Observable<boolean>` и эмитит `true` или `false`, когда состояние `isActive`
|
|
10
|
+
* меняется. Если `RouterLinkActive` не передан — поток будет пустым (`EMPTY`).
|
|
11
|
+
*/
|
|
12
|
+
export declare class RouterLinkActiveService extends Observable<boolean> {
|
|
13
|
+
constructor(routerLinkActive: RouterLinkActive | null, ngZone: NgZone, animationFrame$: Observable<number>);
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkActiveService, [{ optional: true; }, null, null]>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RouterLinkActiveService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Кратко:
|
|
5
|
+
* 🔥 evoZonefull — тащит всё в Angular-зону.
|
|
6
|
+
* 🧊 evoZonefree — игнорирует Angular-зону, экономит CD.
|
|
7
|
+
* ⚖️ evoZoneOptimized — как утро с кофе: просыпаешься вовремя и не дергаешь лишний раз change detection.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Оператор `evoZonefull` обеспечивает полное выполнение потока внутри зоны Angular.
|
|
11
|
+
*
|
|
12
|
+
* Все `next`, `error` и `complete` вызовы оборачиваются в `NgZone.run`, чтобы гарантировать
|
|
13
|
+
* корректный запуск change detection.
|
|
14
|
+
*
|
|
15
|
+
* Используй, если поток формируется вне зоны или ты не уверен, что Angular узнает об изменениях.
|
|
16
|
+
*
|
|
17
|
+
* @param zone Сервис `NgZone` из Angular DI.
|
|
18
|
+
* @returns Оператор, оборачивающий поток в `NgZone.run()`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* source$.pipe(evoZonefull(this.ngZone)).subscribe(...);
|
|
22
|
+
*/
|
|
23
|
+
export declare function evoZonefull<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Оператор `evoZonefree` исполняет весь поток вне зоны Angular.
|
|
26
|
+
*
|
|
27
|
+
* Это помогает избежать лишних срабатываний change detection и повысить производительность,
|
|
28
|
+
* особенно для часто испускаемых потоков (например, `scroll`, `animationFrame`, таймеры).
|
|
29
|
+
*
|
|
30
|
+
* Используй, если тебе не нужно обновлять Angular view внутри этого потока.
|
|
31
|
+
*
|
|
32
|
+
* @param zone Сервис `NgZone` из Angular DI.
|
|
33
|
+
* @returns Оператор, исполняющий подписку вне Angular-зоны.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* source$.pipe(evoZonefree(this.ngZone)).subscribe(...);
|
|
37
|
+
*/
|
|
38
|
+
export declare function evoZonefree<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Оператор `evoZoneOptimized` — комбо из `evoZonefree` и `evoZonefull`.
|
|
41
|
+
*
|
|
42
|
+
* Сначала поток исполняется вне Angular-зоны (`runOutsideAngular`), чтобы избежать лишнего
|
|
43
|
+
* change detection. Но события `next`, `error` и `complete` всё равно возвращаются в Angular-зону.
|
|
44
|
+
*
|
|
45
|
+
* Это идеальный баланс, если тебе нужен быстрый поток без лишнего CD, но ты всё равно хочешь,
|
|
46
|
+
* чтобы Angular знал о результатах.
|
|
47
|
+
*
|
|
48
|
+
* @param zone Сервис `NgZone` из Angular DI.
|
|
49
|
+
* @returns Оператор, оптимизированный по производительности.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* source$.pipe(evoZoneOptimized(this.ngZone)).subscribe(...);
|
|
53
|
+
*/
|
|
54
|
+
export declare function evoZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Токен `ANIMATION_FRAME` предоставляет поток значений времени из `requestAnimationFrame`,
|
|
5
|
+
* испускаемый каждый кадр анимации.
|
|
6
|
+
*
|
|
7
|
+
* Может быть полезен для задач, которые требуют частого обновления, например, отслеживания
|
|
8
|
+
* активности или плавной анимации в UI.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ANIMATION_FRAME: InjectionToken<Observable<number>>;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ export * from './lib/components/evo-upload/index';
|
|
|
51
51
|
export * from './lib/components/evo-dropdown/index';
|
|
52
52
|
export * from './lib/components/evo-navbar/index';
|
|
53
53
|
export * from './lib/components/evo-navigation-button/index';
|
|
54
|
+
export * from './lib/components/evo-tooltip/index';
|
|
55
|
+
export * from './lib/components/evo-navigation-tabs/index';
|
|
54
56
|
export * from './lib/pipes/index';
|
|
55
57
|
export * from './lib/services/index';
|
|
56
58
|
export * from './lib/components/evo-portal/index';
|