@3kles/kles-material-table-v2 21.2.0 → 21.3.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
|
@@ -7,7 +7,7 @@ import * as i4 from '@3kles/kles-material-dynamicforms';
|
|
|
7
7
|
import { IKlesFieldConfig, GroupUiState, ArrayUiState, AbstractUiState } from '@3kles/kles-material-dynamicforms';
|
|
8
8
|
import { SortHeaderArrowPosition, SortDirection, Sort, MatSort } from '@angular/material/sort';
|
|
9
9
|
import * as rxjs from 'rxjs';
|
|
10
|
-
import { Observable } from 'rxjs';
|
|
10
|
+
import { Observable, Subject } from 'rxjs';
|
|
11
11
|
import { PageEvent, MatPaginatorIntl, MatPaginatorSelectConfig, MatPaginator } from '@angular/material/paginator';
|
|
12
12
|
import { CdkDrag, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
13
13
|
import { DataSource } from '@angular/cdk/table';
|
|
@@ -348,7 +348,20 @@ type Brand<K extends string> = {
|
|
|
348
348
|
type SelectionConfig<T> = SelectionConfigDef<T> & Brand<'SelectionConfig'>;
|
|
349
349
|
declare const selectionConfig: <T>(l: SelectionConfigDef<T>) => SelectionConfig<T>;
|
|
350
350
|
|
|
351
|
+
declare class KlesTableIntl {
|
|
352
|
+
readonly changes: Subject<void>;
|
|
353
|
+
emptyStateTitle: string;
|
|
354
|
+
emptyStateDescription: string;
|
|
355
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KlesTableIntl, never>;
|
|
356
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KlesTableIntl>;
|
|
357
|
+
}
|
|
358
|
+
|
|
351
359
|
type TableElevationLevel = 0 | 1 | 2 | 3 | 4 | 5;
|
|
360
|
+
interface EmptyStateConfig {
|
|
361
|
+
enabled?: boolean;
|
|
362
|
+
component?: Type<unknown>;
|
|
363
|
+
intl?: Type<KlesTableIntl>;
|
|
364
|
+
}
|
|
352
365
|
interface DefaultTableConfig {
|
|
353
366
|
id?: string;
|
|
354
367
|
columns: KlesColumnConfig[];
|
|
@@ -358,6 +371,7 @@ interface DefaultTableConfig {
|
|
|
358
371
|
sortConfig?: Sort;
|
|
359
372
|
columnSeparator?: boolean | ColumnSeparatorConfig;
|
|
360
373
|
elevation?: TableElevationLevel;
|
|
374
|
+
emptyState?: boolean | EmptyStateConfig;
|
|
361
375
|
}
|
|
362
376
|
interface PaginatorConfig {
|
|
363
377
|
paginator?: boolean;
|
|
@@ -455,8 +469,12 @@ declare class DragDropService extends DragDropBase {
|
|
|
455
469
|
declare class ScrollbarService {
|
|
456
470
|
private element;
|
|
457
471
|
private default;
|
|
472
|
+
private readonly hiddenClass;
|
|
458
473
|
register(el: HTMLElement): void;
|
|
459
474
|
unregister(): void;
|
|
475
|
+
setScrollbarVisible(visible: boolean): void;
|
|
476
|
+
hideScrollbar(): void;
|
|
477
|
+
showScrollbar(): void;
|
|
460
478
|
toTop(sb?: ScrollBehavior): void;
|
|
461
479
|
toBottom(sb?: ScrollBehavior): void;
|
|
462
480
|
toLeft(sb?: ScrollBehavior): void;
|
|
@@ -911,6 +929,7 @@ declare class ValidationService {
|
|
|
911
929
|
|
|
912
930
|
interface IDatasourceService {
|
|
913
931
|
get datasource(): IKlesDataSource;
|
|
932
|
+
readonly isEmpty: Signal<boolean>;
|
|
914
933
|
register(): void;
|
|
915
934
|
}
|
|
916
935
|
declare class DatasourceService implements IDatasourceService {
|
|
@@ -920,6 +939,8 @@ declare class DatasourceService implements IDatasourceService {
|
|
|
920
939
|
private validationService;
|
|
921
940
|
private _datasource;
|
|
922
941
|
private readonly destroyRef;
|
|
942
|
+
private readonly _isEmpty;
|
|
943
|
+
readonly isEmpty: Signal<boolean>;
|
|
923
944
|
constructor(fm: KlesForm, columnsService: ColumnsService, cellValueChangeService: CellValueChangeService, validationService: ValidationService);
|
|
924
945
|
register(): void;
|
|
925
946
|
get datasource(): KlesDataSource;
|
|
@@ -1023,6 +1044,7 @@ interface ILinesService {
|
|
|
1023
1044
|
register(): void;
|
|
1024
1045
|
total(): number;
|
|
1025
1046
|
loaded(): EventEmitter<void>;
|
|
1047
|
+
loading(): EventEmitter<void>;
|
|
1026
1048
|
}
|
|
1027
1049
|
|
|
1028
1050
|
interface ISelectionService {
|
|
@@ -1094,6 +1116,27 @@ declare class CellService {
|
|
|
1094
1116
|
static ɵprov: i0.ɵɵInjectableDeclaration<CellService>;
|
|
1095
1117
|
}
|
|
1096
1118
|
|
|
1119
|
+
declare class KlesTableEmptyStateComponent {
|
|
1120
|
+
readonly intl: KlesTableIntl;
|
|
1121
|
+
private readonly changeDetectorRef;
|
|
1122
|
+
private readonly destroyRef;
|
|
1123
|
+
constructor();
|
|
1124
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KlesTableEmptyStateComponent, never>;
|
|
1125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KlesTableEmptyStateComponent, "kles-table-empty-state", never, {}, {}, never, never, true, never>;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
declare class EmptyStateService {
|
|
1129
|
+
private readonly _enabled;
|
|
1130
|
+
readonly enabled: i0.Signal<boolean>;
|
|
1131
|
+
readonly component: Type<unknown>;
|
|
1132
|
+
constructor(config: boolean | EmptyStateConfig | undefined);
|
|
1133
|
+
enable(): void;
|
|
1134
|
+
disable(): void;
|
|
1135
|
+
toggle(): void;
|
|
1136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateService, never>;
|
|
1137
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EmptyStateService>;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1097
1140
|
type TableSection = 'header' | 'body' | 'footer';
|
|
1098
1141
|
declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy {
|
|
1099
1142
|
private readonly host;
|
|
@@ -1117,6 +1160,7 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
|
|
|
1117
1160
|
private readonly eventsService;
|
|
1118
1161
|
readonly rowService: RowService;
|
|
1119
1162
|
readonly cellService: CellService;
|
|
1163
|
+
readonly emptyStateService: EmptyStateService;
|
|
1120
1164
|
table: MatTable<FormGroup>;
|
|
1121
1165
|
matSort: MatSort;
|
|
1122
1166
|
formElemRef: ElementRef<HTMLElement>;
|
|
@@ -1131,12 +1175,15 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
|
|
|
1131
1175
|
extraRows: Signal<(ExtraRowConfig & {
|
|
1132
1176
|
displayedColumns: string[];
|
|
1133
1177
|
})[]>;
|
|
1178
|
+
readonly isEmpty: Signal<boolean>;
|
|
1134
1179
|
private ro?;
|
|
1135
1180
|
private readonly destroyRef;
|
|
1136
1181
|
private rafId?;
|
|
1137
1182
|
private _cleanup?;
|
|
1138
|
-
|
|
1183
|
+
emptyStateComponent: typeof KlesTableEmptyStateComponent;
|
|
1184
|
+
constructor(host: ElementRef<HTMLElement>, connectorService: KlesTableConnectorService, loader: ILoader<any>, 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);
|
|
1139
1185
|
get isLoadingClass(): boolean;
|
|
1186
|
+
get isEmptyClass(): boolean;
|
|
1140
1187
|
get events(): EventsApi;
|
|
1141
1188
|
get form(): FormApi;
|
|
1142
1189
|
get scrollbar(): ScrollbarApi;
|
|
@@ -1161,7 +1208,7 @@ declare class TableComponent implements ITable, OnInit, AfterViewInit, OnDestroy
|
|
|
1161
1208
|
getStickyEndSeparator(column: KlesColumnConfig, section: TableSection): string | null;
|
|
1162
1209
|
private getSeparatorStyle;
|
|
1163
1210
|
private calculHeaderHeight;
|
|
1164
|
-
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]>;
|
|
1211
|
+
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]>;
|
|
1165
1212
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "kles-table", never, {}, {}, never, never, true, never>;
|
|
1166
1213
|
}
|
|
1167
1214
|
|
|
@@ -1239,6 +1286,7 @@ declare const SELECTION_SERVICE: InjectionToken<ISelectionService>;
|
|
|
1239
1286
|
declare const SORT_SERVICE: InjectionToken<ISortService>;
|
|
1240
1287
|
declare const SCROLLBAR_ORCHESTRATOR_SERVICE: InjectionToken<IScrollbarOrchestratorService>;
|
|
1241
1288
|
declare const TABLE_SERVICE: InjectionToken<ITableService>;
|
|
1289
|
+
declare const EMPTY_STATE_CONFIG: InjectionToken<boolean | EmptyStateConfig>;
|
|
1242
1290
|
|
|
1243
|
-
export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, KlesMaterialTableModule, KlesTableComponent, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, PAGINATOR_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
|
|
1244
|
-
export type { ColumnSeparatorConfig, ColumnSeparatorStyle, DefaultTableConfig, DragDrop, DragDropConfig, ExtraRow, ExtraRowConfig, ExtraRowMode, IKlesCellFieldConfig, IKlesFooterFieldConfig, IKlesHeaderFieldConfig, ITable, InfiniteScrollConfig, KlesColumnConfig, KlesExtraCellFieldConfig, KlesTableApi, KlesTableConfig, LinesLazyLoader, LinesLoader, LoaderConfig, LoaderLazyResult, LoaderResult, NgStyleInput, PaginatorConfig, RowId, Selection, SelectionAllResponse, SelectionConfig, SelectionResponse, SelectionState, TableElevationLevel };
|
|
1291
|
+
export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, KlesMaterialTableModule, KlesTableComponent, KlesTableEmptyStateComponent, KlesTableIntl, LINES_SERVICE, LOADER_CONFIG, LOADER_SERVICE, PAGINATOR_CONFIG, ROW_DRAG_DROP, SCROLLBAR_ORCHESTRATOR_SERVICE, SELECTION_CONFIG, SELECTION_SERVICE, SORT_CONFIG, SORT_SERVICE, Span, TABLE_SERVICE, TableComponent, linesLazyLoader, linesLoader, selectionConfig };
|
|
1292
|
+
export type { ColumnSeparatorConfig, ColumnSeparatorStyle, DefaultTableConfig, DragDrop, DragDropConfig, EmptyStateConfig, ExtraRow, ExtraRowConfig, ExtraRowMode, IKlesCellFieldConfig, IKlesFooterFieldConfig, IKlesHeaderFieldConfig, ITable, InfiniteScrollConfig, KlesColumnConfig, KlesExtraCellFieldConfig, KlesTableApi, KlesTableConfig, LinesLazyLoader, LinesLoader, LoaderConfig, LoaderLazyResult, LoaderResult, NgStyleInput, PaginatorConfig, RowId, Selection, SelectionAllResponse, SelectionConfig, SelectionResponse, SelectionState, TableElevationLevel };
|