UNPKG

my-test123

Version:
157 lines 5.6 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 IterationModel = /** @class */ (function (_super) { __extends(IterationModel, _super); function IterationModel() { return _super !== null && _super.apply(this, arguments) || this; } return IterationModel; }(modelService)); export { IterationModel }; var IterationAttributes = /** @class */ (function () { function IterationAttributes() { } return IterationAttributes; }()); export { IterationAttributes }; var IterationLinks = /** @class */ (function () { function IterationLinks() { } return IterationLinks; }()); export { IterationLinks }; var IterationRelations = /** @class */ (function () { function IterationRelations() { } return IterationRelations; }()); export { IterationRelations }; ; var IterationMapper = /** @class */ (function () { function IterationMapper() { this.serviceToUiMapTree = [{ fromPath: ['id'], toPath: ['id'] }, { fromPath: ['attributes', 'name'], toPath: ['name'] }, { fromPath: ['attributes', 'parent_path'], toPath: ['parentPath'] }, { fromPath: ['attributes', 'resolved_parent_path'], toPath: ['resolvedParentPath'] }, { fromPath: ['attributes', 'user_active'], toPath: ['userActive'] }, { fromPath: ['attributes', 'active_status'], toPath: ['isActive'] }, { fromPath: ['attributes', 'startAt'], toPath: ['startAt'] }, { fromPath: ['attributes', 'endAt'], toPath: ['endAt'] }, { fromPath: ['attributes', 'description'], toPath: ['description'] }, { fromPath: ['attributes', 'state'], toPath: ['state'] }, { fromPath: ['links', 'self'], toPath: ['link'] }, { fromPath: ['relationships', 'workitems', 'meta', 'total'], toPath: ['workItemTotalCount'] }, { fromPath: ['relationships', 'workitems', 'meta', 'closed'], toPath: ['workItemClosedCount'] }, { fromPath: ['hasChildren'], toPath: ['hasChildren'] }, { fromPath: ['relationships', 'parent', 'data', 'id'], toPath: ['parentId'] }, { toPath: ['selected'], toValue: false }, { toPath: ['showChildren'], toValue: false } ]; this.uiToServiceMapTree = [{ fromPath: ['id'], toPath: ['id'] }, { fromPath: ['name'], toPath: ['attributes', 'name'], }, { fromPath: ['parentPath'], toPath: ['attributes', 'parent_path'], }, { fromPath: ['resolvedParentPath'], toPath: ['attributes', 'resolved_parent_path'], }, { fromPath: ['userActive'], toPath: ['attributes', 'user_active'], }, { fromPath: ['isActive'], toPath: ['attributes', 'active_status'], }, { fromPath: ['startAt'], toPath: ['attributes', 'startAt'], }, { fromPath: ['endAt'], toPath: ['attributes', 'endAt'], }, { fromPath: ['description'], toPath: ['attributes', 'description'], }, { fromPath: ['state'], toPath: ['attributes', 'state'], }, { fromPath: ['link'], toPath: ['links', 'self'], }, { fromPath: ['workItemTotalCount'], toPath: ['relationships', 'workitems', 'meta', 'total'], }, { fromPath: ['workItemClosedCount'], toPath: ['relationships', 'workitems', 'meta', 'closed'], }, { fromPath: ['hasChildren'], toPath: ['hasChildren'] }, { fromPath: ['parentId'], toPath: ['relationships', 'parent', 'data', 'id'], }, { toPath: ['relationships', 'parent', 'data', 'type'], toValue: 'iterations' }, { toPath: ['type'], toValue: 'iterations' } ]; } IterationMapper.prototype.toUIModel = function (arg) { return switchModel(arg, this.serviceToUiMapTree); }; IterationMapper.prototype.toServiceModel = function (arg) { return switchModel(arg, this.uiToServiceMapTree); }; return IterationMapper; }()); export { IterationMapper }; //# sourceMappingURL=iteration.model.js.map