@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
package/fesm5/firestitch-list.js
CHANGED
|
@@ -169,6 +169,12 @@ var Column = /** @class */ (function (_super) {
|
|
|
169
169
|
enumerable: true,
|
|
170
170
|
configurable: true
|
|
171
171
|
});
|
|
172
|
+
Column.prototype._fromJSON = function (value) {
|
|
173
|
+
_super.prototype._fromJSON.call(this, value);
|
|
174
|
+
if (this.sortableDefault) {
|
|
175
|
+
this.sortable = true;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
172
178
|
/**
|
|
173
179
|
* Merge with defaults with existing config
|
|
174
180
|
* @param defaults
|
|
@@ -252,6 +258,10 @@ var Column = /** @class */ (function (_super) {
|
|
|
252
258
|
Alias(),
|
|
253
259
|
__metadata("design:type", Boolean)
|
|
254
260
|
], Column.prototype, "sortable", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
Alias(),
|
|
263
|
+
__metadata("design:type", Boolean)
|
|
264
|
+
], Column.prototype, "sortableDefault", void 0);
|
|
255
265
|
__decorate([
|
|
256
266
|
Alias(),
|
|
257
267
|
__metadata("design:type", TemplateRef)
|
|
@@ -2523,7 +2533,10 @@ var SortingController = /** @class */ (function () {
|
|
|
2523
2533
|
SortingController.prototype.initialSortBy = function (sort) {
|
|
2524
2534
|
this._initialization = true;
|
|
2525
2535
|
if (!sort) {
|
|
2526
|
-
this.
|
|
2536
|
+
this._trySortByDefaultSortableColumn();
|
|
2537
|
+
if (!this.sortingColumn) {
|
|
2538
|
+
this.sortByFirstSortbale();
|
|
2539
|
+
}
|
|
2527
2540
|
this._initialization = false;
|
|
2528
2541
|
return;
|
|
2529
2542
|
}
|
|
@@ -2590,6 +2603,13 @@ var SortingController = /** @class */ (function () {
|
|
|
2590
2603
|
sortDirection: this.sortingColumn.direction
|
|
2591
2604
|
});
|
|
2592
2605
|
};
|
|
2606
|
+
SortingController.prototype._trySortByDefaultSortableColumn = function () {
|
|
2607
|
+
var sortableDefault = this.sortingColumns
|
|
2608
|
+
.find(function (column) { return column.sortableDefault; });
|
|
2609
|
+
if (sortableDefault) {
|
|
2610
|
+
this.sortByColumnWithName(sortableDefault.name);
|
|
2611
|
+
}
|
|
2612
|
+
};
|
|
2593
2613
|
return SortingController;
|
|
2594
2614
|
}());
|
|
2595
2615
|
|
|
@@ -3850,6 +3870,10 @@ var FsListColumnDirective = /** @class */ (function () {
|
|
|
3850
3870
|
Input(),
|
|
3851
3871
|
__metadata("design:type", Boolean)
|
|
3852
3872
|
], FsListColumnDirective.prototype, "sortable", void 0);
|
|
3873
|
+
__decorate([
|
|
3874
|
+
Input(),
|
|
3875
|
+
__metadata("design:type", Boolean)
|
|
3876
|
+
], FsListColumnDirective.prototype, "sortableDefault", void 0);
|
|
3853
3877
|
__decorate([
|
|
3854
3878
|
Input(),
|
|
3855
3879
|
__metadata("design:type", String)
|