kui-shell
Version:
This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool
116 lines (115 loc) • 3.01 kB
TypeScript
import { Watchable } from './basicModels';
import { Entity } from '../../models/entity';
import { SidecarMode } from '../bottom-stripe';
export declare class Row {
attributes?: Cell[];
name: string;
nameDom?: Element;
type?: string;
packageName?: string;
prettyType?: string;
fontawesome?: string;
fontawesomeCSS?: string;
setSelected?: () => void;
setUnselected?: () => void;
nameCss?: string | string[];
key?: string;
prettyName?: string;
fullName?: string;
kind?: string;
prettyKind?: string;
status?: string;
version?: string;
prettyVersion?: string;
beforeAttributes?: Cell[];
rowCSS?: string | string[];
onclickSilence?: boolean;
onclickExec?: 'pexec' | 'qexec';
onclick?: any;
css?: string;
outerCSS?: string;
done?: boolean;
constructor(row: Row);
}
export declare class Cell {
value: string;
valueDom?: Node[] | Node;
css?: string;
outerCSS?: string;
onclick?: any;
key?: string;
fontawesome?: string[] | string;
tag?: string;
tagClass?: string;
innerClassName?: string;
className?: string;
parent?: HTMLElement;
constructor(cell: Cell);
}
export interface Button {
name: string;
fontawesome: string;
balloon?: string;
onclick: (evt: Event) => void | string;
}
export interface Footer {
leftButtons: Button[];
}
export declare enum TableStyle {
Light = 0,
Medium = 1,
Heavy = 2
}
export declare class Table {
body: Row[];
type?: string;
style?: TableStyle;
header?: Row;
footer?: Footer;
noSort?: boolean;
noEntityColors?: boolean;
title?: string;
flexWrap?: number | boolean;
tableCSS?: string;
fontawesome?: string;
fontawesomeCSS?: string;
fontawesomeBalloon?: string;
constructor(table: Table);
}
export interface WatchableTable extends Table, Watchable {
}
export declare function isTable(model: SidecarMode | Entity): model is Table;
export interface MultiTable {
tables: Table[];
}
export declare function isMultiTable(model: SidecarMode | Entity): model is MultiTable;
export declare type WatchableMultiTable = MultiTable & Watchable;
export declare function formatWatchableTable<T extends Table | MultiTable>(model: T, watch: Watchable): T & Watchable;
export declare const sortBody: (rows: Row[]) => Row[];
export declare class Icon {
fontawesome: string;
onclick?: (evt: Event) => void;
balloon?: string;
balloonLength?: string;
balloonPos?: string;
constructor(icon: Icon);
}
interface RowUpdate {
model: Row;
updateIndex: number;
}
interface RowInsertion {
model: Row;
insertBeforeIndex: number;
}
interface RowDeletion {
model: Row;
deleteIndex: number;
}
export interface RowDiff {
rowUpdate: RowUpdate[];
rowDeletion: RowDeletion[];
rowInsertion: RowInsertion[];
}
export declare function diffTableRows(existingRows: Row[], refreshRows: Row[]): RowDiff;
export {};