UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

151 lines 5.72 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 { Component, Input, HostListener } from '@angular/core'; import { Router } from '@angular/router'; import { ErrorService } from '../error.service'; import { ContextService } from '../context.service'; import { PropertyViewModel } from '../view-models/property-view-model'; import * as Helpers from '../view-models/helpers-view-models'; var ViewPropertyComponent = (function () { function ViewPropertyComponent(router, error, context) { var _this = this; this.router = router; this.error = error; this.context = context; this.doClick = function (right) { return _this.property.doClick(right); }; } // template listeners ViewPropertyComponent.prototype.onEnter = function (event) { this.copy(event); }; ViewPropertyComponent.prototype.onEnter1 = function (event) { this.copy(event); }; Object.defineProperty(ViewPropertyComponent.prototype, "title", { // template API get: function () { return this.property.title; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "propertyType", { get: function () { return this.property.type; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "propertyRefType", { get: function () { return this.property.refType; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "propertyReturnType", { get: function () { return this.property.returnType; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "formattedValue", { get: function () { return this.property.formattedValue; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "value", { get: function () { return this.property.value; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "format", { get: function () { return this.property.format; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "isBlob", { get: function () { return this.property.format === "blob"; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "isMultiline", { get: function () { return !(this.property.multipleLines === 1); }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "multilineHeight", { get: function () { return this.property.multipleLines * 20 + "px"; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "color", { get: function () { return this.property.color; }, enumerable: true, configurable: true }); Object.defineProperty(ViewPropertyComponent.prototype, "attachment", { get: function () { return this.property.attachment; }, enumerable: true, configurable: true }); ViewPropertyComponent.prototype.copy = function (event) { var prop = this.property; if (prop) { Helpers.copy(event, prop, this.context); } }; return ViewPropertyComponent; }()); __decorate([ Input(), __metadata("design:type", PropertyViewModel) ], ViewPropertyComponent.prototype, "property", void 0); __decorate([ HostListener('keydown', ['$event']), __metadata("design:type", Function), __metadata("design:paramtypes", [KeyboardEvent]), __metadata("design:returntype", void 0) ], ViewPropertyComponent.prototype, "onEnter", null); __decorate([ HostListener('keypress', ['$event']), __metadata("design:type", Function), __metadata("design:paramtypes", [KeyboardEvent]), __metadata("design:returntype", void 0) ], ViewPropertyComponent.prototype, "onEnter1", null); ViewPropertyComponent = __decorate([ Component({ selector: 'nof-view-property', template: require('./view-property.component.html'), styles: [require('./view-property.component.css')] }), __metadata("design:paramtypes", [Router, ErrorService, ContextService]) ], ViewPropertyComponent); export { ViewPropertyComponent }; //# sourceMappingURL=view-property.component.js.map