@coolon/angular-ui-powerups 16.1.0-aplpha.52 → 16.1.0-aplpha.53

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.
@@ -73,8 +73,9 @@ import * as i71 from "@angular/material/menu";
73
73
  import * as i72 from "@angular/material/divider";
74
74
  import * as i73 from "@angular/material/progress-spinner";
75
75
  import * as i74 from "@angular/material/progress-bar";
76
+ import * as i75 from "ng-table-virtual-scroll";
76
77
  export declare class ComponentsModule {
77
78
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
78
- static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractInputComponent, typeof i2.AbstractValueInputComponent, typeof i3.AbstractListInputComponent, typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i8.SelectInputComponent, typeof i9.MultipleSelectInputComponent, typeof i10.AutocompleteInputComponent, typeof i11.CheckboxInputComponent, typeof i12.ScrollContainerComponent, typeof i13.NoopComponent, typeof i14.SwitchCaseComponent, typeof i14.SwitchCaseWhenDirective, typeof i14.SwitchCaseDefaultDirective, typeof i15.FocusContainerComponent, typeof i16.VerticalFocusContainerComponent, typeof i17.FocusableComponent, typeof i18.CardContainerComponent, typeof i19.TableComponent, typeof i20.EditRowControlsComponent, typeof i21.ColumnTemplateDirective, typeof i22.DefaultCellRendererComponent, typeof i23.TableCellComponent, typeof i24.SelectionCellComponent, typeof i25.SelectionHeaderCellComponent, typeof i26.DefaultHeaderCellRendererComponent, typeof i27.TableHeaderCellComponent, typeof i28.IconComponent, typeof i29.SectionHeaderComponent, typeof i30.TableRowMenuComponent, typeof i31.ToolBarComponent, typeof i32.CommandComponent, typeof i33.PopupMenuComponent, typeof i34.CommandFaceComponent, typeof i35.MoreMenuComponent, typeof i36.SeparatorComponent, typeof i37.FlexComponent, typeof i38.AbstractPopupMenuComponent, typeof i39.PopupMenuRendererComponent, typeof i40.TreeTableComponent, typeof i41.TreeInheritanceIconComponent, typeof i42.TreeLabelCellRendererComponent, typeof i43.BusyOverlayComponent, typeof i44.EmptyStateComponent, typeof i45.PaginatorComponent, typeof i46.AbstractTableComponent, typeof i47.AbstractCardContainerComponent, typeof i48.LabelledValueComponent, typeof i49.LoadingContainerComponent, typeof i50.MarkdownComponent, typeof i51.TableBodyComponent, typeof i52.TableMoreMenuComponent, typeof i53.TableMoreMenuPopupComponent, typeof i54.SearchInputComponent], [typeof i55.CommonModule, typeof i56.BrowserAnimationsModule, typeof i57.FormsModule, typeof i58.MatInputModule, typeof i59.MatFormFieldModule, typeof i60.MatSelectModule, typeof i61.MatTabsModule, typeof i62.DirectivesModule, typeof i63.MatIconModule, typeof i64.MatButtonModule, typeof i65.MatCheckboxModule, typeof i66.MatTableModule, typeof i67.PortalModule, typeof i68.CdkScrollableModule, typeof i69.MatTooltipModule, typeof i70.MatAutocompleteModule, typeof i71.MatMenuModule, typeof i72.MatDividerModule, typeof i73.MatProgressSpinnerModule, typeof i74.MatProgressBarModule, typeof i68.ScrollingModule], [typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i11.CheckboxInputComponent, typeof i8.SelectInputComponent, typeof i9.MultipleSelectInputComponent, typeof i10.AutocompleteInputComponent, typeof i12.ScrollContainerComponent, typeof i13.NoopComponent, typeof i14.SwitchCaseComponent, typeof i14.SwitchCaseWhenDirective, typeof i14.SwitchCaseDefaultDirective, typeof i15.FocusContainerComponent, typeof i16.VerticalFocusContainerComponent, typeof i17.FocusableComponent, typeof i18.CardContainerComponent, typeof i19.TableComponent, typeof i20.EditRowControlsComponent, typeof i21.ColumnTemplateDirective, typeof i28.IconComponent, typeof i29.SectionHeaderComponent, typeof i30.TableRowMenuComponent, typeof i31.ToolBarComponent, typeof i32.CommandComponent, typeof i33.PopupMenuComponent, typeof i34.CommandFaceComponent, typeof i35.MoreMenuComponent, typeof i36.SeparatorComponent, typeof i37.FlexComponent, typeof i40.TreeTableComponent, typeof i43.BusyOverlayComponent, typeof i44.EmptyStateComponent, typeof i45.PaginatorComponent, typeof i48.LabelledValueComponent, typeof i49.LoadingContainerComponent, typeof i50.MarkdownComponent, typeof i52.TableMoreMenuComponent, typeof i53.TableMoreMenuPopupComponent, typeof i54.SearchInputComponent]>;
79
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractInputComponent, typeof i2.AbstractValueInputComponent, typeof i3.AbstractListInputComponent, typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i8.SelectInputComponent, typeof i9.MultipleSelectInputComponent, typeof i10.AutocompleteInputComponent, typeof i11.CheckboxInputComponent, typeof i12.ScrollContainerComponent, typeof i13.NoopComponent, typeof i14.SwitchCaseComponent, typeof i14.SwitchCaseWhenDirective, typeof i14.SwitchCaseDefaultDirective, typeof i15.FocusContainerComponent, typeof i16.VerticalFocusContainerComponent, typeof i17.FocusableComponent, typeof i18.CardContainerComponent, typeof i19.TableComponent, typeof i20.EditRowControlsComponent, typeof i21.ColumnTemplateDirective, typeof i22.DefaultCellRendererComponent, typeof i23.TableCellComponent, typeof i24.SelectionCellComponent, typeof i25.SelectionHeaderCellComponent, typeof i26.DefaultHeaderCellRendererComponent, typeof i27.TableHeaderCellComponent, typeof i28.IconComponent, typeof i29.SectionHeaderComponent, typeof i30.TableRowMenuComponent, typeof i31.ToolBarComponent, typeof i32.CommandComponent, typeof i33.PopupMenuComponent, typeof i34.CommandFaceComponent, typeof i35.MoreMenuComponent, typeof i36.SeparatorComponent, typeof i37.FlexComponent, typeof i38.AbstractPopupMenuComponent, typeof i39.PopupMenuRendererComponent, typeof i40.TreeTableComponent, typeof i41.TreeInheritanceIconComponent, typeof i42.TreeLabelCellRendererComponent, typeof i43.BusyOverlayComponent, typeof i44.EmptyStateComponent, typeof i45.PaginatorComponent, typeof i46.AbstractTableComponent, typeof i47.AbstractCardContainerComponent, typeof i48.LabelledValueComponent, typeof i49.LoadingContainerComponent, typeof i50.MarkdownComponent, typeof i51.TableBodyComponent, typeof i52.TableMoreMenuComponent, typeof i53.TableMoreMenuPopupComponent, typeof i54.SearchInputComponent], [typeof i55.CommonModule, typeof i56.BrowserAnimationsModule, typeof i57.FormsModule, typeof i58.MatInputModule, typeof i59.MatFormFieldModule, typeof i60.MatSelectModule, typeof i61.MatTabsModule, typeof i62.DirectivesModule, typeof i63.MatIconModule, typeof i64.MatButtonModule, typeof i65.MatCheckboxModule, typeof i66.MatTableModule, typeof i67.PortalModule, typeof i68.CdkScrollableModule, typeof i69.MatTooltipModule, typeof i70.MatAutocompleteModule, typeof i71.MatMenuModule, typeof i72.MatDividerModule, typeof i73.MatProgressSpinnerModule, typeof i74.MatProgressBarModule, typeof i68.ScrollingModule, typeof i75.TableVirtualScrollModule], [typeof i4.NumberInputComponent, typeof i5.StringInputComponent, typeof i6.TextInputComponent, typeof i7.PasswordInputComponent, typeof i11.CheckboxInputComponent, typeof i8.SelectInputComponent, typeof i9.MultipleSelectInputComponent, typeof i10.AutocompleteInputComponent, typeof i12.ScrollContainerComponent, typeof i13.NoopComponent, typeof i14.SwitchCaseComponent, typeof i14.SwitchCaseWhenDirective, typeof i14.SwitchCaseDefaultDirective, typeof i15.FocusContainerComponent, typeof i16.VerticalFocusContainerComponent, typeof i17.FocusableComponent, typeof i18.CardContainerComponent, typeof i19.TableComponent, typeof i20.EditRowControlsComponent, typeof i21.ColumnTemplateDirective, typeof i28.IconComponent, typeof i29.SectionHeaderComponent, typeof i30.TableRowMenuComponent, typeof i31.ToolBarComponent, typeof i32.CommandComponent, typeof i33.PopupMenuComponent, typeof i34.CommandFaceComponent, typeof i35.MoreMenuComponent, typeof i36.SeparatorComponent, typeof i37.FlexComponent, typeof i40.TreeTableComponent, typeof i43.BusyOverlayComponent, typeof i44.EmptyStateComponent, typeof i45.PaginatorComponent, typeof i48.LabelledValueComponent, typeof i49.LoadingContainerComponent, typeof i50.MarkdownComponent, typeof i52.TableMoreMenuComponent, typeof i53.TableMoreMenuPopupComponent, typeof i54.SearchInputComponent]>;
79
80
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
80
81
  }
@@ -72,7 +72,8 @@ export declare class AbstractTableComponent<Row> extends DisposableComponent imp
72
72
  * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
73
73
  * containment area.
74
74
  */
75
- enableScrolling: boolean;
75
+ accessor enableScrolling$: ValueModel<boolean>;
76
+ accessor enableScrolling: boolean;
76
77
  columns: ListModelChain<ColumnModel<Row>>;
77
78
  columnIds: ListModelChain<string>;
78
79
  private columnsById;
@@ -91,5 +92,5 @@ export declare class AbstractTableComponent<Row> extends DisposableComponent imp
91
92
  protected getModel(): AbstractTableModel<Row>;
92
93
  registerColumnTemplate(columnId: string, templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
93
94
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTableComponent<any>, never>;
94
- static ɵcmp: i0.ɵɵComponentDeclaration<AbstractTableComponent<any>, "aup-abstract-table", never, { "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, {}, never, never, false, never>;
95
+ static ɵcmp: i0.ɵɵComponentDeclaration<AbstractTableComponent<any>, "aup-abstract-table", never, { "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "enableScrolling$": { "alias": "enableScrolling$"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, {}, never, never, false, never>;
95
96
  }
@@ -1,29 +1,54 @@
1
- import { EventEmitter, OnInit } from "@angular/core";
2
- import { ListModel, ListModelChain, MutableValueModel, ValueModel } from "@coolon/pectin";
1
+ import { CollectionViewer, DataSource } from "@angular/cdk/collections";
2
+ import { CdkVirtualScrollViewport, FixedSizeVirtualScrollStrategy } from "@angular/cdk/scrolling";
3
+ import { OnInit } from "@angular/core";
4
+ import { Disposable, GarbageCollector, ListModel, ListModelChain, MutableValueModel, ValueModel, ValueModelChain } from "@coolon/pectin";
5
+ import { TableVirtualScrollDataSource } from "ng-table-virtual-scroll";
6
+ import { BehaviorSubject, Observable } from "rxjs";
3
7
  import { ResizeAwareComponent } from "../../../resize-aware.component";
4
8
  import { AbstractTableModel } from "../../abstract-table-model";
5
9
  import { ColumnModel } from "../../column/column-model";
6
10
  import * as i0 from "@angular/core";
11
+ /**
12
+ * Virtual Scroll Strategy
13
+ */
14
+ export declare class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy {
15
+ protected readonly garbage: GarbageCollector;
16
+ constructor(rowHeight$: ValueModel<number>, minBufferPx: number, maxBufferPx: number);
17
+ }
18
+ export declare class VirtualScrollDataSource<Row> extends DataSource<Row> implements Disposable, Disposable.Collector {
19
+ readonly viewport: CdkVirtualScrollViewport;
20
+ readonly rowHeight$: ValueModel<number>;
21
+ private garbage;
22
+ readonly virtualScrollRowRange$: ValueModelChain<{
23
+ start: number;
24
+ end: number;
25
+ }>;
26
+ readonly virtualScrollSpacerSize$: ValueModelChain<number>;
27
+ readonly totalContentSize$: ValueModelChain<number>;
28
+ readonly showVirtualScrollOffset: (index: number, rowData: any) => boolean;
29
+ protected readonly virtualRowsObservable$: BehaviorSubject<readonly Row[]>;
30
+ private readonly virtualScrollPixelOffset$;
31
+ constructor(viewport: CdkVirtualScrollViewport, data$: ListModel<Row>, rowHeight$: ValueModel<number>, pageSize$: ValueModel<number>);
32
+ dispose(): void;
33
+ registerDisposable<T extends Disposable>(disposable: T): T;
34
+ connect(collectionViewer: CollectionViewer): Observable<readonly Row[]>;
35
+ disconnect(collectionViewer: CollectionViewer): void;
36
+ }
7
37
  export declare class TableBodyComponent<Row> extends ResizeAwareComponent implements OnInit {
8
38
  accessor data$: ListModel<Row>;
9
39
  accessor tableModel: AbstractTableModel<Row>;
10
40
  accessor showHeader$: ValueModel<boolean>;
11
41
  accessor showHeader: boolean;
12
- readonly visibleRowCount: EventEmitter<number>;
13
42
  trackBy: (index: number, item: Row) => any;
14
- /**
15
- * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
16
- * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
17
- * containment area.
18
- */
19
- enableScrolling: boolean;
43
+ accessor scrollMode$: ValueModel<TableBodyComponent.ScrollMode>;
44
+ accessor scrollMode: TableBodyComponent.ScrollMode;
20
45
  columns$: ListModelChain<ColumnModel<Row>>;
21
46
  columnIds$: ListModelChain<string>;
22
47
  private columnsById$;
23
- readonly _visibleRowCount$: ValueModel<number>;
24
- private readonly headerHeight$;
48
+ protected readonly headerHeight$: MutableValueModel<number>;
25
49
  protected rowHeight$: MutableValueModel<number>;
26
50
  baseCssClass: string;
51
+ protected virtualScrollDataSource: TableVirtualScrollDataSource<Row>;
27
52
  constructor();
28
53
  get hideHeader(): boolean;
29
54
  isEditing(row: Row): boolean;
@@ -32,5 +57,8 @@ export declare class TableBodyComponent<Row> extends ResizeAwareComponent implem
32
57
  isLastVisibleColumn(columnId: string): boolean;
33
58
  getColumnClasses(columnId: string): string[];
34
59
  static ɵfac: i0.ɵɵFactoryDeclaration<TableBodyComponent<any>, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "enableScrolling": { "alias": "enableScrolling"; "required": false; }; }, { "visibleRowCount": "visibleRowCount"; }, never, never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableBodyComponent<any>, "aup-table-body", never, { "data$": { "alias": "data$"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; "showHeader$": { "alias": "showHeader$"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, never, false, never>;
61
+ }
62
+ export declare namespace TableBodyComponent {
63
+ type ScrollMode = "none" | "classic" | "virtual";
36
64
  }
@@ -1,8 +1,9 @@
1
1
  import { Injector, OnInit } from "@angular/core";
2
- import { ValueModel } from "@coolon/pectin";
2
+ import { ValueModelChain } from "@coolon/pectin";
3
3
  import { AbstractTableModel } from '../abstract-table-model';
4
4
  import { AbstractTableComponent } from '../abstract-table.component';
5
5
  import { TableFilterModel } from "../filter/table-filter-model";
6
+ import { TableBodyComponent } from "../renderer/table-body/table-body.component";
6
7
  import { TableModel } from "./table-model";
7
8
  import * as i0 from "@angular/core";
8
9
  /**
@@ -68,20 +69,13 @@ import * as i0 from "@angular/core";
68
69
  export declare class TableComponent<Row> extends AbstractTableComponent<Row> implements OnInit {
69
70
  accessor tableModel: TableModel<Row>;
70
71
  accessor filterModel: TableFilterModel<Row>;
71
- accessor enablePaging$: ValueModel<boolean>;
72
- accessor enablePaging: boolean;
73
72
  private _footerContentAdded;
74
73
  private readonly _filteredRows$;
75
- private _pageSize;
76
- private pagedListModel;
74
+ protected readonly scrollMode$: ValueModelChain<TableBodyComponent.ScrollMode>;
77
75
  constructor(injector: Injector);
78
76
  ngOnInit(): void;
79
77
  protected getModel(): AbstractTableModel<Row>;
80
- get pageController(): import("@coolon/pectin").PageController;
81
- private configurePaging;
82
- private disposeOfPagedListModel;
83
78
  footerContentChanged($event: any): void;
84
- updatePageSize(count: number): void;
85
79
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
86
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "enablePaging$": { "alias": "enablePaging$"; "required": false; }; "enablePaging": { "alias": "enablePaging"; "required": false; }; }, {}, never, ["[footer]"], false, never>;
80
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; }, {}, never, ["[footer]"], false, never>;
87
81
  }
@@ -1,7 +1,9 @@
1
1
  import { Injector, OnInit } from "@angular/core";
2
+ import { ValueModel } from '@coolon/pectin';
2
3
  import { TreeNode } from '@coolon/typescript-utilities';
3
4
  import { AbstractTableModel } from '../abstract-table-model';
4
5
  import { AbstractTableComponent } from '../abstract-table.component';
6
+ import { TableBodyComponent } from "../renderer/table-body/table-body.component";
5
7
  import { TreeExpansionModel } from "./tree-expansion-model";
6
8
  import { TreeTableModel } from './tree-table-model';
7
9
  import * as i0 from "@angular/core";
@@ -68,6 +70,7 @@ import * as i0 from "@angular/core";
68
70
  export declare class TreeTableComponent<T extends TreeNode<T>> extends AbstractTableComponent<T> implements OnInit {
69
71
  accessor treeTableModel: TreeTableModel<T>;
70
72
  accessor expansionModel: TreeExpansionModel<T>;
73
+ protected readonly scrollMode$: ValueModel<TableBodyComponent.ScrollMode>;
71
74
  constructor(injector: Injector);
72
75
  ngOnInit(): void;
73
76
  getModel(): AbstractTableModel<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-aplpha.52",
3
+ "version": "16.1.0-aplpha.53",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",
@@ -23,7 +23,8 @@
23
23
  "immer": ">=10.0.3",
24
24
  "escape-string-regexp": "^5.0.0",
25
25
  "@coolon/typescript-utilities": "^5.0.0-alpha.4",
26
- "fractional-indexing": "^3.2.0"
26
+ "fractional-indexing": "^3.2.0",
27
+ "ng-table-virtual-scroll": "^1.6.0"
27
28
  },
28
29
  "optionalDependencies": {
29
30
  "@fortawesome/fontawesome-free": "^6.0.0"