@obliczeniowo/elementary
Version:
Library made in Angular version 20
79 lines (73 loc) • 2.96 kB
TypeScript
import * as i0 from '@angular/core';
import { SimpleChanges, PipeTransform } from '@angular/core';
import { OblFileService } from '@obliczeniowo/elementary/files';
import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
import * as i3 from '@angular/common';
interface TableCell {
value?: string;
name?: string;
mergeX?: number;
mergeY?: number;
class?: string;
width?: string;
style?: {
[key: string]: string;
};
}
interface TableRow {
cells: TableCell[];
}
interface TableHeaderCell extends TableCell {
sort: {
direction: 'ASC' | 'DESC';
type: 'number' | 'string';
};
}
interface TableHeaderRow {
cells: TableHeaderCell[];
}
interface Caption {
value?: string;
name?: string;
}
interface TableData {
style?: {
[key: string]: string;
};
class?: string;
caption?: Caption;
header?: TableHeaderRow[];
body?: TableRow[];
foot?: TableRow[];
}
declare class JsonDefTableComponent {
private readonly file;
/** Data in form of JSON string or TableData interface */
data: i0.ModelSignal<TableData | undefined>;
/** Table json file url */
fileUrl: i0.InputSignal<string | undefined>;
protected currentSortIndex: number;
protected cellSort(cell: TableHeaderCell): void;
protected sort(cell: TableHeaderCell): void;
protected headerClass(cell: TableHeaderCell): {
sort: boolean;
};
constructor(file: OblFileService);
ngOnChanges(changes: SimpleChanges): Promise<void>;
static ɵfac: i0.ɵɵFactoryDeclaration<JsonDefTableComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<JsonDefTableComponent, "obl-json-def-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "fileUrl": { "alias": "fileUrl"; "required": false; "isSignal": true; }; }, { "data": "dataChange"; }, never, ["*", "*"], false, never>;
}
declare class SafePipeDirective implements PipeTransform {
protected sanitizer: DomSanitizer;
constructor(sanitizer: DomSanitizer);
transform(value: any, type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
static ɵfac: i0.ɵɵFactoryDeclaration<SafePipeDirective, never>;
static ɵpipe: i0.ɵɵPipeDeclaration<SafePipeDirective, "safe", false>;
}
declare class JsonDefTableModule {
static ɵfac: i0.ɵɵFactoryDeclaration<JsonDefTableModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<JsonDefTableModule, [typeof JsonDefTableComponent, typeof SafePipeDirective], [typeof i3.CommonModule], [typeof JsonDefTableComponent, typeof SafePipeDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<JsonDefTableModule>;
}
export { JsonDefTableComponent, JsonDefTableModule, SafePipeDirective };
export type { Caption, TableCell, TableData, TableHeaderCell, TableHeaderRow, TableRow };