1 | import { ChangeDetectorRef } from '@angular/core';
|
2 | import { Dir } from '@angular/cdk/bidi';
|
3 | import * as i0 from "@angular/core";
|
4 | export declare class TdJsonFormatterComponent {
|
5 | private _changeDetectorRef;
|
6 | private _dir;
|
7 | |
8 |
|
9 |
|
10 | private static KEY_MAX_LENGTH;
|
11 | |
12 |
|
13 |
|
14 | private static PREVIEW_STRING_MAX_LENGTH;
|
15 | |
16 |
|
17 |
|
18 | private static PREVIEW_LIMIT;
|
19 | private _key?;
|
20 | private _data;
|
21 | private _children?;
|
22 | private _open;
|
23 | private _levelsOpen;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | set levelsOpen(levelsOpen: number);
|
29 | get levelsOpen(): number;
|
30 | get open(): boolean;
|
31 | |
32 |
|
33 |
|
34 |
|
35 | set key(key: string);
|
36 | get key(): string;
|
37 | |
38 |
|
39 |
|
40 |
|
41 | set data(data: Record<string, any>);
|
42 | get data(): Record<string, any>;
|
43 | get children(): string[];
|
44 | get isRTL(): boolean;
|
45 | constructor(_changeDetectorRef: ChangeDetectorRef, _dir: Dir);
|
46 | /**
|
47 | * Refreshes json-formatter and rerenders [data]
|
48 | */
|
49 | refresh(): void;
|
50 | /**
|
51 | * Toggles collapse/expanded state of component.
|
52 | */
|
53 | toggle(): void;
|
54 | isObject(): boolean;
|
55 | isArray(): boolean;
|
56 | hasChildren(): boolean;
|
57 | /**
|
58 | * Gets parsed value depending on value type.
|
59 | */
|
60 | getValue(value: any): string;
|
61 | /**
|
62 | * Gets type of object.
|
63 | * returns 'null' if object is null and 'date' if value is object and can be parsed to a date.
|
64 | */
|
65 | getType(object: any): string;
|
66 | /**
|
67 | * Generates string representation depending if its an object or function.
|
68 | * see: http://stackoverflow.com/a/332429
|
69 | */
|
70 | getObjectName(): string;
|
71 | /**
|
72 | * Creates preview of nodes children to render in tooltip depending if its an array or an object.
|
73 | */
|
74 | getPreview(): string;
|
75 | private parseChildren;
|
76 | static ɵfac: i0.ɵɵFactoryDeclaration<TdJsonFormatterComponent, [null, { optional: true; }]>;
|
77 | static ɵcmp: i0.ɵɵComponentDeclaration<TdJsonFormatterComponent, "td-json-formatter", never, { "levelsOpen": { "alias": "levelsOpen"; "required": false; }; "key": { "alias": "key"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
|
78 | }
|