my-test123
Version:
A planner front-end for Fabric8.
79 lines • 2.65 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { modelService, switchModel, } from './common.model';
var AreaModel = /** @class */ (function (_super) {
__extends(AreaModel, _super);
function AreaModel() {
return _super !== null && _super.apply(this, arguments) || this;
}
return AreaModel;
}(modelService));
export { AreaModel };
var AreaAttributes = /** @class */ (function () {
function AreaAttributes() {
}
return AreaAttributes;
}());
export { AreaAttributes };
var AreaLinks = /** @class */ (function () {
function AreaLinks() {
}
return AreaLinks;
}());
export { AreaLinks };
var AreaRelations = /** @class */ (function () {
function AreaRelations() {
}
return AreaRelations;
}());
export { AreaRelations };
var AreaMapper = /** @class */ (function () {
function AreaMapper() {
this.serviceToUiMapTree = [{
fromPath: ['id'],
toPath: ['id']
}, {
fromPath: ['attributes', 'name'],
toPath: ['name']
}, {
fromPath: ['attributes', 'parent_path'],
toPath: ['parentPath']
}, {
fromPath: ['attributes', 'parent_path_resolved'],
toPath: ['parentPathResolved']
}];
this.uiToServiceMapTree = [{
toPath: ['id'],
fromPath: ['id']
}, {
toPath: ['attributes', 'name'],
fromPath: ['name']
}, {
toPath: ['attributes', 'parent_path'],
fromPath: ['parentPath']
}, {
toPath: ['attributes', 'parent_path_resolved'],
fromPath: ['parentPathResolved']
}, {
toPath: ['type'],
toValue: 'areas'
}];
}
AreaMapper.prototype.toUIModel = function (arg) {
return switchModel(arg, this.serviceToUiMapTree);
};
AreaMapper.prototype.toServiceModel = function (arg) {
return switchModel(arg, this.uiToServiceMapTree);
};
return AreaMapper;
}());
export { AreaMapper };
//# sourceMappingURL=area.model.js.map