@3kles/kles-material-table-v2 21.5.0 → 21.7.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.5.0",
3
+ "version": "21.7.0",
4
4
  "keywords": [
5
5
  "3KLES"
6
6
  ],
@@ -383,8 +383,13 @@ interface PaginatorConfig {
383
383
  selectConfig?: MatPaginatorSelectConfig;
384
384
  }
385
385
  interface InfiniteScrollConfig {
386
- /** Reserved for the future infinite-scroll implementation. */
387
386
  infinite?: boolean;
387
+ /** Number of rows requested per page. Defaults to 10. */
388
+ pageSize?: number;
389
+ /** Distance, in pixels, from the bottom at which the next page is requested. Defaults to 200. */
390
+ scrollThreshold?: number;
391
+ /** Minimum delay, in milliseconds, between scroll checks. Defaults to 100. */
392
+ scrollDebounceTime?: number;
388
393
  }
389
394
  interface DragDropRowChange<TValue = unknown> extends DragDropRowContext<TValue> {
390
395
  previousIndex: number;
@@ -401,6 +406,8 @@ interface DragDropRowChange<TValue = unknown> extends DragDropRowContext<TValue>
401
406
  interface DragDropConfig<TValue = unknown> {
402
407
  enable?: boolean;
403
408
  options?: {
409
+ /** Restricts row dragging to the dedicated handle rendered in the first visible column. */
410
+ handleOnly?: boolean;
404
411
  autoScrollStep?: number;
405
412
  connectedTo?: string[];
406
413
  dragDisabled?: (row: FormGroup) => boolean;
@@ -433,6 +440,7 @@ interface ExtraRowConfig {
433
440
  }
434
441
  interface ExtraRow {
435
442
  extraRows?: ExtraRowConfig[];
443
+ /** Allows several expandable data rows to remain open. Defaults to false. */
436
444
  multiUnfold?: boolean;
437
445
  }
438
446
  type LoaderConfig<T, R> = {
@@ -446,9 +454,9 @@ type Selection<T> = {
446
454
  selection?: SelectionConfig<T>;
447
455
  };
448
456
  type Exclusive<T, U> = (T & {
449
- [K in keyof U]?: never;
457
+ [K in Exclude<keyof U, keyof T>]?: never;
450
458
  }) | (U & {
451
- [K in keyof T]?: never;
459
+ [K in Exclude<keyof T, keyof U>]?: never;
452
460
  });
453
461
  type KlesTableConfig<T = unknown, R = unknown> = DefaultTableConfig & Exclusive<PaginatorConfig, InfiniteScrollConfig> & LoaderConfig<T, R> & DragDrop<R> & Selection<T> & ExtraRow;
454
462
 
@@ -996,6 +1004,7 @@ declare abstract class DragDropBase {
996
1004
  readonly dropListId: string;
997
1005
  constructor(config: DragDropConfig | undefined, eventsService: EventsService, klesForm: KlesForm, injector: Injector, tableId?: string);
998
1006
  get enable(): boolean;
1007
+ get handleOnly(): boolean;
999
1008
  get autoScrollStep(): number;
1000
1009
  get connectedTo(): string[];
1001
1010
  get sortPredicate(): (index: number, item: CdkDrag<FormGroup>) => boolean;
@@ -1229,15 +1238,18 @@ interface IHeaderService {
1229
1238
  register(): void;
1230
1239
  }
1231
1240
 
1241
+ type ExpandedRowId = string | number;
1232
1242
  declare class ExpandedRowStore implements ITableStore {
1243
+ private readonly multiUnfold;
1233
1244
  private readonly _expandedIds$;
1234
- readonly expandedIds$: rxjs.Observable<Set<string>>;
1245
+ readonly expandedIds$: rxjs.Observable<Set<ExpandedRowId>>;
1246
+ constructor(multiUnfold?: boolean);
1235
1247
  reset(): void;
1236
- isExpanded(id: string): boolean;
1237
- get expandedIds(): ReadonlySet<string>;
1238
- expand(id: string): void;
1239
- collapse(id: string): void;
1240
- toggle(id: string): void;
1248
+ isExpanded(id: ExpandedRowId): boolean;
1249
+ get expandedIds(): ReadonlySet<ExpandedRowId>;
1250
+ expand(id: ExpandedRowId): void;
1251
+ collapse(id: ExpandedRowId): void;
1252
+ toggle(id: ExpandedRowId): void;
1241
1253
  static ɵfac: i0.ɵɵFactoryDeclaration<ExpandedRowStore, never>;
1242
1254
  static ɵprov: i0.ɵɵInjectableDeclaration<ExpandedRowStore>;
1243
1255
  }
@@ -1250,7 +1262,7 @@ declare class ExtraRowService {
1250
1262
  displayedColumns: string[];
1251
1263
  })[]>;
1252
1264
  constructor(_extraRowsConfig: WritableSignal<ExtraRowConfig[]>, expandedRowStore: ExpandedRowStore);
1253
- extraColumns(): KlesExtraCellFieldConfig[];
1265
+ extraFields(): IKlesFieldConfig[];
1254
1266
  private createWhen;
1255
1267
  static ɵfac: i0.ɵɵFactoryDeclaration<ExtraRowService, never>;
1256
1268
  static ɵprov: i0.ɵɵInjectableDeclaration<ExtraRowService>;
@@ -1555,10 +1567,12 @@ declare const LOADER_CONFIG: InjectionToken<LoaderConfig<unknown, unknown>>;
1555
1567
  declare const COLUMNS: InjectionToken<WritableSignal<KlesColumnConfig[]>>;
1556
1568
  declare const FOOTER: InjectionToken<WritableSignal<boolean>>;
1557
1569
  declare const EXTRA_ROWS: InjectionToken<WritableSignal<ExtraRowConfig[]>>;
1570
+ declare const MULTI_UNFOLD: InjectionToken<boolean>;
1558
1571
  declare const ROW_DRAG_DROP: InjectionToken<DragDropService>;
1559
1572
  declare const DRAG_DROP_CONFIG: InjectionToken<DragDropConfig<unknown>>;
1560
1573
  declare const KLES_DRAG_DROP_ROW_CONTEXT: InjectionToken<DragDropRowContext<unknown>>;
1561
1574
  declare const PAGINATOR_CONFIG: InjectionToken<PaginatorConfig>;
1575
+ declare const INFINITE_SCROLL_CONFIG: InjectionToken<InfiniteScrollConfig>;
1562
1576
  declare const SORT_CONFIG: InjectionToken<Sort>;
1563
1577
  declare const HEADER_SERVICE: InjectionToken<IHeaderService>;
1564
1578
  declare const LOADER_SERVICE: InjectionToken<ILoader<unknown>>;
@@ -1570,5 +1584,5 @@ declare const SCROLLBAR_ORCHESTRATOR_SERVICE: InjectionToken<IScrollbarOrchestra
1570
1584
  declare const TABLE_SERVICE: InjectionToken<ITableService>;
1571
1585
  declare const EMPTY_STATE_CONFIG: InjectionToken<boolean | EmptyStateConfig>;
1572
1586
 
1573
- export { AlignCell, COLUMNS, DATASOURCE_SERVICE, DRAG_DROP_CONFIG, EMPTY_STATE_CONFIG, EXTRA_ROWS, FOOTER, HEADER_SERVICE, KLES_DRAG_DROP_ROW_CONTEXT, 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 };
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 };
1574
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 };