@coolon/angular-ui-powerups 16.1.0-aplpha.122 → 16.1.0-aplpha.124
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/tables/abstract-table-model.mjs +11 -23
- package/esm2022/lib/components/tables/column/column-model.mjs +4 -4
- package/esm2022/lib/components/tables/column/selection-column-model.mjs +31 -12
- package/esm2022/lib/components/tables/renderer/cell-portal-ref.mjs +6 -6
- package/esm2022/lib/components/tables/renderer/table-cell/table-cell.component.mjs +6 -6
- package/esm2022/lib/components/tables/table/table-model.mjs +9 -3
- package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +1 -4
- package/fesm2022/coolon-angular-ui-powerups.mjs +56 -47
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +3 -4
- package/lib/components/tables/column/selection-column-model.d.ts +7 -3
- package/lib/components/tables/renderer/cell-portal-ref.d.ts +7 -7
- package/lib/components/tables/renderer/table-cell/table-cell.component.d.ts +1 -2
- package/lib/components/tables/table/table-model.d.ts +2 -3
- package/lib/components/tables/tree-table/tree-table-model.d.ts +1 -3
- package/package.json +1 -1
|
@@ -13,8 +13,8 @@ import { PropertyColumnModel } from "./column/property-column-model";
|
|
|
13
13
|
import { SelectionColumnModel } from "./column/selection-column-model";
|
|
14
14
|
import { EditSession } from "./editor/edit-session";
|
|
15
15
|
import { TextSearchPredicate } from "./filter/text-search-predicate";
|
|
16
|
-
import { CellRenderer } from "./renderer/cell-renderer";
|
|
17
16
|
import { FooterRowModel } from "./footer/footer-row-model";
|
|
17
|
+
import { CellRenderer } from "./renderer/cell-renderer";
|
|
18
18
|
import { TableMoreMenuPopupComponent } from "./renderer/table-more-menu/table-more-menu-popup/table-more-menu-popup.component";
|
|
19
19
|
export declare abstract class AbstractTableModel<Row extends object> extends GarbageCollector {
|
|
20
20
|
protected readonly _dataSource$: DelegatingListModel<Row>;
|
|
@@ -30,7 +30,7 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
30
30
|
private _columnTextPropertiesLookup;
|
|
31
31
|
readonly editing$: BooleanValueModelChain;
|
|
32
32
|
readonly firstEditableColumn$: ValueModelChain<ColumnModel<Row>>;
|
|
33
|
-
|
|
33
|
+
readonly selectionColumnModel: SelectionColumnModel<Row>;
|
|
34
34
|
private rowSelectionDisabledOnAllColumns$;
|
|
35
35
|
private readonly rowClickListeners;
|
|
36
36
|
readonly firstVisibleColumn$: ValueModel<ColumnModel<Row>>;
|
|
@@ -39,7 +39,6 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
39
39
|
readonly textSearchPredicate$: ValueModel<TextSearchPredicate<Row>>;
|
|
40
40
|
protected identityOf: (item: Row) => any;
|
|
41
41
|
readonly dataSourceEmpty$: ValueModel<boolean>;
|
|
42
|
-
private readonly selectionModelProxy;
|
|
43
42
|
readonly selectedItems$: ListModel<Row>;
|
|
44
43
|
readonly leadSelection$: ValueModel<Row>;
|
|
45
44
|
readonly hasSelection$: BooleanValueModelChain;
|
|
@@ -87,7 +86,7 @@ export declare abstract class AbstractTableModel<Row extends object> extends Gar
|
|
|
87
86
|
pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P, options?: {
|
|
88
87
|
columnId: string;
|
|
89
88
|
}): ListPropertyColumnModel<Row, P>;
|
|
90
|
-
|
|
89
|
+
useSelectionModel(selectionModel?: SelectionModel<Row>): void;
|
|
91
90
|
addEditControls(saveCommandFactory: Command.Factory<DirtyTrackingForm<Row>, boolean | Promise<boolean>>, formFactory?: (row: Row) => DirtyTrackingForm<Row>): EditorControlColumnModel<Row>;
|
|
92
91
|
addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V>;
|
|
93
92
|
addComponentColumn<C extends CellRenderer<Partial<Row>>>(columnId: string, component: ComponentType<C>, onInit?: OnComponentInit<C>): CustomValueColumnModel<Row, Row>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ThemePalette } from "@angular/material/core";
|
|
2
|
-
import {
|
|
2
|
+
import { GarbageCollector, SelectionModel } from "@coolon/pectin";
|
|
3
3
|
import { ColumnModel } from "./column-model";
|
|
4
4
|
import { ColumnOrderManager } from "./column-order-manager";
|
|
5
5
|
export declare class SelectionColumnModel<Row extends object> extends ColumnModel<Row> {
|
|
6
|
-
readonly selectionModel: Proxified<SelectionModel<Row>>;
|
|
7
6
|
private _enableHeaderControls;
|
|
8
7
|
private _color;
|
|
9
|
-
|
|
8
|
+
private readonly _selectionModelProxy;
|
|
9
|
+
private _isUsingTemporarySelection$;
|
|
10
|
+
private _userSelectionModel;
|
|
11
|
+
constructor(columnId: string, order: ColumnOrderManager, defaults: ColumnModel.TextPropertiesProvider);
|
|
12
|
+
get selectionModel(): SelectionModel<Row>;
|
|
10
13
|
useSelectionModel(selectionModel: SelectionModel<Row>): void;
|
|
11
14
|
protected getDefaultHeaderText(): string;
|
|
12
15
|
enableHeaderControls(enable: boolean): this;
|
|
@@ -16,4 +19,5 @@ export declare class SelectionColumnModel<Row extends object> extends ColumnMode
|
|
|
16
19
|
color(color: ThemePalette): void;
|
|
17
20
|
selectRow(row: Row): void;
|
|
18
21
|
isSelected(row: Row): boolean;
|
|
22
|
+
withTemporarySelectionModel<S extends SelectionModel<Row>>(createSelectionModel: (garbage: GarbageCollector) => S, process: (selectionModel: S) => Promise<void>): Promise<void>;
|
|
19
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
|
-
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Host, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { ColumnModel, RowData } from '../column/column-model';
|
|
4
4
|
import { EditSession } from '../editor/edit-session';
|
|
5
5
|
import { TableCellComponent } from './table-cell/table-cell.component';
|
|
@@ -11,14 +11,14 @@ export declare const CELL_EDITOR_PORTAL: unique symbol;
|
|
|
11
11
|
export declare const PORTAL_RENDERER_COMPONENT: unique symbol;
|
|
12
12
|
export declare const PORTAL_EDITOR_COMPONENT: unique symbol;
|
|
13
13
|
export declare abstract class CellPortalRef<Row extends object, Host, Portal> {
|
|
14
|
-
abstract initialiseHost(host: Host
|
|
14
|
+
abstract initialiseHost(host: Host): void;
|
|
15
15
|
abstract onPortalAttached(host: Host, portalComponent: Portal): void;
|
|
16
16
|
}
|
|
17
17
|
export declare class CellHeaderPortalRef<Row extends object, C> extends CellPortalRef<Row, TableHeaderCellComponent, C> {
|
|
18
18
|
readonly componentType: ComponentType<C>;
|
|
19
19
|
readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
|
|
20
20
|
constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
|
|
21
|
-
initialiseHost(host:
|
|
21
|
+
initialiseHost(host: Host): void;
|
|
22
22
|
onPortalAttached(host: TableHeaderCellComponent, portalComponent: C): void;
|
|
23
23
|
}
|
|
24
24
|
export declare abstract class CellRendererPortalRef<Row extends object, Portal> extends CellPortalRef<Row, TableCellComponent<Row>, Portal> {
|
|
@@ -28,7 +28,7 @@ export declare class ComponentCellRendererPortalRef<Row extends object, Portal>
|
|
|
28
28
|
readonly componentType: ComponentType<Portal>;
|
|
29
29
|
readonly updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void;
|
|
30
30
|
constructor(componentType: ComponentType<Portal>, updateComponent: (component: Portal, rowData: RowData<Row>, firstTime: boolean) => void);
|
|
31
|
-
initialiseHost(host:
|
|
31
|
+
initialiseHost(host: Host): void;
|
|
32
32
|
onPortalAttached(host: TableCellComponent<Row>, portalComponent: Portal): void;
|
|
33
33
|
pushState(host: TableCellComponent<Row>): void;
|
|
34
34
|
}
|
|
@@ -36,7 +36,7 @@ export declare class CellEditorPortalRef<Row extends object, Portal> extends Cel
|
|
|
36
36
|
readonly componentType: ComponentType<Portal>;
|
|
37
37
|
readonly initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void;
|
|
38
38
|
constructor(componentType: ComponentType<Portal>, initialiseEditorSession: (component: Portal, editSession: EditSession<Row>) => void);
|
|
39
|
-
initialiseHost(host:
|
|
39
|
+
initialiseHost(host: Host): void;
|
|
40
40
|
onPortalAttached(host: TableCellComponent<Row>, portalComponent: Portal): void;
|
|
41
41
|
}
|
|
42
42
|
export declare class TemplateCellRendererPortalRef<Row extends object> extends CellRendererPortalRef<Row, undefined> {
|
|
@@ -46,7 +46,7 @@ export declare class TemplateCellRendererPortalRef<Row extends object> extends C
|
|
|
46
46
|
private padChild;
|
|
47
47
|
constructor();
|
|
48
48
|
registerPortal(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
|
|
49
|
-
initialiseHost(host:
|
|
49
|
+
initialiseHost(host: Host): void;
|
|
50
50
|
onPortalAttached(host: TableCellComponent<Row>, portalComponent: undefined): void;
|
|
51
51
|
pushState(host: TableCellComponent<Row>): void;
|
|
52
52
|
private createPortal;
|
|
@@ -55,6 +55,6 @@ export declare class CellFooterPortalRef<Row extends object, C> extends CellPort
|
|
|
55
55
|
readonly componentType: ComponentType<C>;
|
|
56
56
|
readonly initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void;
|
|
57
57
|
constructor(componentType: ComponentType<C>, initialiseHeader: (component: C, columnModel: ColumnModel<Row>) => void);
|
|
58
|
-
initialiseHost(host:
|
|
58
|
+
initialiseHost(host: Host): void;
|
|
59
59
|
onPortalAttached(host: TableHeaderCellComponent, portalComponent: C): void;
|
|
60
60
|
}
|
|
@@ -11,13 +11,12 @@ export declare class TableCellComponent<Row extends object> extends DisposableCo
|
|
|
11
11
|
column: ColumnModel<Row>;
|
|
12
12
|
editSession: EditSession<Row>;
|
|
13
13
|
tableModel: AbstractTableModel<Row>;
|
|
14
|
-
private editRowCommand;
|
|
14
|
+
private readonly editRowCommand;
|
|
15
15
|
[CELL_RENDERER_PORTAL]: Portal<any>;
|
|
16
16
|
[CELL_EDITOR_PORTAL]: Portal<any>;
|
|
17
17
|
defaultClassNames: string;
|
|
18
18
|
fillCell: boolean;
|
|
19
19
|
padChild: boolean;
|
|
20
|
-
private firstEditableColumn;
|
|
21
20
|
constructor();
|
|
22
21
|
hasActiveEditor(): boolean;
|
|
23
22
|
initialiseRenderer(ref: CdkPortalOutletAttachedRef): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ListModel,
|
|
1
|
+
import { ListModel, MultipleSelectionModel } from "@coolon/pectin";
|
|
2
2
|
import { AbstractTableModel } from "../abstract-table-model";
|
|
3
|
-
import { SelectionColumnModel } from "../column/selection-column-model";
|
|
4
3
|
/**
|
|
5
4
|
* Example:
|
|
6
5
|
* @example
|
|
@@ -83,5 +82,5 @@ import { SelectionColumnModel } from "../column/selection-column-model";
|
|
|
83
82
|
export declare class TableModel<Row extends object> extends AbstractTableModel<Row> {
|
|
84
83
|
constructor(sourceOfTruth?: ListModel<Row>, builder?: (table: TableModel<Row>) => void);
|
|
85
84
|
bindToTable(filteredRows$: ListModel<Row>, visibleRows$: ListModel<Row>): void;
|
|
86
|
-
|
|
85
|
+
withTemporaryMultipleSelectionModel(process: (selectionModel: MultipleSelectionModel<Row, any>) => Promise<void>): Promise<void>;
|
|
87
86
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef } from "@angular/core";
|
|
2
|
-
import { ListModel, MutableValueModel,
|
|
2
|
+
import { ListModel, MutableValueModel, ValueModel } from '@coolon/pectin';
|
|
3
3
|
import { AbstractTableModel } from '../abstract-table-model';
|
|
4
|
-
import { SelectionColumnModel } from "../column/selection-column-model";
|
|
5
4
|
import { TreeExpansionModel } from './tree-expansion-model';
|
|
6
5
|
import { TreeLabelColumnModel } from './tree-label-column-model';
|
|
7
6
|
export type ChildArrayPropertiesOf<T> = {
|
|
@@ -21,7 +20,6 @@ export declare class TreeTableModel<Row extends object> extends AbstractTableMod
|
|
|
21
20
|
isCollapsed(node: Row): boolean;
|
|
22
21
|
ensureAncestorsAndSelfVisible(node: Row): void;
|
|
23
22
|
isExpanded(row: Row): boolean;
|
|
24
|
-
addSelectionColumn(selectionModel?: SelectionModel<Row>, showSelectionColumn?: ValueModel<boolean> | boolean): SelectionColumnModel<Row>;
|
|
25
23
|
}
|
|
26
24
|
export declare namespace TreeTableModel {
|
|
27
25
|
interface Options<T, K extends keyof T> {
|