UNPKG

my-test123

Version:
93 lines 3.13 kB
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 LabelModel = /** @class */ (function (_super) { __extends(LabelModel, _super); function LabelModel() { return _super !== null && _super.apply(this, arguments) || this; } return LabelModel; }(modelService)); export { LabelModel }; var LabelAttributes = /** @class */ (function () { function LabelAttributes() { } return LabelAttributes; }()); export { LabelAttributes }; var LabelLinks = /** @class */ (function () { function LabelLinks() { } return LabelLinks; }()); export { LabelLinks }; var LabelRelationships = /** @class */ (function () { function LabelRelationships() { } return LabelRelationships; }()); export { LabelRelationships }; var LabelMapper = /** @class */ (function () { function LabelMapper() { this.serviceToUiMapTree = [{ fromPath: ['id'], toPath: ['id'] }, { fromPath: ['attributes', 'name'], toPath: ['name'] }, { fromPath: ['attributes', 'background-color'], toPath: ['backgroundColor'] }, { fromPath: ['attributes', 'version'], toPath: ['version'] }, { fromPath: ['attributes', 'border-color'], toPath: ['borderColor'] }, { fromPath: ['attributes', 'text-color'], toPath: ['textColor'] } ]; this.uiToServiceMapTree = [{ fromPath: ['id'], toPath: ['id'] }, { fromPath: ['name'], toPath: ['attributes', 'name'], }, { fromPath: ['backgroundColor'], toPath: ['attributes', 'background-color'], }, { fromPath: ['version'], toPath: ['attributes', 'version'], }, { fromPath: ['borderColor'], toPath: ['attributes', 'border-color'], }, { fromPath: ['textColor'], toPath: ['attributes', 'text-color'], }, { toPath: ['type'], toValue: 'labels' } ]; } LabelMapper.prototype.toUIModel = function (arg) { return switchModel(arg, this.serviceToUiMapTree); }; LabelMapper.prototype.toServiceModel = function (arg) { return switchModel(arg, this.uiToServiceMapTree); }; return LabelMapper; }()); export { LabelMapper }; //# sourceMappingURL=label.model.js.map