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 | */
|
6 | import { ComponentFactoryResolver, ComponentFactory, ComponentRef, ElementRef, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
|
7 | import { NbComponentSize } from '../component-size';
|
8 | import { NbComponentOrCustomStatus } from '../component-status';
|
9 | import { NbSpinnerComponent } from './spinner.component';
|
10 | import * as i0 from "@angular/core";
|
11 | /**
|
12 | * Styled spinner directive
|
13 | *
|
14 | * @stacked-example(Spinner Showcase, spinner/spinner-card.component)
|
15 | *
|
16 | *
|
17 | * ```ts
|
18 | * <nb-card [nbSpinner]="loading" nbSpinnerStatus="danger">
|
19 | * <nb-card-body>Card Content</nb-card-body>
|
20 | * </nb-card>
|
21 | * ```
|
22 | *
|
23 | * ### Installation
|
24 | *
|
25 | * Import `NbSpinnerModule` to your feature module.
|
26 | * ```ts
|
27 | * @NgModule({
|
28 | * imports: [
|
29 | * // ...
|
30 | * NbSpinnerModule,
|
31 | * ],
|
32 | * })
|
33 | * export class PageModule { }
|
34 | * ```
|
35 | * ### Usage
|
36 | *
|
37 | * Could be colored using `status` property
|
38 | *
|
39 | * @stacked-example(Spinner Colors, spinner/spinner-colors.component)
|
40 | *
|
41 | * Available in different sizes with `size` property:
|
42 | *
|
43 | * @stacked-example(Spinner Sizes, spinner/spinner-sizes.component)
|
44 | *
|
45 | * It is also possible to place it into the button:
|
46 | * @stacked-example(Buttons with spinner, spinner/spinner-button.component)
|
47 | *
|
48 | * Or tabs:
|
49 | * @stacked-example(Spinner in tabs, spinner/spinner-tabs.component)
|
50 | */
|
51 | export declare class NbSpinnerDirective implements OnInit {
|
52 | private directiveView;
|
53 | private componentFactoryResolver;
|
54 | private renderer;
|
55 | private directiveElement;
|
56 | private shouldShow;
|
57 | spinner: ComponentRef<NbSpinnerComponent>;
|
58 | componentFactory: ComponentFactory<NbSpinnerComponent>;
|
59 | /**
|
60 | * Spinner message shown next to the icon
|
61 | * @type {string}
|
62 | */
|
63 | spinnerMessage: string;
|
64 | /**
|
65 | * Spinner status color
|
66 | * `basic`, `primary`, `info`, `success`, `warning`, `danger`, `control`.
|
67 | */
|
68 | spinnerStatus: NbComponentOrCustomStatus;
|
69 | /**
|
70 | * Spinner size. Possible values: `tiny`, `small`, `medium` (default), `large`, `giant`
|
71 | */
|
72 | spinnerSize: NbComponentSize;
|
73 | /**
|
74 | * Directive value - show or hide spinner
|
75 | * @param {boolean} val
|
76 | */
|
77 | set nbSpinner(val: boolean);
|
78 | isSpinnerExist: boolean;
|
79 | constructor(directiveView: ViewContainerRef, componentFactoryResolver: ComponentFactoryResolver, renderer: Renderer2, directiveElement: ElementRef);
|
80 | ngOnInit(): void;
|
81 | hide(): void;
|
82 | show(): void;
|
83 | setInstanceInputs(instance: NbSpinnerComponent): void;
|
84 | static ɵfac: i0.ɵɵFactoryDeclaration<NbSpinnerDirective, never>;
|
85 | static ɵdir: i0.ɵɵDirectiveDeclaration<NbSpinnerDirective, "[nbSpinner]", never, { "spinnerMessage": { "alias": "nbSpinnerMessage"; "required": false; }; "spinnerStatus": { "alias": "nbSpinnerStatus"; "required": false; }; "spinnerSize": { "alias": "nbSpinnerSize"; "required": false; }; "nbSpinner": { "alias": "nbSpinner"; "required": false; }; }, {}, never, never, false, never>;
|
86 | }
|