UNPKG

@awhere/api

Version:

The awesome aWhere API for JavaScript.

111 lines 3.82 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 = exports.AppId = void 0; var WidgetBase_1 = __importDefault(require("../WidgetBase")); var AppId; (function (AppId) { AppId["Account"] = "account"; AppId["Drive"] = "drive"; AppId["DataStudio"] = "data-studio"; AppId["FormStudio"] = "form-studio"; AppId["MapStudio"] = "map-studio"; AppId["AppStudio"] = "app-studio"; AppId["Configuration"] = "configuration"; })(AppId || (exports.AppId = AppId = {})); var WidgetEvent; (function (WidgetEvent) { WidgetEvent["OpenApp"] = "open-app"; })(WidgetEvent || (exports.WidgetEvent = WidgetEvent = {})); var App = /** @class */ (function (_super) { __extends(App, _super); function App(props) { var _this = _super.call(this, props) || this; _this._disabledApp = []; _this._hiddenApp = []; if (props.useHref !== undefined) { _this._useHref = props.useHref; } if (props.target !== undefined) { _this._target = props.target; } if (props.disabledApp !== undefined) { _this._disabledApp = props.disabledApp; } if (props.hiddenApp !== undefined) { _this._hiddenApp = props.hiddenApp; } return _this; } Object.defineProperty(App.prototype, "useHref", { get: function () { return this._useHref; }, set: function (v) { this._useHref = v; }, enumerable: false, configurable: true }); Object.defineProperty(App.prototype, "target", { get: function () { return this._target; }, set: function (v) { this._target = v; }, enumerable: false, configurable: true }); Object.defineProperty(App.prototype, "disabledApp", { get: function () { return this._disabledApp; }, set: function (v) { this._disabledApp = v; }, enumerable: false, configurable: true }); Object.defineProperty(App.prototype, "hiddenApp", { get: function () { return this._hiddenApp; }, set: function (v) { this._hiddenApp = v; }, enumerable: false, configurable: true }); App.prototype.build = function (target) { _super.prototype._build.call(this, 'app', target, { use_href: typeof this._useHref === "boolean" ? this._useHref : undefined, target: this._target || '', disabled_app: this._disabledApp.join(','), hidden_app: this._hiddenApp.join(',') }); }; App.prototype.destroy = function () { _super.prototype._destroy.call(this); }; return App; }(WidgetBase_1.default)); exports.default = App; //# sourceMappingURL=App.js.map