@firestitch/list 12.0.1 → 12.1.0
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/app/classes/columns-controller.d.ts +8 -2
- package/app/directives/column/column.directive.d.ts +15 -11
- package/app/interfaces/column-config.interface.d.ts +2 -0
- package/app/models/column-async-attribute.d.ts +5 -0
- package/app/models/column-attributes.d.ts +38 -0
- package/app/models/column.model.d.ts +22 -15
- package/bundles/firestitch-list.umd.js +418 -132
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/columns-controller.js +30 -10
- package/esm2015/app/classes/list-controller.js +2 -2
- package/esm2015/app/classes/sorting-controller.js +6 -2
- package/esm2015/app/components/list/list.component.js +2 -2
- package/esm2015/app/components/manage-saved-filters/manage-saved-filters.component.js +1 -1
- package/esm2015/app/directives/column/column.directive.js +60 -26
- package/esm2015/app/interfaces/column-config.interface.js +2 -0
- package/esm2015/app/models/column-async-attribute.js +14 -0
- package/esm2015/app/models/column-attributes.js +112 -0
- package/esm2015/app/models/column.model.js +55 -86
- package/fesm2015/firestitch-list.js +273 -121
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { Column } from '../models/column.model';
|
|
2
3
|
import { FsListColumnChangeFn, FsListColumnConfig } from '../interfaces/listconfig.interface';
|
|
3
4
|
export declare class ColumnsController {
|
|
4
|
-
|
|
5
|
+
private _visibleColumns$;
|
|
6
|
+
private _visibleColumnsShared$;
|
|
5
7
|
private _theadClass;
|
|
6
8
|
private _loadFn;
|
|
7
9
|
private _changeFn;
|
|
@@ -16,9 +18,12 @@ export declare class ColumnsController {
|
|
|
16
18
|
private _hasFooter;
|
|
17
19
|
private _columns;
|
|
18
20
|
private _defaultConfigs;
|
|
21
|
+
private _columnsUpdated$;
|
|
19
22
|
private _destroy$;
|
|
20
23
|
constructor();
|
|
21
24
|
get columns(): Column[];
|
|
25
|
+
get visibleColumns(): Column[];
|
|
26
|
+
get visibleColumns$(): Observable<Column[]>;
|
|
22
27
|
get columnsForDialog(): {
|
|
23
28
|
template: import("@angular/core").TemplateRef<any>;
|
|
24
29
|
name: string;
|
|
@@ -50,7 +55,7 @@ export declare class ColumnsController {
|
|
|
50
55
|
/**
|
|
51
56
|
* Load visiblity config for columns from remote
|
|
52
57
|
*/
|
|
53
|
-
loadRemoteColumnConfigs():
|
|
58
|
+
loadRemoteColumnConfigs(): Observable<import("../interfaces/listconfig.interface").FsListColumn[]>;
|
|
54
59
|
/**
|
|
55
60
|
* Set visible columns based on current columns show status
|
|
56
61
|
*/
|
|
@@ -61,5 +66,6 @@ export declare class ColumnsController {
|
|
|
61
66
|
*/
|
|
62
67
|
updateVisibilityForCols(columnsConfig: any): void;
|
|
63
68
|
destroy(): void;
|
|
69
|
+
private _listenColumnVisibilityUpdates;
|
|
64
70
|
private _updateColspans;
|
|
65
71
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { QueryList, TemplateRef } from '@angular/core';
|
|
2
2
|
import { CellConfig } from '../../interfaces';
|
|
3
3
|
import { FsListGroupExpandTriggerDirective } from '../group-expand-trigger/group-expand-trigger.directive';
|
|
4
|
+
import { ColumnAttributes } from '../../models/column-attributes';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class FsListColumnDirective {
|
|
6
|
-
title: string;
|
|
7
|
-
name: string;
|
|
8
|
-
show: boolean;
|
|
9
|
-
customize: boolean;
|
|
10
|
-
sortable: boolean;
|
|
11
|
-
sortableDefault: boolean;
|
|
12
|
-
direction: 'asc' | 'desc';
|
|
13
|
-
align: string;
|
|
14
|
-
width: string;
|
|
15
|
-
className: string | string[];
|
|
16
7
|
headerTemplate: TemplateRef<any>;
|
|
17
8
|
headerConfigs: CellConfig;
|
|
18
9
|
groupCellTemplate: TemplateRef<any>;
|
|
@@ -22,6 +13,19 @@ export declare class FsListColumnDirective {
|
|
|
22
13
|
cellConfigs: CellConfig;
|
|
23
14
|
footerTemplate: TemplateRef<any>;
|
|
24
15
|
footerConfigs: CellConfig;
|
|
16
|
+
private readonly _columnAttributes;
|
|
17
|
+
constructor();
|
|
18
|
+
get attributes(): ColumnAttributes;
|
|
19
|
+
set visible(value: boolean);
|
|
20
|
+
set title(value: string);
|
|
21
|
+
set name(value: string);
|
|
22
|
+
set customize(value: boolean);
|
|
23
|
+
set sortable(value: boolean);
|
|
24
|
+
set sortableDefault(value: boolean);
|
|
25
|
+
set direction(value: 'asc' | 'desc');
|
|
26
|
+
set align(value: string);
|
|
27
|
+
set width(value: string);
|
|
28
|
+
set className(value: string | string[]);
|
|
25
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsListColumnDirective, never>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FsListColumnDirective, "fs-list-column", never, { "
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FsListColumnDirective, "fs-list-column", never, { "visible": "show"; "title": "title"; "name": "name"; "customize": "customize"; "sortable": "sortable"; "sortableDefault": "sortableDefault"; "direction": "direction"; "align": "align"; "width": "width"; "className": "class"; }, {}, ["headerTemplate", "headerConfigs", "groupCellTemplate", "groupCellConfigs", "cellTemplate", "cellConfigs", "footerTemplate", "footerConfigs", "expandTrigger"]>;
|
|
27
31
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { FsListColumnDirective } from '../directives/column/column.directive';
|
|
2
|
+
export declare type FsListColumnConfig = Partial<Pick<FsListColumnDirective, 'className' | 'headerTemplate' | 'headerConfigs' | 'cellTemplate' | 'cellConfigs' | 'footerTemplate' | 'footerConfigs' | 'groupCellTemplate' | 'groupCellConfigs' | 'expandTrigger' | 'attributes'>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class ColumnAttributes {
|
|
3
|
+
private _title;
|
|
4
|
+
private _name;
|
|
5
|
+
private _customize;
|
|
6
|
+
private _sortable;
|
|
7
|
+
private _sortableDefault;
|
|
8
|
+
private _direction;
|
|
9
|
+
private _align;
|
|
10
|
+
private _width;
|
|
11
|
+
private _className;
|
|
12
|
+
private _visible$;
|
|
13
|
+
constructor(attrs?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
});
|
|
16
|
+
set title(value: string);
|
|
17
|
+
get title(): string;
|
|
18
|
+
set name(value: string);
|
|
19
|
+
get name(): string;
|
|
20
|
+
set customize(value: boolean);
|
|
21
|
+
get customize(): boolean;
|
|
22
|
+
set sortable(value: boolean);
|
|
23
|
+
get sortable(): boolean;
|
|
24
|
+
set sortableDefault(value: boolean);
|
|
25
|
+
get sortableDefault(): boolean;
|
|
26
|
+
set direction(value: 'asc' | 'desc');
|
|
27
|
+
get direction(): 'asc' | 'desc';
|
|
28
|
+
set align(value: string);
|
|
29
|
+
get align(): string;
|
|
30
|
+
set width(value: string);
|
|
31
|
+
get width(): string;
|
|
32
|
+
set className(value: string | string[]);
|
|
33
|
+
get className(): string | string[];
|
|
34
|
+
set visible(value: boolean);
|
|
35
|
+
get visible(): boolean;
|
|
36
|
+
get visible$(): Observable<boolean>;
|
|
37
|
+
private _init;
|
|
38
|
+
}
|
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { QueryList, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { StyleConfig } from './styleConfig.model';
|
|
4
|
+
import { FsListColumnConfig } from '../interfaces/column-config.interface';
|
|
5
|
+
import { FsListGroupExpandTriggerDirective } from '../directives/group-expand-trigger/group-expand-trigger.directive';
|
|
4
6
|
export declare enum SortingDirection {
|
|
5
7
|
asc = "asc",
|
|
6
8
|
desc = "desc"
|
|
7
9
|
}
|
|
8
|
-
export declare class Column
|
|
9
|
-
title: string;
|
|
10
|
-
name: string;
|
|
11
|
-
show: boolean;
|
|
12
|
-
customize: boolean;
|
|
13
|
-
width: string;
|
|
14
|
-
sortable: boolean;
|
|
15
|
-
sortableDefault: boolean;
|
|
10
|
+
export declare class Column {
|
|
16
11
|
headerTemplate: TemplateRef<any>;
|
|
17
12
|
groupCellTemplate: TemplateRef<any>;
|
|
18
13
|
cellTemplate: TemplateRef<any>;
|
|
19
14
|
footerTemplate: TemplateRef<any>;
|
|
20
|
-
expandTrigger:
|
|
21
|
-
superTriger: TemplateRef<any>;
|
|
15
|
+
expandTrigger: QueryList<FsListGroupExpandTriggerDirective>;
|
|
22
16
|
headerConfigs: StyleConfig;
|
|
23
17
|
groupCellConfigs: StyleConfig;
|
|
24
18
|
cellConfigs: StyleConfig;
|
|
25
19
|
footerConfigs: StyleConfig;
|
|
26
20
|
colStyles: StyleConfig;
|
|
27
|
-
sortingDirection: SortingDirection;
|
|
28
21
|
headerColspanned: boolean;
|
|
29
22
|
groupCellColspanned: boolean;
|
|
30
23
|
cellColspanned: boolean;
|
|
31
24
|
footerColspanned: boolean;
|
|
25
|
+
private _attributes;
|
|
32
26
|
private _ordered;
|
|
33
|
-
constructor(colConfig
|
|
27
|
+
constructor(colConfig: FsListColumnConfig, colDefaults?: any);
|
|
28
|
+
set title(value: string);
|
|
29
|
+
get title(): string;
|
|
30
|
+
get name(): string;
|
|
31
|
+
get customize(): boolean;
|
|
32
|
+
get width(): string;
|
|
33
|
+
set sortable(value: boolean);
|
|
34
|
+
get sortable(): boolean;
|
|
35
|
+
get sortableDefault(): boolean;
|
|
36
|
+
set sortingDirection(value: 'asc' | 'desc');
|
|
37
|
+
get sortingDirection(): 'asc' | 'desc';
|
|
38
|
+
get visible(): boolean;
|
|
39
|
+
get visible$(): Observable<boolean>;
|
|
34
40
|
get direction(): "desc" | "asc";
|
|
35
41
|
get fullNameDirection(): "Ascending" | "Descending";
|
|
36
42
|
get ordered(): boolean;
|
|
37
43
|
set ordered(value: boolean);
|
|
38
|
-
_fromJSON(value: any): void;
|
|
39
44
|
/**
|
|
40
45
|
* Merge with defaults with existing config
|
|
41
46
|
* @param defaults
|
|
@@ -45,4 +50,6 @@ export declare class Column extends Model {
|
|
|
45
50
|
* Change sorting direction
|
|
46
51
|
*/
|
|
47
52
|
changeDirection(): void;
|
|
53
|
+
updateVisibility(value: boolean): void;
|
|
54
|
+
private _parseConfig;
|
|
48
55
|
}
|