1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | "use strict";
|
8 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
9 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
10 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
11 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
12 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
13 | };
|
14 | var __metadata = (this && this.__metadata) || function (k, v) {
|
15 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
16 | };
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | var context_1 = require("../../context/context");
|
19 | var gridOptionsWrapper_1 = require("../../gridOptionsWrapper");
|
20 | var sortService_1 = require("../../rowNodes/sortService");
|
21 | var SortStage = (function () {
|
22 | function SortStage() {
|
23 | }
|
24 | SortStage.prototype.execute = function (params) {
|
25 |
|
26 | if (this.gridOptionsWrapper.isEnableServerSideSorting()) {
|
27 | this.sortService.sort(params.rowNode, null);
|
28 | }
|
29 | else {
|
30 | this.sortService.sortAccordingToColumnsState(params.rowNode);
|
31 | }
|
32 | };
|
33 | __decorate([
|
34 | context_1.Autowired('gridOptionsWrapper'),
|
35 | __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper)
|
36 | ], SortStage.prototype, "gridOptionsWrapper", void 0);
|
37 | __decorate([
|
38 | context_1.Autowired('sortService'),
|
39 | __metadata("design:type", sortService_1.SortService)
|
40 | ], SortStage.prototype, "sortService", void 0);
|
41 | SortStage = __decorate([
|
42 | context_1.Bean('sortStage')
|
43 | ], SortStage);
|
44 | return SortStage;
|
45 | }());
|
46 | exports.SortStage = SortStage;
|