@coolon/angular-ui-powerups 1.18.0 → 1.18.1
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/CHANGELOG.md +7 -0
- package/assets/table.scss +12 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +64 -21
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +45 -9
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +13 -5
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +6 -7
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/table/column-model.js +45 -9
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +13 -5
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +6 -7
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +65 -22
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +65 -22
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/column-model.d.ts +15 -9
- package/lib/components/table/table-model.d.ts +5 -2
- package/lib/components/table/table.component.d.ts +5 -6
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export declare class ColumnModel<Row> {
|
|
|
19
19
|
private _columnHeaderPortalRef;
|
|
20
20
|
private _cellRendererPortalRef;
|
|
21
21
|
private _cellEditorPortalRef;
|
|
22
|
+
private _selectRowOnClick;
|
|
22
23
|
constructor(columnId: string, defaults: ColumnModel.Defaults);
|
|
23
24
|
getHeaderText(): string;
|
|
24
25
|
protected getDefaultHeaderText(): string;
|
|
@@ -35,6 +36,10 @@ export declare class ColumnModel<Row> {
|
|
|
35
36
|
onRendererAttached(host: TableCellRendererComponent<Row>, component: any): void;
|
|
36
37
|
onEditorAttached(host: TableCellRendererComponent<Row>, component: any): void;
|
|
37
38
|
updatePortalContent(host: TableCellRendererComponent<Row>): void;
|
|
39
|
+
protected selectRowOnClick(selectOnRowClick: boolean): this;
|
|
40
|
+
isRowSelectionEnabled(): boolean | undefined;
|
|
41
|
+
isRowSelectionExplicitlyEnabled(): boolean;
|
|
42
|
+
isRowSelectionExplicitlyDisabled(): boolean;
|
|
38
43
|
}
|
|
39
44
|
export declare namespace ColumnModel {
|
|
40
45
|
interface Defaults {
|
|
@@ -55,6 +60,7 @@ export declare class PropertyColumnModel<Row, P extends Types.ValuePropertiesOf<
|
|
|
55
60
|
cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, validators?: Validator<Row[P]>[], initialiseComponent?: (component: E) => void): this;
|
|
56
61
|
cellEditor<E extends CellEditorComponent<Row[P]>>(editor: ComponentType<E>, initialiseComponent?: (component: E) => void): this;
|
|
57
62
|
format(formatter: (value: Row[P]) => any): this;
|
|
63
|
+
selectRowOnClick(selectOnRowClick: boolean): this;
|
|
58
64
|
}
|
|
59
65
|
export declare class ListPropertyColumnModel<Row, P extends Types.ArrayPropertiesOf<Row>> extends ColumnModel<Row> {
|
|
60
66
|
readonly property: P;
|
|
@@ -66,6 +72,7 @@ export declare class ListPropertyColumnModel<Row, P extends Types.ArrayPropertie
|
|
|
66
72
|
cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, validators?: Validator<Types.ArrayElementType<Row, P>[]>[], initialiseComponent?: (component: C) => void): this;
|
|
67
73
|
cellEditor<C extends CellListEditorComponent<Types.ArrayElementType<Row, P>>>(editor: ComponentType<C>, initialiseComponent?: (component: C) => void): this;
|
|
68
74
|
format(formatter: (value: Types.ArrayElementType<Row, P>[]) => any): this;
|
|
75
|
+
selectRowOnClick(selectOnRowClick: boolean): this;
|
|
69
76
|
}
|
|
70
77
|
export declare class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {
|
|
71
78
|
private getValue;
|
|
@@ -73,6 +80,7 @@ export declare class CustomValueColumnModel<Row, V> extends ColumnModel<Row> {
|
|
|
73
80
|
cellRenderer(componentType: ComponentType<{
|
|
74
81
|
value: V;
|
|
75
82
|
}>): this;
|
|
83
|
+
selectRowOnClick(selectOnRowClick: boolean): this;
|
|
76
84
|
}
|
|
77
85
|
export declare class EditorControlColumnModel<Row> extends ColumnModel<Row> {
|
|
78
86
|
constructor(columnId: string, saveCommand: UnaryCommand<Form<Row>, boolean>, defaults: ColumnModel.Defaults);
|
|
@@ -87,17 +95,15 @@ export declare class CustomTemplateColumnModel<Row> extends ColumnModel<Row> {
|
|
|
87
95
|
private readonly config;
|
|
88
96
|
constructor(columnId: string, defaults: ColumnModel.Defaults);
|
|
89
97
|
setTemplate(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
|
|
98
|
+
selectRowOnClick(selectOnRowClick: boolean): this;
|
|
90
99
|
}
|
|
91
100
|
export declare class SelectionColumnModel<Row> extends ColumnModel<Row> {
|
|
92
101
|
private readonly selectionModel;
|
|
93
|
-
|
|
94
|
-
constructor(columnId: string, defaults: ColumnModel.Defaults, selectionModel: SelectionModel<Row
|
|
102
|
+
private _enableHeaderControls;
|
|
103
|
+
constructor(columnId: string, defaults: ColumnModel.Defaults, selectionModel: SelectionModel<Row>);
|
|
95
104
|
protected getDefaultHeaderText(): string;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
headerControl?: boolean;
|
|
101
|
-
selectOnRowClick?: boolean;
|
|
102
|
-
}
|
|
105
|
+
isRowSelectionEnabledByDefault(): boolean | undefined;
|
|
106
|
+
selectOnRowClick(selectOnRowClick: boolean): this;
|
|
107
|
+
enableHeaderControls(enable: boolean): this;
|
|
108
|
+
selectRow(row: Row): void;
|
|
103
109
|
}
|
|
@@ -87,6 +87,7 @@ export declare class TableModel<Row> {
|
|
|
87
87
|
readonly dataSource: ListModelChain<Row>;
|
|
88
88
|
readonly firstEditableColumn: ValueModelChain<ColumnModel<Row>>;
|
|
89
89
|
private selectionColumnModel;
|
|
90
|
+
private hasColumnsWithRowSelectionExplicitlyEnabled;
|
|
90
91
|
static fromList<Row>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TableModel<Row>) => void): TableModel<Row>;
|
|
91
92
|
private _createForm;
|
|
92
93
|
protected constructor(sourceOfTruth: ListModel<Row>);
|
|
@@ -95,7 +96,7 @@ export declare class TableModel<Row> {
|
|
|
95
96
|
get columns(): ListModel<ColumnModel<Row>>;
|
|
96
97
|
pluck<P extends Types.ValuePropertiesOf<Row>>(property: P): PropertyColumnModel<Row, P>;
|
|
97
98
|
pluckList<P extends Types.ArrayPropertiesOf<Row>>(property: P): ListPropertyColumnModel<Row, P>;
|
|
98
|
-
addSelectionColumn(selectionModel: SelectionModel<Row
|
|
99
|
+
addSelectionColumn(selectionModel: SelectionModel<Row>): SelectionColumnModel<Row>;
|
|
99
100
|
addEditControls(saveCommand: UnaryCommand<Form<Row>, boolean>): EditorControlColumnModel<Row>;
|
|
100
101
|
addCustomColumn<V>(columnId: string, dataAccessor: (row: Row) => V): CustomValueColumnModel<Row, V>;
|
|
101
102
|
addTemplateColumn<V>(columnId: string): CustomTemplateColumnModel<Row>;
|
|
@@ -108,6 +109,8 @@ export declare class TableModel<Row> {
|
|
|
108
109
|
startEditSession(row: Row): EditSession<Row>;
|
|
109
110
|
getEditSessionFor(row: Row): EditSession<Row>;
|
|
110
111
|
cancelAllEditorSessions(): void;
|
|
111
|
-
|
|
112
|
+
isRowSelectionEnabledFor(column: ColumnModel<Row>): boolean | undefined;
|
|
113
|
+
isRowSelectionEnabledByDefault(): boolean;
|
|
112
114
|
isRowSelectionEnabled(): boolean;
|
|
115
|
+
selectRow(row: Row): void;
|
|
113
116
|
}
|
|
@@ -30,15 +30,14 @@ import { TableModel } from './table-model';
|
|
|
30
30
|
* }
|
|
31
31
|
* }
|
|
32
32
|
*/
|
|
33
|
-
export declare class TableComponent<
|
|
34
|
-
tableModel: TableModel<
|
|
35
|
-
columns: ListModelChain<ColumnModel<
|
|
33
|
+
export declare class TableComponent<Row> extends DisposableComponent implements OnInit {
|
|
34
|
+
tableModel: TableModel<Row>;
|
|
35
|
+
columns: ListModelChain<ColumnModel<Row>>;
|
|
36
36
|
columnIds: ListModelChain<string>;
|
|
37
37
|
private columnsById;
|
|
38
38
|
constructor();
|
|
39
39
|
ngOnInit(): void;
|
|
40
|
-
isEditing(row:
|
|
40
|
+
isEditing(row: Row): boolean;
|
|
41
41
|
registerColumnTemplate(columnId: string, templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, fillCell: boolean, padChild: boolean): void;
|
|
42
|
-
|
|
43
|
-
isRowSelectionEnabled(): boolean;
|
|
42
|
+
onCellClicked(columnModel: ColumnModel<Row>, row: Row): void;
|
|
44
43
|
}
|