diff --git a/projects/js-toolkit/packages/js-api/data-set/index.ts b/projects/js-toolkit/packages/js-api/data-set/index.ts index 9138ac22d..6da05734a 100644 --- a/projects/js-toolkit/packages/js-api/data-set/index.ts +++ b/projects/js-toolkit/packages/js-api/data-set/index.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: LGPL-3.0-or-later */ +// Frontend data set cell renderer + export interface FDSTableCellHTMLElementBuilderArgs { value: boolean | number | string | object | []; } @@ -11,34 +13,31 @@ export interface FDSTableCellHTMLElementBuilder { (args: FDSTableCellHTMLElementBuilderArgs): HTMLElement; } -export interface FDSCellRendererArgs { - value: boolean | number | string | object | []; -} +// Frontend data set filter -export interface FDSCellRenderer { - (args: FDSCellRendererArgs): HTMLElement; +export interface FDSFilterData { + selectedData: T; } -export interface FDSFilterData { - id: string; - odataFilterString: string; - selectedData: string; +export interface FDSFilterHTMLElementBuilderArgs { + filter: FDSFilterData; + setFilter: (partialFilter: Partial>) => void; } -export interface FDSFilterArgs { - filter: FDSFilterData; - setFilter: (val: Partial) => void; +export interface FDSFilterHTMLElementBuilder { + (args: FDSFilterHTMLElementBuilderArgs): HTMLElement; } -export interface FDSFilter { - (args: FDSFilterArgs): HTMLElement; +export interface FDSFilterODataQueryBuilder { + (selectedData: T): string; } -export interface FDSFilterHTMLElementBuilderArgs { - filter: FDSFilterData; - setFilter: (val: Partial) => void; +export interface FDSFilterDescriptionBuilder { + (selectedData: T): string; } -export interface FDSFilterHTMLElementBuilder { - (args: FDSFilterHTMLElementBuilderArgs): HTMLElement; +export interface FDSFilter { + descriptionBuilder: FDSFilterDescriptionBuilder; + htmlElementBuilder: FDSFilterHTMLElementBuilder; + oDataQueryBuilder: FDSFilterODataQueryBuilder; }