@firestitch/list 12.1.0 → 12.1.3
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/models/column-attributes.d.ts +2 -1
- package/app/models/column.model.d.ts +1 -0
- package/bundles/firestitch-list.umd.js +38 -6
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/sorting-controller.js +3 -3
- package/esm2015/app/components/head/head-cell/head-cell.component.js +2 -2
- package/esm2015/app/models/column-attributes.js +22 -3
- package/esm2015/app/models/column.model.js +8 -2
- package/fesm2015/firestitch-list.js +31 -6
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ export declare class ColumnAttributes {
|
|
|
5
5
|
private _customize;
|
|
6
6
|
private _sortable;
|
|
7
7
|
private _sortableDefault;
|
|
8
|
-
private _direction
|
|
8
|
+
private _direction$;
|
|
9
9
|
private _align;
|
|
10
10
|
private _width;
|
|
11
11
|
private _className;
|
|
@@ -25,6 +25,7 @@ export declare class ColumnAttributes {
|
|
|
25
25
|
get sortableDefault(): boolean;
|
|
26
26
|
set direction(value: 'asc' | 'desc');
|
|
27
27
|
get direction(): 'asc' | 'desc';
|
|
28
|
+
get direction$(): Observable<'asc' | 'desc'>;
|
|
28
29
|
set align(value: string);
|
|
29
30
|
get align(): string;
|
|
30
31
|
set width(value: string);
|
|
@@ -35,6 +35,7 @@ export declare class Column {
|
|
|
35
35
|
get sortableDefault(): boolean;
|
|
36
36
|
set sortingDirection(value: 'asc' | 'desc');
|
|
37
37
|
get sortingDirection(): 'asc' | 'desc';
|
|
38
|
+
get sortingDirection$(): Observable<'asc' | 'desc'>;
|
|
38
39
|
get visible(): boolean;
|
|
39
40
|
get visible$(): Observable<boolean>;
|
|
40
41
|
get direction(): "desc" | "asc";
|
|
@@ -471,7 +471,10 @@
|
|
|
471
471
|
this.footerColspanned = false;
|
|
472
472
|
this._ordered = false;
|
|
473
473
|
this._parseConfig(colConfig);
|
|
474
|
-
this.colStyles = new StyleConfig(
|
|
474
|
+
this.colStyles = new StyleConfig({
|
|
475
|
+
className: this._attributes.className,
|
|
476
|
+
align: this._attributes.align
|
|
477
|
+
});
|
|
475
478
|
this.mergeWithColumnDefaults(colDefaults);
|
|
476
479
|
}
|
|
477
480
|
Object.defineProperty(Column.prototype, "title", {
|
|
@@ -532,6 +535,13 @@
|
|
|
532
535
|
enumerable: false,
|
|
533
536
|
configurable: true
|
|
534
537
|
});
|
|
538
|
+
Object.defineProperty(Column.prototype, "sortingDirection$", {
|
|
539
|
+
get: function () {
|
|
540
|
+
return this._attributes.direction$;
|
|
541
|
+
},
|
|
542
|
+
enumerable: false,
|
|
543
|
+
configurable: true
|
|
544
|
+
});
|
|
535
545
|
Object.defineProperty(Column.prototype, "visible", {
|
|
536
546
|
get: function () {
|
|
537
547
|
return this._attributes.visible;
|
|
@@ -2835,6 +2845,7 @@
|
|
|
2835
2845
|
function ColumnAttributes(attrs) {
|
|
2836
2846
|
if (attrs === void 0) { attrs = {}; }
|
|
2837
2847
|
this._customize = true;
|
|
2848
|
+
this._direction$ = new ColumnAsyncAttribute(null);
|
|
2838
2849
|
this._visible$ = new ColumnAsyncAttribute(true);
|
|
2839
2850
|
this._init(attrs);
|
|
2840
2851
|
}
|
|
@@ -2898,11 +2909,18 @@
|
|
|
2898
2909
|
});
|
|
2899
2910
|
Object.defineProperty(ColumnAttributes.prototype, "direction", {
|
|
2900
2911
|
get: function () {
|
|
2901
|
-
return this._direction;
|
|
2912
|
+
return this._direction$.value;
|
|
2902
2913
|
},
|
|
2903
2914
|
// direction
|
|
2904
2915
|
set: function (value) {
|
|
2905
|
-
this._direction
|
|
2916
|
+
this._direction$.next(value);
|
|
2917
|
+
},
|
|
2918
|
+
enumerable: false,
|
|
2919
|
+
configurable: true
|
|
2920
|
+
});
|
|
2921
|
+
Object.defineProperty(ColumnAttributes.prototype, "direction$", {
|
|
2922
|
+
get: function () {
|
|
2923
|
+
return this._direction$.asObservable();
|
|
2906
2924
|
},
|
|
2907
2925
|
enumerable: false,
|
|
2908
2926
|
configurable: true
|
|
@@ -2983,6 +3001,21 @@
|
|
|
2983
3001
|
_this.direction = attrs[key];
|
|
2984
3002
|
}
|
|
2985
3003
|
break;
|
|
3004
|
+
case 'sortable':
|
|
3005
|
+
{
|
|
3006
|
+
_this.sortable = attrs[key];
|
|
3007
|
+
}
|
|
3008
|
+
break;
|
|
3009
|
+
case 'show':
|
|
3010
|
+
{
|
|
3011
|
+
_this.visible = attrs[key];
|
|
3012
|
+
}
|
|
3013
|
+
break;
|
|
3014
|
+
case 'visible':
|
|
3015
|
+
{
|
|
3016
|
+
_this.visible = attrs[key];
|
|
3017
|
+
}
|
|
3018
|
+
break;
|
|
2986
3019
|
}
|
|
2987
3020
|
});
|
|
2988
3021
|
};
|
|
@@ -3143,8 +3176,7 @@
|
|
|
3143
3176
|
this.sortDirection(exports.SortingDirection.asc);
|
|
3144
3177
|
};
|
|
3145
3178
|
SortingController.prototype.getColumn = function (name) {
|
|
3146
|
-
return this.sortingColumns.find(function (col) { return col.name === name && col.sortable; })
|
|
3147
|
-
this.fakeSortingColumns.find(function (col) { return col.name === name && col.sortable; });
|
|
3179
|
+
return __spreadArray(__spreadArray([], __read(this.sortingColumns)), __read(this.fakeSortingColumns)).find(function (col) { return col.name === name && col.sortable; });
|
|
3148
3180
|
};
|
|
3149
3181
|
/**
|
|
3150
3182
|
* Destroy
|
|
@@ -4903,7 +4935,7 @@
|
|
|
4903
4935
|
return FsHeadCellComponent;
|
|
4904
4936
|
}(FsCellComponent));
|
|
4905
4937
|
FsHeadCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHeadCellComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.KeyValueDiffers }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4906
|
-
FsHeadCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsHeadCellComponent, selector: "[fs-head-cell]", usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"wrap\">\n <span class=\"title\">\n <ng-template [ngIf]=\"!column.headerTemplate\">{{column.title}}</ng-template>\n <ng-template\n [ngIf]=\"column.headerTemplate\"\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"cellContext\">\n </ng-template>\n </span>\n <div class=\"direction\" *ngIf=\"column.ordered\" [ngSwitch]=\"column.sortingDirection\">\n <mat-icon class=\"material-icons\" role=\"img\" aria-label=\"arrow_downward\" *ngSwitchCase=\"'asc'\">arrow_downward</mat-icon>\n <mat-icon class=\"material-icons\" role=\"img\" aria-label=\"arrow_upward\" *ngSwitchCase=\"'desc'\">arrow_upward</mat-icon>\n </div>\n</div>\n", components: [{ type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
4938
|
+
FsHeadCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsHeadCellComponent, selector: "[fs-head-cell]", usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"wrap\">\n <span class=\"title\">\n <ng-template [ngIf]=\"!column.headerTemplate\">{{column.title}}</ng-template>\n <ng-template\n [ngIf]=\"column.headerTemplate\"\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"cellContext\">\n </ng-template>\n </span>\n <div class=\"direction\" *ngIf=\"column.ordered\" [ngSwitch]=\"column.sortingDirection$ | async\">\n <mat-icon class=\"material-icons\" role=\"img\" aria-label=\"arrow_downward\" *ngSwitchCase=\"'asc'\">arrow_downward</mat-icon>\n <mat-icon class=\"material-icons\" role=\"img\" aria-label=\"arrow_upward\" *ngSwitchCase=\"'desc'\">arrow_upward</mat-icon>\n </div>\n</div>\n", components: [{ type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i3__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
4907
4939
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHeadCellComponent, decorators: [{
|
|
4908
4940
|
type: i0.Component,
|
|
4909
4941
|
args: [{
|