@3kles/kles-material-table-v2 21.7.1 → 21.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3kles/kles-material-table-v2",
3
- "version": "21.7.1",
3
+ "version": "21.8.0",
4
4
  "keywords": [
5
5
  "3KLES"
6
6
  ],
@@ -356,12 +356,19 @@ declare class KlesTableIntl {
356
356
  }
357
357
 
358
358
  type TableElevationLevel = 0 | 1 | 2 | 3 | 4 | 5;
359
+ type RowClassValue = string | string[] | Set<string> | Record<string, boolean | null | undefined>;
360
+ type RowStyleInput = KlesStyleMap | ((row: Record<string, unknown>, status: FormControlStatus, index: number) => KlesStyleMap);
361
+ type RowClassInput = RowClassValue | ((row: Record<string, unknown>, status: FormControlStatus, index: number) => RowClassValue);
362
+ interface RowAppearanceConfig {
363
+ rowStyle?: RowStyleInput;
364
+ rowClass?: RowClassInput;
365
+ }
359
366
  interface EmptyStateConfig {
360
367
  enabled?: boolean;
361
368
  component?: Type<unknown>;
362
369
  intl?: Type<KlesTableIntl>;
363
370
  }
364
- interface DefaultTableConfig {
371
+ interface DefaultTableConfig extends RowAppearanceConfig {
365
372
  id?: string;
366
373
  columns: KlesColumnConfig[];
367
374
  /** Reserved for row-level validation configuration; not applied yet. */
@@ -1409,6 +1416,7 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
1409
1416
  private readonly datasourceService;
1410
1417
  readonly tableService: ITableService;
1411
1418
  readonly dragDropRowService: DragDropService;
1419
+ readonly rowAppearance: RowAppearanceConfig;
1412
1420
  readonly selectionService: ISelectionService;
1413
1421
  readonly columnsService: ColumnsService;
1414
1422
  readonly loadingService: LoadingService;
@@ -1446,7 +1454,7 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
1446
1454
  private rafId?;
1447
1455
  private _cleanup?;
1448
1456
  emptyStateComponent: typeof KlesTableEmptyStateComponent;
1449
- constructor(host: ElementRef<HTMLElement>, connectorService: KlesTableConnectorService, loader: ILoader<unknown>, datasourceService: IDatasourceService, tableService: ITableService, dragDropRowService: DragDropService, selectionService: ISelectionService, columnsService: ColumnsService, loadingService: LoadingService, paginatorService: PaginatorService, scrollbarService: ScrollbarService, footerService: FooterService, extraRowService: ExtraRowService, renderService: RenderService, sortService: ISortService, filterService: FilterService, expandedRowStore: ExpandedRowStore, rowFactory: RowFormFactory, eventsService: EventsService, rowService: RowService, cellService: CellService, emptyStateService: EmptyStateService, treeService: TreeService<unknown, unknown>);
1457
+ constructor(host: ElementRef<HTMLElement>, connectorService: KlesTableConnectorService, loader: ILoader<unknown>, datasourceService: IDatasourceService, tableService: ITableService, dragDropRowService: DragDropService, rowAppearance: RowAppearanceConfig, selectionService: ISelectionService, columnsService: ColumnsService, loadingService: LoadingService, paginatorService: PaginatorService, scrollbarService: ScrollbarService, footerService: FooterService, extraRowService: ExtraRowService, renderService: RenderService, sortService: ISortService, filterService: FilterService, expandedRowStore: ExpandedRowStore, rowFactory: RowFormFactory, eventsService: EventsService, rowService: RowService, cellService: CellService, emptyStateService: EmptyStateService, treeService: TreeService<unknown, unknown>);
1450
1458
  get isLoadingClass(): boolean;
1451
1459
  get isEmptyClass(): boolean;
1452
1460
  get events(): EventsApi;
@@ -1476,7 +1484,7 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
1476
1484
  getStickyEndSeparator(column: KlesColumnConfig, section: TableSection): string | null;
1477
1485
  private getSeparatorStyle;
1478
1486
  private calculHeaderHeight;
1479
- static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, null, null, null, null, null, null, null]>;
1487
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, null, null, null, null, null, null, null]>;
1480
1488
  static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "kles-table", never, {}, {}, never, never, true, never>;
1481
1489
  }
1482
1490
 
@@ -1568,6 +1576,7 @@ declare const COLUMNS: InjectionToken<WritableSignal<KlesColumnConfig[]>>;
1568
1576
  declare const FOOTER: InjectionToken<WritableSignal<boolean>>;
1569
1577
  declare const EXTRA_ROWS: InjectionToken<WritableSignal<ExtraRowConfig[]>>;
1570
1578
  declare const MULTI_UNFOLD: InjectionToken<boolean>;
1579
+ declare const ROW_APPEARANCE_CONFIG: InjectionToken<RowAppearanceConfig>;
1571
1580
  declare const ROW_DRAG_DROP: InjectionToken<DragDropService>;
1572
1581
  declare const DRAG_DROP_CONFIG: InjectionToken<DragDropConfig<unknown>>;
1573
1582
  declare const KLES_DRAG_DROP_ROW_CONTEXT: InjectionToken<DragDropRowContext<unknown>>;
@@ -1584,5 +1593,5 @@ declare const SCROLLBAR_ORCHESTRATOR_SERVICE: InjectionToken<IScrollbarOrchestra
1584
1593
  declare const TABLE_SERVICE: InjectionToken<ITableService>;
1585
1594
  declare const EMPTY_STATE_CONFIG: InjectionToken<boolean | EmptyStateConfig>;
1586
1595
 
1587
- export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, INFINITE_SCROLL_CONFIG, KLES_DRAG_DROP_ROW_CONTEXT, KlesMaterialTableModule, KlesTableComponent, KlesTableEmptyStateComponent, KlesTableIntl, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, MULTI_UNFOLD, PAGINATOR_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
1588
- export type { AggregationType, BulkActionClickPayload, CellMousePayload, CellPayload, CellValueChangePayload, ColumnApi, ColumnClass, ColumnDropPayload, ColumnOrderChangePayload, ColumnPayload, ColumnResizePayload, ColumnSeparatorConfig, ColumnSeparatorStyle, ColumnVisibilityChangePayload, DefaultTableConfig, DragDrop, DragDropConfig, DragDropRowChange, DragDropRowContext, EmptyStateApi, EmptyStateChangePayload, EmptyStateConfig, EventsApi, ExpansionPayload, ExtraRow, ExtraRowConfig, ExtraRowMode, FilterChangePayload, FooterApi, FooterFormApi, FormApi, FormValue, GlobalSearchPayload, HeaderFormApi, IKlesCellFieldConfig, IKlesFooterFieldConfig, IKlesHeaderFieldConfig, ITable, InfiniteScrollConfig, KlesColumnConfig, KlesExtraCellFieldConfig, KlesStyleMap, KlesStyleValue, KlesTableApi, KlesTableConfig, LinesLazyLoader, LinesLoader, LoadErrorPayload, LoadSuccessPayload, LoaderConfig, LoaderLazyResult, LoaderResult, LoadingApi, LoadingChangePayload, NgStyleInput, PageChangePayload, PaginationApi, PaginatorConfig, RenderApi, RowActionClickPayload, RowDropErrorPayload, RowDropPayload, RowId, RowMousePayload, RowPayload, RowValidatePayload, RowsFormApi, ScrollbarApi, Selection, SelectionAllResponse, SelectionApi, SelectionChangePayload, SelectionConfig, SelectionErrorPayload, SelectionResponse, SelectionState, SortApi, SortPayload, StateChangePayload, SummaryChangePayload, TableElevationLevel, TableEvent, TableEventMap, TableEventPayload, TableEventType, TableFormValue, TreeApi, TreeNodeId, TreePayload, ValidationErrorPayload, VisibilityChangePayload };
1596
+ export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, INFINITE_SCROLL_CONFIG, KLES_DRAG_DROP_ROW_CONTEXT, KlesMaterialTableModule, KlesTableComponent, KlesTableEmptyStateComponent, KlesTableIntl, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, MULTI_UNFOLD, PAGINATOR_CONFIG, ROW_APPEARANCE_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
1597
+ export type { AggregationType, BulkActionClickPayload, CellMousePayload, CellPayload, CellValueChangePayload, ColumnApi, ColumnClass, ColumnDropPayload, ColumnOrderChangePayload, ColumnPayload, ColumnResizePayload, ColumnSeparatorConfig, ColumnSeparatorStyle, ColumnVisibilityChangePayload, DefaultTableConfig, DragDrop, DragDropConfig, DragDropRowChange, DragDropRowContext, EmptyStateApi, EmptyStateChangePayload, EmptyStateConfig, EventsApi, ExpansionPayload, ExtraRow, ExtraRowConfig, ExtraRowMode, FilterChangePayload, FooterApi, FooterFormApi, FormApi, FormValue, GlobalSearchPayload, HeaderFormApi, IKlesCellFieldConfig, IKlesFooterFieldConfig, IKlesHeaderFieldConfig, ITable, InfiniteScrollConfig, KlesColumnConfig, KlesExtraCellFieldConfig, KlesStyleMap, KlesStyleValue, KlesTableApi, KlesTableConfig, LinesLazyLoader, LinesLoader, LoadErrorPayload, LoadSuccessPayload, LoaderConfig, LoaderLazyResult, LoaderResult, LoadingApi, LoadingChangePayload, NgStyleInput, PageChangePayload, PaginationApi, PaginatorConfig, RenderApi, RowActionClickPayload, RowAppearanceConfig, RowClassInput, RowClassValue, RowDropErrorPayload, RowDropPayload, RowId, RowMousePayload, RowPayload, RowStyleInput, RowValidatePayload, RowsFormApi, ScrollbarApi, Selection, SelectionAllResponse, SelectionApi, SelectionChangePayload, SelectionConfig, SelectionErrorPayload, SelectionResponse, SelectionState, SortApi, SortPayload, StateChangePayload, SummaryChangePayload, TableElevationLevel, TableEvent, TableEventMap, TableEventPayload, TableEventType, TableFormValue, TreeApi, TreeNodeId, TreePayload, ValidationErrorPayload, VisibilityChangePayload };