@coolon/angular-ui-powerups 16.1.0-aplpha.110 → 16.1.0-aplpha.112
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/esm2022/lib/components/disposable-component.mjs +4 -3
- package/esm2022/lib/components/tables/abstract-table-model.mjs +21 -3
- package/esm2022/lib/components/tables/table/table-model.mjs +1 -1
- package/esm2022/lib/components/tables/table/table.component.mjs +3 -2
- package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +5 -4
- package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +2 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +30 -9
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/disposable-component.d.ts +3 -2
- package/lib/components/tables/abstract-table-model.d.ts +13 -2
- package/lib/components/tables/tree-table/tree-table-model.d.ts +2 -1
- package/package.json +1 -1
|
@@ -11,11 +11,12 @@ export declare class DisposableComponent extends GarbageCollector implements OnI
|
|
|
11
11
|
protected inject<T>(token: ProviderToken<T>): T;
|
|
12
12
|
/**
|
|
13
13
|
* Monitors the specified models for any change and triggers and angular change detect cycle. This is intended for use
|
|
14
|
-
* when the component uses the ON_PUSH change detection strategy
|
|
14
|
+
* when the component uses the ON_PUSH change detection strategy or when it is contained within another component that
|
|
15
|
+
* does (e.g. aup-table, aup-tree-table)
|
|
15
16
|
* @param models
|
|
16
17
|
* @protected
|
|
17
18
|
*/
|
|
18
|
-
protected
|
|
19
|
+
protected viewStateDependsOn(...models: HasValue<any>[]): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisposableComponent, never>;
|
|
20
21
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DisposableComponent, never, never, {}, {}, never, never, false, never>;
|
|
21
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from "@angular/cdk/overlay";
|
|
2
2
|
import { Injector } from "@angular/core";
|
|
3
|
-
import { BooleanValueModelChain, Command, Constructable, DelegatingListModel, DirtyTrackingForm, Disposable, GarbageCollector, ListModel, SelectionModel, Types, ValueModel, ValueModelChain } from "@coolon/pectin";
|
|
3
|
+
import { BooleanValueModelChain, Command, Constructable, DelegatingListModel, DependsOnOptions, DirtyTrackingForm, Disposable, GarbageCollector, HasValue, ListModel, SelectionModel, Types, ValueModel, ValueModelChain } from "@coolon/pectin";
|
|
4
4
|
import { ColumnManager } from "./column/column-manager";
|
|
5
5
|
import { CellRendererOptions, ColumnModel, OnComponentInit } from "./column/column-model";
|
|
6
6
|
import { ColumnOrderManager } from "./column/column-order-manager";
|
|
@@ -44,6 +44,7 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
44
44
|
readonly leadSelection$: ValueModel<Row>;
|
|
45
45
|
readonly hasSelection$: BooleanValueModelChain;
|
|
46
46
|
footerRowModel: FooterRowModel.Impl<any>;
|
|
47
|
+
private readonly _viewDependencies;
|
|
47
48
|
constructor();
|
|
48
49
|
protected setDataSource(dataSource$: any): void;
|
|
49
50
|
/**
|
|
@@ -53,6 +54,16 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
53
54
|
* @param rest
|
|
54
55
|
*/
|
|
55
56
|
initialise(injector: Injector, identityOf: (item: Row) => any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Adds additional models that will trigger a table repaint. This is required if the table
|
|
59
|
+
* needs to be redrawn outside of changes to the rows of filters. i.e. some eternal state is used
|
|
60
|
+
* to assign row classes etc.
|
|
61
|
+
*
|
|
62
|
+
* Note: This function must be called before the table is bound to the model.
|
|
63
|
+
* @param hasValues
|
|
64
|
+
*/
|
|
65
|
+
viewStateDependsOn(...hasValues: ReadonlyArray<HasValue<any>>): void;
|
|
66
|
+
get viewStateDependencies(): ReadonlyArray<HasValue<any>>;
|
|
56
67
|
get dataSource$(): ListModel<Row>;
|
|
57
68
|
/**
|
|
58
69
|
* Gets the rows that are visible after any filters are applied. If there are
|
|
@@ -84,7 +95,7 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
84
95
|
addMoreMenu<C extends TableMoreMenuPopupComponent<Row>>(componentClass: Constructable<C>, initialiseCallback?: (component: C) => void): CustomValueColumnModel<Row, Row>;
|
|
85
96
|
addFooterRow<C>(component: ComponentType<C>, initialiseCallback?: (component: C) => void): FooterRowModel<C>;
|
|
86
97
|
addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row>;
|
|
87
|
-
addRowClass(className: string, predicate: (row: Row) => boolean): void;
|
|
98
|
+
addRowClass(className: string, predicate: (row: Row) => boolean, options?: DependsOnOptions): void;
|
|
88
99
|
addRowAttribute(attributeName: string, getValue: (row: Row) => string): void;
|
|
89
100
|
getRowClasses(row: Row): string[];
|
|
90
101
|
getRowAttributes(row: Row): Record<string, string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from "@angular/core";
|
|
1
2
|
import { ListModel, MutableValueModel, SelectionModel, ValueModel } from '@coolon/pectin';
|
|
2
3
|
import { AbstractTableModel } from '../abstract-table-model';
|
|
3
4
|
import { SelectionColumnModel } from "../column/selection-column-model";
|
|
@@ -13,7 +14,7 @@ export declare class TreeTableModel<Row extends object> extends AbstractTableMod
|
|
|
13
14
|
private _isExpandedPredicate$;
|
|
14
15
|
constructor(source$: ListModel<Row>, childAccessor: ChildArrayPropertiesOf<Row> | ((node: Row) => Row[]), builder?: (model: TreeTableModel<Row>) => void);
|
|
15
16
|
get isExpandedPredicate$(): ValueModel<(node: Row) => boolean>;
|
|
16
|
-
bindToTable(expansionModel: TreeExpansionModel<Row>, filteredRows$: ListModel<Row>, visibleRows$: ListModel<Row
|
|
17
|
+
bindToTable(expansionModel: TreeExpansionModel<Row>, filteredRows$: ListModel<Row>, visibleRows$: ListModel<Row>, cdr: ChangeDetectorRef): void;
|
|
17
18
|
treeControlColumn(builder: (column: TreeLabelColumnModel<Row>) => void): void;
|
|
18
19
|
expand(node: Row): void;
|
|
19
20
|
collapse(node: Row): void;
|