1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | };
|
9 | return function (d, b) {
|
10 | if (typeof b !== "function" && b !== null)
|
11 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12 | extendStatics(d, b);
|
13 | function __() { this.constructor = d; }
|
14 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15 | };
|
16 | })();
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.CollectionField = void 0;
|
19 | var field_1 = require("./field");
|
20 | var complex_type_field_1 = require("./complex-type-field");
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | var CollectionField = (function (_super) {
|
29 | __extends(CollectionField, _super);
|
30 | |
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | function CollectionField(fieldName, _fieldOf, _fieldType, fieldOptions) {
|
38 | var _this = _super.call(this, fieldName, complex_type_field_1.getEntityConstructor(_fieldOf), fieldOptions) || this;
|
39 | _this._fieldOf = _fieldOf;
|
40 | _this._fieldType = _fieldType;
|
41 | return _this;
|
42 | }
|
43 | |
44 |
|
45 |
|
46 |
|
47 | CollectionField.prototype.fieldPath = function () {
|
48 | return this._fieldOf instanceof complex_type_field_1.ComplexTypeField
|
49 | ? this._fieldOf.fieldPath() + "/" + this._fieldName
|
50 | : this._fieldName;
|
51 | };
|
52 | return CollectionField;
|
53 | }(field_1.Field));
|
54 | exports.CollectionField = CollectionField;
|
55 |
|
\ | No newline at end of file |