@firestitch/list 9.9.10 → 9.9.11
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/sorting-controller.d.ts +1 -0
- package/app/directives/column/column.directive.d.ts +1 -0
- package/app/models/column.model.d.ts +2 -0
- package/bundles/firestitch-list.umd.js +25 -1
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/bundles/firestitch-list.umd.min.js +1 -1
- package/bundles/firestitch-list.umd.min.js.map +1 -1
- package/esm2015/app/classes/sorting-controller.js +12 -2
- package/esm2015/app/directives/column/column.directive.js +5 -1
- package/esm2015/app/models/column.model.js +11 -1
- package/esm5/app/classes/sorting-controller.js +12 -2
- package/esm5/app/directives/column/column.directive.js +5 -1
- package/esm5/app/models/column.model.js +11 -1
- package/fesm2015/firestitch-list.js +25 -1
- package/fesm2015/firestitch-list.js.map +1 -1
- package/fesm5/firestitch-list.js +25 -1
- package/fesm5/firestitch-list.js.map +1 -1
- package/firestitch-list.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export declare class Column extends Model {
|
|
|
12
12
|
customize: boolean;
|
|
13
13
|
width: string;
|
|
14
14
|
sortable: boolean;
|
|
15
|
+
sortableDefault: boolean;
|
|
15
16
|
headerTemplate: TemplateRef<any>;
|
|
16
17
|
groupCellTemplate: TemplateRef<any>;
|
|
17
18
|
cellTemplate: TemplateRef<any>;
|
|
@@ -34,6 +35,7 @@ export declare class Column extends Model {
|
|
|
34
35
|
get fullNameDirection(): "Ascending" | "Descending";
|
|
35
36
|
get ordered(): boolean;
|
|
36
37
|
set ordered(value: boolean);
|
|
38
|
+
_fromJSON(value: any): void;
|
|
37
39
|
/**
|
|
38
40
|
* Merge with defaults with existing config
|
|
39
41
|
* @param defaults
|
|
@@ -363,6 +363,12 @@
|
|
|
363
363
|
enumerable: true,
|
|
364
364
|
configurable: true
|
|
365
365
|
});
|
|
366
|
+
Column.prototype._fromJSON = function (value) {
|
|
367
|
+
_super.prototype._fromJSON.call(this, value);
|
|
368
|
+
if (this.sortableDefault) {
|
|
369
|
+
this.sortable = true;
|
|
370
|
+
}
|
|
371
|
+
};
|
|
366
372
|
/**
|
|
367
373
|
* Merge with defaults with existing config
|
|
368
374
|
* @param defaults
|
|
@@ -446,6 +452,10 @@
|
|
|
446
452
|
tsmodels.Alias(),
|
|
447
453
|
__metadata("design:type", Boolean)
|
|
448
454
|
], Column.prototype, "sortable", void 0);
|
|
455
|
+
__decorate([
|
|
456
|
+
tsmodels.Alias(),
|
|
457
|
+
__metadata("design:type", Boolean)
|
|
458
|
+
], Column.prototype, "sortableDefault", void 0);
|
|
449
459
|
__decorate([
|
|
450
460
|
tsmodels.Alias(),
|
|
451
461
|
__metadata("design:type", core.TemplateRef)
|
|
@@ -2717,7 +2727,10 @@
|
|
|
2717
2727
|
SortingController.prototype.initialSortBy = function (sort) {
|
|
2718
2728
|
this._initialization = true;
|
|
2719
2729
|
if (!sort) {
|
|
2720
|
-
this.
|
|
2730
|
+
this._trySortByDefaultSortableColumn();
|
|
2731
|
+
if (!this.sortingColumn) {
|
|
2732
|
+
this.sortByFirstSortbale();
|
|
2733
|
+
}
|
|
2721
2734
|
this._initialization = false;
|
|
2722
2735
|
return;
|
|
2723
2736
|
}
|
|
@@ -2784,6 +2797,13 @@
|
|
|
2784
2797
|
sortDirection: this.sortingColumn.direction
|
|
2785
2798
|
});
|
|
2786
2799
|
};
|
|
2800
|
+
SortingController.prototype._trySortByDefaultSortableColumn = function () {
|
|
2801
|
+
var sortableDefault = this.sortingColumns
|
|
2802
|
+
.find(function (column) { return column.sortableDefault; });
|
|
2803
|
+
if (sortableDefault) {
|
|
2804
|
+
this.sortByColumnWithName(sortableDefault.name);
|
|
2805
|
+
}
|
|
2806
|
+
};
|
|
2787
2807
|
return SortingController;
|
|
2788
2808
|
}());
|
|
2789
2809
|
|
|
@@ -4044,6 +4064,10 @@
|
|
|
4044
4064
|
core.Input(),
|
|
4045
4065
|
__metadata("design:type", Boolean)
|
|
4046
4066
|
], FsListColumnDirective.prototype, "sortable", void 0);
|
|
4067
|
+
__decorate([
|
|
4068
|
+
core.Input(),
|
|
4069
|
+
__metadata("design:type", Boolean)
|
|
4070
|
+
], FsListColumnDirective.prototype, "sortableDefault", void 0);
|
|
4047
4071
|
__decorate([
|
|
4048
4072
|
core.Input(),
|
|
4049
4073
|
__metadata("design:type", String)
|