@ngrdt/tabs 0.0.3 → 0.0.18
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/fesm2022/ngrdt-tabs.mjs +22 -20
- package/fesm2022/ngrdt-tabs.mjs.map +1 -1
- package/index.d.ts +218 -8
- package/package.json +1 -3
- package/esm2022/index.mjs +0 -9
- package/esm2022/lib/components/tab/rdt-tab.component.mjs +0 -145
- package/esm2022/lib/components/tab-container/rdt-tab-container.component.mjs +0 -270
- package/esm2022/lib/directives/rdt-destroy-inactive.directive.mjs +0 -14
- package/esm2022/lib/directives/rdt-tab-controller.directive.mjs +0 -366
- package/esm2022/lib/rdt-tabs-models.mjs +0 -4
- package/esm2022/lib/rdt-tabs.module.mjs +0 -37
- package/esm2022/lib/strategies/auto-rdt-tabs-shortcut-strategy.mjs +0 -64
- package/esm2022/lib/strategies/rdt-tabs-shortcut-strategy.mjs +0 -3
- package/esm2022/lib/strategies/static-rdt-tabs-shortcut-strategy.mjs +0 -23
- package/esm2022/ngrdt-tabs.mjs +0 -5
- package/lib/components/tab/rdt-tab.component.d.ts +0 -38
- package/lib/components/tab-container/rdt-tab-container.component.d.ts +0 -52
- package/lib/directives/rdt-destroy-inactive.directive.d.ts +0 -7
- package/lib/directives/rdt-tab-controller.directive.d.ts +0 -87
- package/lib/rdt-tabs-models.d.ts +0 -11
- package/lib/rdt-tabs.module.d.ts +0 -11
- package/lib/strategies/auto-rdt-tabs-shortcut-strategy.d.ts +0 -11
- package/lib/strategies/rdt-tabs-shortcut-strategy.d.ts +0 -16
- package/lib/strategies/static-rdt-tabs-shortcut-strategy.d.ts +0 -12
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef, DestroyRef, ElementRef, EventEmitter, QueryList, Renderer2, TemplateRef } from '@angular/core';
|
|
2
|
-
import { RdtTabControllerDirective } from '../../directives/rdt-tab-controller.directive';
|
|
3
|
-
import { RdtTabContainerState } from '../../rdt-tabs-models';
|
|
4
|
-
import { RdtTabComponent } from '../tab/rdt-tab.component';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@ngrdt/core";
|
|
7
|
-
export declare class RdtTabContainerComponent implements AfterContentInit {
|
|
8
|
-
readonly destroyRef: DestroyRef;
|
|
9
|
-
stateId: any;
|
|
10
|
-
set value(val: string);
|
|
11
|
-
get value(): string;
|
|
12
|
-
private _value;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
formAutofocus: boolean;
|
|
15
|
-
panelPosition: 'left' | 'right' | 'top' | 'bottom';
|
|
16
|
-
valueChange: EventEmitter<any>;
|
|
17
|
-
tabsList: QueryList<RdtTabComponent>;
|
|
18
|
-
tabHeaderButtons?: QueryList<ElementRef<HTMLElement>>;
|
|
19
|
-
tabContent: ElementRef<HTMLElement>;
|
|
20
|
-
private _active;
|
|
21
|
-
get active(): boolean;
|
|
22
|
-
set active(value: boolean);
|
|
23
|
-
get isTopLevel(): boolean;
|
|
24
|
-
readonly parentTab: RdtTabComponent | null;
|
|
25
|
-
readonly controller: RdtTabControllerDirective | null;
|
|
26
|
-
readonly cd: ChangeDetectorRef;
|
|
27
|
-
readonly elRef: ElementRef<any>;
|
|
28
|
-
protected readonly renderer: Renderer2;
|
|
29
|
-
protected currentTemplate: TemplateRef<any> | null;
|
|
30
|
-
protected currentTab: RdtTabComponent | null;
|
|
31
|
-
get classes(): string;
|
|
32
|
-
get isHorizontal(): boolean;
|
|
33
|
-
get isVertical(): boolean;
|
|
34
|
-
private attrRole;
|
|
35
|
-
get hasNonDisabledTabs(): boolean;
|
|
36
|
-
get activeTab(): RdtTabComponent | undefined;
|
|
37
|
-
getTabByValue(value: string): RdtTabComponent | undefined;
|
|
38
|
-
ngAfterContentInit(): void;
|
|
39
|
-
getState(): RdtTabContainerState;
|
|
40
|
-
applyState(state: RdtTabContainerState): void;
|
|
41
|
-
scrollIntoView(): void;
|
|
42
|
-
activateTab(value: string): Promise<void>;
|
|
43
|
-
scrollCurrentButtonIntoView(): void;
|
|
44
|
-
private onClick;
|
|
45
|
-
private setCurrent;
|
|
46
|
-
private setTab;
|
|
47
|
-
private solidifyTabContentSize;
|
|
48
|
-
private releaseTabContentSize;
|
|
49
|
-
private getFirstEnabledTab;
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdtTabContainerComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RdtTabContainerComponent, "rdt-tab-container", never, { "stateId": { "alias": "stateId"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "formAutofocus": { "alias": "formAutofocus"; "required": false; }; "panelPosition": { "alias": "panelPosition"; "required": false; }; }, { "valueChange": "valueChange"; }, ["tabsList"], never, false, [{ directive: typeof i1.RdtChildDirective; inputs: {}; outputs: {}; }]>;
|
|
52
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class RdtDestroyInactiveDirective {
|
|
4
|
-
readonly template: TemplateRef<any>;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdtDestroyInactiveDirective, never>;
|
|
6
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdtDestroyInactiveDirective, "[rdtDestroyInactive]", never, {}, {}, never, never, false, never>;
|
|
7
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { AfterContentInit, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
2
|
-
import { RdtContainerDirective } from '@ngrdt/core';
|
|
3
|
-
import { RdtShortcut } from '@ngrdt/shortcuts';
|
|
4
|
-
import { RdtTabContainerComponent } from '../components/tab-container/rdt-tab-container.component';
|
|
5
|
-
import { RdtTabComponent } from '../components/tab/rdt-tab.component';
|
|
6
|
-
import { RdtTabsShortcutStrategy } from '../strategies/rdt-tabs-shortcut-strategy';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@ngrdt/core";
|
|
9
|
-
export declare class RdtTabControllerDirective implements OnInit, AfterContentInit, OnDestroy {
|
|
10
|
-
private readonly destroyRef;
|
|
11
|
-
private readonly injector;
|
|
12
|
-
private readonly shortcutService;
|
|
13
|
-
private shortcutSub;
|
|
14
|
-
set rdtTabController(value: RdtTabsShortcutStrategy | string | null);
|
|
15
|
-
protected get tabContainers(): RdtTabContainerComponent[];
|
|
16
|
-
protected get tabs(): RdtTabComponent[];
|
|
17
|
-
protected childControllers: QueryList<RdtTabControllerDirective>;
|
|
18
|
-
get strategy(): RdtTabsShortcutStrategy;
|
|
19
|
-
private _strategy;
|
|
20
|
-
private _lastActiveTabContainer;
|
|
21
|
-
private _contentWasInit;
|
|
22
|
-
get disabled(): boolean;
|
|
23
|
-
private _disabled;
|
|
24
|
-
get shortcuts(): RdtShortcut[];
|
|
25
|
-
set shortcuts(value: RdtShortcut[]);
|
|
26
|
-
private _shortcuts;
|
|
27
|
-
get activeContainer(): RdtTabContainerComponent | undefined;
|
|
28
|
-
protected containerDirective: RdtContainerDirective;
|
|
29
|
-
ngOnInit(): void;
|
|
30
|
-
ngAfterContentInit(): void;
|
|
31
|
-
ngOnDestroy(): void;
|
|
32
|
-
getTabContainerIndex(cont: RdtTabContainerComponent): number;
|
|
33
|
-
/**
|
|
34
|
-
* Activates first parent container of current container
|
|
35
|
-
* that is not disabled and has any non disabled tabs.
|
|
36
|
-
*/
|
|
37
|
-
goLevelUp(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Activates first container under current tab which
|
|
40
|
-
* is not disabled and has any non disabled tabs.
|
|
41
|
-
*/
|
|
42
|
-
goLevelDown(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Activates next container on current level
|
|
45
|
-
* (under parent container of currently active container).
|
|
46
|
-
* Is cyclic.
|
|
47
|
-
*/
|
|
48
|
-
goToNextContainer(): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Activates previous container on current level
|
|
51
|
-
* (under parent container of currently active container).
|
|
52
|
-
* Is cyclic.
|
|
53
|
-
*/
|
|
54
|
-
goToPrevContainer(): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Activates tab within active container at the index of argument.
|
|
57
|
-
*/
|
|
58
|
-
goToTabWithIndex(index: number): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Activates next tab within active container. Is cyclic.
|
|
61
|
-
*/
|
|
62
|
-
goToNextTab(): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Activates previous tab within active container. Is cyclic.
|
|
65
|
-
*/
|
|
66
|
-
goToPrevTab(): boolean;
|
|
67
|
-
private goToAdjacentContainer;
|
|
68
|
-
private goToAdjacentTab;
|
|
69
|
-
private getSameLevelContainers;
|
|
70
|
-
getTabByValue(value: string): RdtTabComponent | null;
|
|
71
|
-
activateTabContainer(tabs: RdtTabContainerComponent, scrollIntoView?: boolean): void;
|
|
72
|
-
activateTabContainerFromClick(tabs: RdtTabContainerComponent, timestamp: number): void;
|
|
73
|
-
activateTab(tab: RdtTabComponent): Promise<void>;
|
|
74
|
-
canActivateTab(tab: RdtTabComponent): boolean;
|
|
75
|
-
canActivateTabForms(tab: RdtTabComponent): Promise<boolean>;
|
|
76
|
-
onTabChanges(): void;
|
|
77
|
-
onTabContainerChanges(): void;
|
|
78
|
-
private disableSelfWhenChildCtrlExists;
|
|
79
|
-
private setDefaultActive;
|
|
80
|
-
private setDefaultActiveWhenAvailable;
|
|
81
|
-
private canContainerBeDefault;
|
|
82
|
-
private updateShortcuts;
|
|
83
|
-
private bindAll;
|
|
84
|
-
private unbindAll;
|
|
85
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdtTabControllerDirective, never>;
|
|
86
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdtTabControllerDirective, "[rdtTabController]", never, { "rdtTabController": { "alias": "rdtTabController"; "required": false; }; }, {}, ["childControllers"], never, false, [{ directive: typeof i1.RdtContainerDirective; inputs: {}; outputs: {}; }]>;
|
|
87
|
-
}
|
package/lib/rdt-tabs-models.d.ts
DELETED
package/lib/rdt-tabs.module.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./components/tab/rdt-tab.component";
|
|
3
|
-
import * as i2 from "./components/tab-container/rdt-tab-container.component";
|
|
4
|
-
import * as i3 from "./directives/rdt-tab-controller.directive";
|
|
5
|
-
import * as i4 from "./directives/rdt-destroy-inactive.directive";
|
|
6
|
-
import * as i5 from "@angular/common";
|
|
7
|
-
export declare class RdtTabsModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RdtTabsModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RdtTabsModule, [typeof i1.RdtTabComponent, typeof i2.RdtTabContainerComponent, typeof i3.RdtTabControllerDirective, typeof i4.RdtDestroyInactiveDirective], [typeof i5.CommonModule], [typeof i1.RdtTabComponent, typeof i2.RdtTabContainerComponent, typeof i3.RdtTabControllerDirective, typeof i4.RdtDestroyInactiveDirective]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<RdtTabsModule>;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RdtShortcut } from '@ngrdt/shortcuts';
|
|
2
|
-
import { RdtTabControllerDirective } from '../directives/rdt-tab-controller.directive';
|
|
3
|
-
import { RdtTabsShortcutStrategy } from './rdt-tabs-shortcut-strategy';
|
|
4
|
-
export declare class AutoRdtTabsShortcutStrategy extends RdtTabsShortcutStrategy {
|
|
5
|
-
updateShortcuts(): RdtShortcut[];
|
|
6
|
-
onShortcut(shortcut: RdtShortcut, ctrl: RdtTabControllerDirective): void;
|
|
7
|
-
private static generateActions;
|
|
8
|
-
private static generateShortcuts;
|
|
9
|
-
private static shortcuts;
|
|
10
|
-
private static actions;
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RdtShortcut } from '@ngrdt/shortcuts';
|
|
2
|
-
import { RdtTabControllerDirective } from '../directives/rdt-tab-controller.directive';
|
|
3
|
-
export declare abstract class RdtTabsShortcutStrategy {
|
|
4
|
-
/**
|
|
5
|
-
* Gets called onInit and whenever tabs are added/removed from Controller.
|
|
6
|
-
* @param ctrl Controller using this strategy.
|
|
7
|
-
* @returns List of shortcuts to register.
|
|
8
|
-
*/
|
|
9
|
-
abstract updateShortcuts(ctrl: RdtTabControllerDirective): RdtShortcut[];
|
|
10
|
-
/**
|
|
11
|
-
* Gets called whenever hotkeys detects one of the registered shortcuts.
|
|
12
|
-
* @param shortcut Registered shortcut.
|
|
13
|
-
* @param ctrl Controller using this strategy.
|
|
14
|
-
*/
|
|
15
|
-
abstract onShortcut(shortcut: RdtShortcut, ctrl: RdtTabControllerDirective): void;
|
|
16
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RdtShortcut } from '@ngrdt/shortcuts';
|
|
2
|
-
import { RdtTabControllerDirective } from '../directives/rdt-tab-controller.directive';
|
|
3
|
-
import { RdtTabsShortcutStrategy } from './rdt-tabs-shortcut-strategy';
|
|
4
|
-
export interface StaticRdtTabsConfig {
|
|
5
|
-
shortcuts: Map<RdtShortcut, string>;
|
|
6
|
-
}
|
|
7
|
-
export declare class StaticRdtTabsShortcutStrategy implements RdtTabsShortcutStrategy {
|
|
8
|
-
private config;
|
|
9
|
-
constructor(config: StaticRdtTabsConfig);
|
|
10
|
-
updateShortcuts(): RdtShortcut[];
|
|
11
|
-
onShortcut(shortcut: RdtShortcut, ctrl: RdtTabControllerDirective): void;
|
|
12
|
-
}
|