UNPKG

2.89 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Akveo. All Rights Reserved.
4 * Licensed under the MIT License. See License.txt in the project root for license information.
5 */
6import { ChangeDetectorRef, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
7import { Subject } from 'rxjs';
8import { NbLayoutDirection, NbLayoutDirectionService } from '../../services/direction.service';
9import * as i0 from "@angular/core";
10declare abstract class NbBaseLayoutDirectionDirective implements OnInit, OnDestroy {
11 protected templateRef: TemplateRef<any>;
12 protected viewContainer: ViewContainerRef;
13 protected cd: ChangeDetectorRef;
14 protected directionService: NbLayoutDirectionService;
15 protected directionToShow: NbLayoutDirection;
16 protected destroy$: Subject<void>;
17 constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, cd: ChangeDetectorRef, directionService: NbLayoutDirectionService, directionToShow: NbLayoutDirection);
18 ngOnInit(): void;
19 ngOnDestroy(): void;
20 protected updateView<T>(shouldShow: T): void;
21 static ɵfac: i0.ɵɵFactoryDeclaration<NbBaseLayoutDirectionDirective, never>;
22 static ɵdir: i0.ɵɵDirectiveDeclaration<NbBaseLayoutDirectionDirective, never, never, {}, {}, never, never, false, never>;
23}
24/**
25 * Apply `nbLtr` directive to the element you need to show only when layout direction is `LTR`.
26 *
27 * ```html
28 * <div *nbLtr>This text is visible only when layout direction is LTR</div>
29 * ```
30 */
31export declare class NbLtrDirective extends NbBaseLayoutDirectionDirective {
32 protected templateRef: TemplateRef<any>;
33 protected viewContainer: ViewContainerRef;
34 protected cd: ChangeDetectorRef;
35 protected directionService: NbLayoutDirectionService;
36 constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, cd: ChangeDetectorRef, directionService: NbLayoutDirectionService);
37 static ɵfac: i0.ɵɵFactoryDeclaration<NbLtrDirective, never>;
38 static ɵdir: i0.ɵɵDirectiveDeclaration<NbLtrDirective, "[nbLtr]", never, {}, {}, never, never, false, never>;
39}
40/**
41 * Apply `nbRtl` directive to the element you need to show only when layout direction is `RTL`.
42 *
43 * ```html
44 * <div *nbRtl>This text is visible only when layout direction is RTL</div>
45 * ```
46 */
47export declare class NbRtlDirective extends NbBaseLayoutDirectionDirective {
48 protected templateRef: TemplateRef<any>;
49 protected viewContainer: ViewContainerRef;
50 protected cd: ChangeDetectorRef;
51 protected directionService: NbLayoutDirectionService;
52 constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, cd: ChangeDetectorRef, directionService: NbLayoutDirectionService);
53 static ɵfac: i0.ɵɵFactoryDeclaration<NbRtlDirective, never>;
54 static ɵdir: i0.ɵɵDirectiveDeclaration<NbRtlDirective, "[nbRtl]", never, {}, {}, never, never, false, never>;
55}
56export {};