@cds/core
Version:
Clarity Design System - common components, themes, and utilties
68 lines (67 loc) • 2.17 kB
TypeScript
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function filter<T>(list: T[], key: string, term: string): T[];
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function sortStrings<T>(list: T[], key: string, sortType: 'none' | 'ascending' | 'descending'): T[];
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function swapBetweenLists<T extends {
id: string;
}>(targetList: T[], fromList: T[], detail: {
from: T;
target: T;
}): {
targetList: T[];
fromList: T[];
};
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function paginate<T>(arr: T[], size: number): T[][];
/**
* @demo
* @deprecated
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function swapItems<T>(target: T & {
id: any;
}, src: T & {
id: any;
}, list: ({
id: any;
} & T)[]): ({
id: any;
} & T)[];
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function insertBefore(fromIndex: number, targetIndex: number, list: any[]): any[];
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function parseCSV(text: string): {
columns: string[];
rows: string[][];
};
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function exportElementsToCSV(columnElements: NodeListOf<HTMLElement>, rowElements: NodeListOf<HTMLElement>): string;
/**
* @demo
* This is a demo function used to standardize demos across framework examples. Do not use in production.
*/
export declare function toggleRange(rows: {
selected?: boolean;
}[], indexStart: number, indexEnd: number): void;