UNPKG

@crnk/angular-ngrx

Version:

Angular helper library for ngrx-json-api and crnk:

100 lines 3.99 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 { BeanPath, StringPath } from '../expression/'; import { QTypedManyResourceRelationship, QTypedOneResourceRelationship } from '../stub/'; import { MetaElement, QMetaElement } from './meta.element'; import { MetaType, QMetaType } from './meta.type'; import { ManyQueryResult, OneQueryResult, ResourceRelationship, TypedOneResourceRelationship } from 'ngrx-json-api'; var QMetaMapType = /** @class */ (function (_super) { __extends(QMetaMapType, _super); function QMetaMapType() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.metaId = 'resources.meta.mapType'; _this.id = _this.createString('id'); _this.type = _this.createString('type'); _this.relationships = new QMetaMapType.QRelationships(_this, 'relationships'); _this.attributes = new QMetaElement.QAttributes(_this, 'attributes'); return _this; } return QMetaMapType; }(BeanPath)); export { QMetaMapType }; (function (QMetaMapType) { var QRelationships = /** @class */ (function (_super) { __extends(QRelationships, _super); function QRelationships() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(QRelationships.prototype, "keyType", { get: function () { if (!this._keyType) { this._keyType = new QTypedOneResourceRelationship(this, 'keyType', QMetaType); } return this._keyType; }, enumerable: true, configurable: true }); ; Object.defineProperty(QRelationships.prototype, "elementType", { get: function () { if (!this._elementType) { this._elementType = new QTypedOneResourceRelationship(this, 'elementType', QMetaType); } return this._elementType; }, enumerable: true, configurable: true }); ; Object.defineProperty(QRelationships.prototype, "parent", { get: function () { if (!this._parent) { this._parent = new QTypedOneResourceRelationship(this, 'parent', QMetaElement); } return this._parent; }, enumerable: true, configurable: true }); ; Object.defineProperty(QRelationships.prototype, "children", { get: function () { if (!this._children) { this._children = new QTypedManyResourceRelationship(this, 'children', QMetaElement); } return this._children; }, enumerable: true, configurable: true }); ; return QRelationships; }(BeanPath)); QMetaMapType.QRelationships = QRelationships; })(QMetaMapType || (QMetaMapType = {})); export var createEmptyMetaMapType = function (id) { return { id: id, type: 'meta/mapType', relationships: { keyType: { data: null }, elementType: { data: null }, parent: { data: null }, children: { data: [] }, }, }; }; //# sourceMappingURL=meta.map.type.js.map