@awhere/api
Version:
The awesome aWhere API for JavaScript.
104 lines • 3.68 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WidgetEvent = void 0;
var WidgetBase_1 = __importDefault(require("../WidgetBase"));
var WidgetEvent;
(function (WidgetEvent) {
WidgetEvent["Create"] = "create";
WidgetEvent["Select"] = "select";
})(WidgetEvent || (exports.WidgetEvent = WidgetEvent = {}));
var ItemList = /** @class */ (function (_super) {
__extends(ItemList, _super);
function ItemList(props) {
var _this = _super.call(this, props) || this;
_this._types = [];
_this._subtypes = [];
_this._creatableTypes = [];
_this._creatableSubtypes = [];
if (props.types !== undefined) {
_this._types = props.types;
}
if (props.subtypes !== undefined) {
_this._subtypes = props.subtypes;
}
if (props.creatableTypes !== undefined) {
_this._creatableTypes = props.creatableTypes;
}
if (props.creatableSubtypes !== undefined) {
_this._creatableSubtypes = props.creatableSubtypes;
}
return _this;
}
Object.defineProperty(ItemList.prototype, "types", {
get: function () {
return this._types;
},
set: function (v) {
this._types = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ItemList.prototype, "subtypes", {
get: function () {
return this._subtypes;
},
set: function (v) {
this._subtypes = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ItemList.prototype, "creatableTypes", {
get: function () {
return this._creatableTypes;
},
set: function (v) {
this._creatableTypes = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ItemList.prototype, "creatableSubtypes", {
get: function () {
return this._creatableSubtypes;
},
set: function (v) {
this._creatableSubtypes = v;
},
enumerable: false,
configurable: true
});
ItemList.prototype.build = function (target) {
_super.prototype._build.call(this, 'item-list', target, {
types: this._types.join(','),
subtypes: this._subtypes.join(','),
creatable_types: this._creatableTypes.join(','),
creatable_subtypes: this._creatableSubtypes.join(',')
});
};
ItemList.prototype.destroy = function () {
_super.prototype._destroy.call(this);
};
return ItemList;
}(WidgetBase_1.default));
exports.default = ItemList;
//# sourceMappingURL=ItemList.js.map