UNPKG

ferngully-aurelia-tools

Version:

Ferngully Tools for Aurelia

81 lines 3.8 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 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; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { customElement, bindable, autoinject } from "aurelia-framework"; import { computedFrom } from "aurelia-framework"; import { SortColumnService, SortDataType } from "../../../services/sort-column-service"; import "./sort-column-header.css"; var SortColumnHeader = (function () { function SortColumnHeader() { } SortColumnHeader.prototype.bind = function () { this.sortColumnService .registerColumnState(this.descending, this.columnName, this.valueResolver, SortDataType[this.dataType], this.setToDefault, this.tieBreakerColumnName, SortDataType[this.tieBreakerDataType], this.ordinalPositionPropertyName); }; Object.defineProperty(SortColumnHeader.prototype, "currentSortColumn", { get: function () { return this.sortColumnService.currentSortColumn; }, enumerable: true, configurable: true }); __decorate([ bindable, __metadata("design:type", SortColumnService) ], SortColumnHeader.prototype, "sortColumnService", void 0); __decorate([ bindable, __metadata("design:type", String) ], SortColumnHeader.prototype, "columnName", void 0); __decorate([ bindable({ defaultValue: null }), __metadata("design:type", Object) ], SortColumnHeader.prototype, "valueResolver", void 0); __decorate([ bindable({ defaultValue: false }), __metadata("design:type", Boolean) ], SortColumnHeader.prototype, "setToDefault", void 0); __decorate([ bindable({ defaultValue: false }), __metadata("design:type", Boolean) ], SortColumnHeader.prototype, "descending", void 0); __decorate([ bindable({ defaultValue: "number" }), __metadata("design:type", String) ], SortColumnHeader.prototype, "dataType", void 0); __decorate([ bindable, __metadata("design:type", String) ], SortColumnHeader.prototype, "style", void 0); __decorate([ bindable({ defaultValue: null }), __metadata("design:type", String) ], SortColumnHeader.prototype, "tieBreakerColumnName", void 0); __decorate([ bindable({ defaultValue: null }), __metadata("design:type", String) ], SortColumnHeader.prototype, "tieBreakerDataType", void 0); __decorate([ bindable({ defaultValue: null }), __metadata("design:type", String) ], SortColumnHeader.prototype, "ordinalPositionPropertyName", void 0); __decorate([ computedFrom("sortColumnService.currentSortColumn"), __metadata("design:type", Object), __metadata("design:paramtypes", []) ], SortColumnHeader.prototype, "currentSortColumn", null); SortColumnHeader = __decorate([ autoinject, customElement('sort-column-header'), __metadata("design:paramtypes", []) ], SortColumnHeader); return SortColumnHeader; }()); export { SortColumnHeader }; //# sourceMappingURL=sort-column-header.js.map