UNPKG

@crnk/angular-ngrx

Version:

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

68 lines 3.07 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 { OperationType, Resource, ResourceError, ResourceState, ManyResourceRelationship, OneResourceRelationship, ResourceIdentifier, StoreResource } from 'ngrx-json-api'; import { BeanPath, StringPath } from '../expression'; var QResourceIdentifier = /** @class */ (function (_super) { __extends(QResourceIdentifier, _super); function QResourceIdentifier() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.id = _this.createString('id'); _this.type = _this.createString('type'); return _this; } return QResourceIdentifier; }(BeanPath)); export { QResourceIdentifier }; var QTypedOneResourceRelationship = /** @class */ (function (_super) { __extends(QTypedOneResourceRelationship, _super); function QTypedOneResourceRelationship(parent, property, _referenceType) { var _this = _super.call(this, parent, property) || this; _this._referenceType = _referenceType; _this.data = new QResourceIdentifier(_this, 'data'); return _this; } Object.defineProperty(QTypedOneResourceRelationship.prototype, "reference", { get: function () { if (this._reference == null) { this._reference = new this._referenceType(null, 'reference'); this._reference.parentPath = this; } return this._reference; }, enumerable: true, configurable: true }); return QTypedOneResourceRelationship; }(BeanPath)); export { QTypedOneResourceRelationship }; var QTypedManyResourceRelationship = /** @class */ (function (_super) { __extends(QTypedManyResourceRelationship, _super); function QTypedManyResourceRelationship(parent, property, _referenceType) { var _this = _super.call(this, parent, property) || this; _this._referenceType = _referenceType; _this.data = new QResourceIdentifier(_this, 'data'); return _this; } Object.defineProperty(QTypedManyResourceRelationship.prototype, "reference", { get: function () { if (this._reference == null) { this._reference = new this._referenceType(null, 'reference'); this._reference.parentPath = this; } return this._reference; }, enumerable: true, configurable: true }); return QTypedManyResourceRelationship; }(BeanPath)); export { QTypedManyResourceRelationship }; //# sourceMappingURL=crnk.stub.base.js.map