@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.
@@ -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 trackChangesAndMarkForCheck(...models: HasValue<any>[]): void;
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>): void;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-aplpha.110",
3
+ "version": "16.1.0-aplpha.112",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",