UNPKG

@awhere/api

Version:

The awesome aWhere API for JavaScript.

140 lines 4.79 kB
"use strict"; 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["Cancel"] = "cancel"; WidgetEvent["Submitted"] = "submitted"; })(WidgetEvent || (exports.WidgetEvent = WidgetEvent = {})); var Form = /** @class */ (function (_super) { __extends(Form, _super); function Form(props) { var _this = _super.call(this, props) || this; _this._itemId = props.itemId; if (props.dataId !== undefined) { _this._dataId = props.dataId; } if (props.selectable !== undefined) { _this._selectable = props.selectable; } if (props.cancelable !== undefined) { _this._cancelable = props.cancelable; } if (props.readonly !== undefined) { _this._readonly = props.readonly; } if (props.embedded !== undefined) { _this._embedded = props.embedded; } if (props.hideHeader !== undefined) { _this._hideHeader = props.hideHeader; } return _this; } Object.defineProperty(Form.prototype, "itemId", { get: function () { return this._itemId; }, set: function (v) { this._itemId = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "dataId", { get: function () { return this._dataId; }, set: function (v) { this._dataId = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "selectable", { get: function () { return this._selectable; }, set: function (v) { this._selectable = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "cancelable", { get: function () { return this._cancelable; }, set: function (v) { this._cancelable = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "readonly", { get: function () { return this._readonly; }, set: function (v) { this._readonly = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "embedded", { get: function () { return this._embedded; }, set: function (v) { this._embedded = v; }, enumerable: false, configurable: true }); Object.defineProperty(Form.prototype, "hideHeader", { get: function () { return this._hideHeader; }, set: function (v) { this._hideHeader = v; }, enumerable: false, configurable: true }); Form.prototype.build = function (target) { _super.prototype._build.call(this, 'form', target, { item_id: this._itemId, data_id: this._dataId || '', selectable: typeof this._selectable === "boolean" ? this._selectable : undefined, cancelable: typeof this._cancelable === "boolean" ? this._cancelable : undefined, readonly: typeof this._readonly === "boolean" ? this._readonly : undefined, embedded: typeof this._embedded === "boolean" ? this._embedded : undefined, hide_header: typeof this._hideHeader === "boolean" ? this._hideHeader : undefined }); }; Form.prototype.destroy = function () { _super.prototype._destroy.call(this); }; return Form; }(WidgetBase_1.default)); exports.default = Form; //# sourceMappingURL=Form.js.map