UNPKG

@pilotlab/lux-attributes

Version:

A luxurious user experience framework, developed by your friends at Pilot.

40 lines 1.75 kB
"use strict"; 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 __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var lux_is_1 = require("@pilotlab/lux-is"); var attributeEnums_1 = require("./attributeEnums"); var attribute_1 = require("./attribute"); var attributeBase_1 = require("./attributeBase"); var attributeFactory_1 = require("./attributeFactory"); var AttributeRoot = (function (_super) { __extends(AttributeRoot, _super); function AttributeRoot(data, isInitialize) { if (isInitialize === void 0) { isInitialize = true; } var _this = _super.call(this, null, null, null, null, null, null, false) || this; if (isInitialize) _this.initialize(attribute_1.default.create, 'root', data, attributeEnums_1.DataType.COLLECTION, null, true); return _this; } Object.defineProperty(AttributeRoot, "create", { get: function () { if (lux_is_1.default.empty(this._factory)) this._factory = new attributeFactory_1.default(); return this._factory; }, enumerable: true, configurable: true }); return AttributeRoot; }(attributeBase_1.default)); exports.AttributeRoot = AttributeRoot; exports.default = AttributeRoot; //# sourceMappingURL=attributeRoot.js.map