UNPKG

gd-bs

Version:

Bootstrap JavaScript, TypeScript and Web Components library.

51 lines (50 loc) 2.19 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 __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ProgressGroup = void 0; var base_1 = require("../base"); var progress_1 = require("../progress"); var templates_1 = require("./templates"); /** * Progress Group * @param props The progress group properties. */ var _ProgressGroup = /** @class */ (function (_super) { __extends(_ProgressGroup, _super); // Constructor function _ProgressGroup(props, template, itemTemplate) { if (template === void 0) { template = templates_1.HTML; } var _this = _super.call(this, template, props) || this; // Configure the collapse _this.configure(itemTemplate); // Configure the parent _this.configureParent(); return _this; } // Configure the card group _ProgressGroup.prototype.configure = function (itemTemplate) { // Parse the progress bars var progressbars = this.props.progressbars || []; for (var i = 0; i < progressbars.length; i++) { // Add the progress bar this.el.appendChild((0, progress_1.Progress)(progressbars[i], itemTemplate).progressBar); } }; return _ProgressGroup; }(base_1.Base)); var ProgressGroup = function (props, template, itemTemplate) { return new _ProgressGroup(props, template, itemTemplate); }; exports.ProgressGroup = ProgressGroup;