gd-bs 5.4.8 → 5.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gd-bs.js CHANGED
@@ -1192,7 +1192,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
1192
1192
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1193
1193
 
1194
1194
  "use strict";
1195
- eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.ListGroup = exports.ListGroupClassNames = exports.ListGroupItemTypes = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./build/components/base.js\");\n\nvar classNames_1 = __webpack_require__(/*! ../classNames */ \"./build/components/classNames.js\");\n\nvar item_1 = __webpack_require__(/*! ./item */ \"./build/components/listGroup/item.js\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./build/components/listGroup/templates.js\");\n/**\r\n * List Group Item Types\r\n */\n\n\nvar ListGroupItemTypes;\n\n(function (ListGroupItemTypes) {\n ListGroupItemTypes[ListGroupItemTypes[\"Danger\"] = 1] = \"Danger\";\n ListGroupItemTypes[ListGroupItemTypes[\"Dark\"] = 2] = \"Dark\";\n ListGroupItemTypes[ListGroupItemTypes[\"Info\"] = 3] = \"Info\";\n ListGroupItemTypes[ListGroupItemTypes[\"Light\"] = 4] = \"Light\";\n ListGroupItemTypes[ListGroupItemTypes[\"Primary\"] = 5] = \"Primary\";\n ListGroupItemTypes[ListGroupItemTypes[\"Secondary\"] = 6] = \"Secondary\";\n ListGroupItemTypes[ListGroupItemTypes[\"Success\"] = 7] = \"Success\";\n ListGroupItemTypes[ListGroupItemTypes[\"Warning\"] = 8] = \"Warning\";\n})(ListGroupItemTypes = exports.ListGroupItemTypes || (exports.ListGroupItemTypes = {}));\n/**\r\n * List Group Classes\r\n */\n\n\nexports.ListGroupClassNames = new classNames_1.ClassNames([\"list-group-item-danger\", \"list-group-item-dark\", \"list-group-item-info\", \"list-group-item-light\", \"list-group-item-primary\", \"list-group-item-secondary\", \"list-group-item-success\", \"list-group-item-warning\"]);\n/**\r\n * List Group\r\n * @param props The list group properties.\r\n */\n\nvar _ListGroup =\n/** @class */\nfunction (_super) {\n __extends(_ListGroup, _super); // Constructor\n\n\n function _ListGroup(props, template, itemTemplate) {\n if (template === void 0) {\n template = props.isTabs && props.colWidth > 0 && props.colWidth < 12 ? templates_1.HTMLTabs : templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._items = null; // Configure the collapse\n\n _this.configure(itemTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the card group\n\n\n _ListGroup.prototype.configure = function (itemTemplate) {\n // Update the list group\n var listGroup = this.el.querySelector(\".list-group\") || this.el;\n\n if (listGroup) {\n this.props.isFlush ? listGroup.classList.add(\"list-group-flush\") : null;\n this.props.isHorizontal ? listGroup.classList.add(\"list-group-horizontal\") : null;\n this.props.isNumbered ? listGroup.classList.add(\"list-group-numbered\") : null;\n this.props.isTabs ? listGroup.setAttribute(\"role\", \"tablist\") : null;\n } // See if the column width is defined\n\n\n var column = this.el.querySelector(\".col\");\n\n if (column) {\n // Update the width\n column.className = \"col-\" + this.props.colWidth;\n } // Render the items\n\n\n this.renderItems(listGroup, itemTemplate);\n }; // Configures the item event\n\n\n _ListGroup.prototype.configureEvents = function (tab) {\n var _this = this; // Add a click event\n\n\n tab.el.addEventListener(\"click\", function () {\n // Parse the tabs\n for (var i = 0; i < _this._items.length; i++) {\n var item = _this._items[i]; // See if it's visible\n\n if (item.isVisible) {\n // Toggle it\n item.toggle(_this.props.fadeTabs);\n }\n } // Toggle the link\n\n\n tab.toggle(_this.props.fadeTabs);\n });\n }; // Render the items\n\n\n _ListGroup.prototype.renderItems = function (listGroup, itemTemplate) {\n // Clear the items\n this._items = []; // Get the tab content element\n\n var tabs = this.el.querySelector(\".tab-content\"); // Parse the items\n\n var items = this.props.items || [];\n\n for (var i = 0; i < items.length; i++) {\n // Create the item\n var item = new item_1.ListGroupItem(items[i], tabs ? true : false, itemTemplate);\n\n this._items.push(item);\n\n listGroup.appendChild(item.el); // See if we are rendering tabs\n\n if (tabs) {\n // Configure the events\n this.configureEvents(item); // Add the tab content\n\n tabs.appendChild(item.elTab); // See if the fade option is enabled\n\n if (this.props.fadeTabs) {\n // Set the class name\n item.elTab.classList.add(\"fade\"); // See if the tab is active\n\n if (item.props.isActive) {\n // Set the class name\n item.elTab.classList.add(\"show\");\n item.elTab.classList.add(\"active\");\n }\n }\n }\n }\n };\n /**\r\n * Public Interface\r\n */\n\n\n _ListGroup.prototype.showTab = function (tabId) {\n // Parse the tabs\n for (var i = 0; i < this._items.length; i++) {\n var item = this._items[i]; // See if this is the target tab\n\n if (tabId === i + 1 || item.elTab.id == tabId) {\n // Toggle it if it's not visible\n item.isVisible ? null : item.toggle(this.props.fadeTabs);\n } // Else, see if it's visible\n else if (item.isVisible) {\n // Toggle it\n item.toggle(this.props.fadeTabs);\n }\n }\n };\n\n return _ListGroup;\n}(base_1.Base);\n\nexports.ListGroup = function (props, template, itemTemplate) {\n return new _ListGroup(props, template, itemTemplate);\n};\n\n//# sourceURL=webpack://gd-bs/./build/components/listGroup/index.js?");
1195
+ eval("\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.ListGroup = exports.ListGroupClassNames = exports.ListGroupItemTypes = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./build/components/base.js\");\n\nvar classNames_1 = __webpack_require__(/*! ../classNames */ \"./build/components/classNames.js\");\n\nvar item_1 = __webpack_require__(/*! ./item */ \"./build/components/listGroup/item.js\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./build/components/listGroup/templates.js\");\n/**\r\n * List Group Item Types\r\n */\n\n\nvar ListGroupItemTypes;\n\n(function (ListGroupItemTypes) {\n ListGroupItemTypes[ListGroupItemTypes[\"Danger\"] = 1] = \"Danger\";\n ListGroupItemTypes[ListGroupItemTypes[\"Dark\"] = 2] = \"Dark\";\n ListGroupItemTypes[ListGroupItemTypes[\"Info\"] = 3] = \"Info\";\n ListGroupItemTypes[ListGroupItemTypes[\"Light\"] = 4] = \"Light\";\n ListGroupItemTypes[ListGroupItemTypes[\"Primary\"] = 5] = \"Primary\";\n ListGroupItemTypes[ListGroupItemTypes[\"Secondary\"] = 6] = \"Secondary\";\n ListGroupItemTypes[ListGroupItemTypes[\"Success\"] = 7] = \"Success\";\n ListGroupItemTypes[ListGroupItemTypes[\"Warning\"] = 8] = \"Warning\";\n})(ListGroupItemTypes = exports.ListGroupItemTypes || (exports.ListGroupItemTypes = {}));\n/**\r\n * List Group Classes\r\n */\n\n\nexports.ListGroupClassNames = new classNames_1.ClassNames([\"list-group-item-danger\", \"list-group-item-dark\", \"list-group-item-info\", \"list-group-item-light\", \"list-group-item-primary\", \"list-group-item-secondary\", \"list-group-item-success\", \"list-group-item-warning\"]);\n/**\r\n * List Group\r\n * @param props The list group properties.\r\n */\n\nvar _ListGroup =\n/** @class */\nfunction (_super) {\n __extends(_ListGroup, _super); // Constructor\n\n\n function _ListGroup(props, template, itemTemplate) {\n if (template === void 0) {\n template = props.isTabs && props.colWidth > 0 && props.colWidth <= 12 ? templates_1.HTMLTabs : templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._items = null; // Configure the collapse\n\n _this.configure(itemTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the card group\n\n\n _ListGroup.prototype.configure = function (itemTemplate) {\n // Update the list group\n var listGroup = this.el.querySelector(\".list-group\") || this.el;\n\n if (listGroup) {\n this.props.isFlush ? listGroup.classList.add(\"list-group-flush\") : null;\n this.props.isHorizontal ? listGroup.classList.add(\"list-group-horizontal\") : null;\n this.props.isNumbered ? listGroup.classList.add(\"list-group-numbered\") : null;\n this.props.isTabs ? listGroup.setAttribute(\"role\", \"tablist\") : null;\n } // See if the column width is defined\n\n\n var column = this.el.querySelector(\".col\");\n\n if (column) {\n // Update the width\n column.className = \"col-\" + this.props.colWidth;\n } // Render the items\n\n\n this.renderItems(listGroup, itemTemplate);\n }; // Configures the item event\n\n\n _ListGroup.prototype.configureEvents = function (tab) {\n var _this = this; // Add a click event\n\n\n tab.el.addEventListener(\"click\", function () {\n // Parse the tabs\n for (var i = 0; i < _this._items.length; i++) {\n var item = _this._items[i]; // See if it's visible\n\n if (item.isVisible) {\n // Toggle it\n item.toggle(_this.props.fadeTabs);\n }\n } // Toggle the link\n\n\n tab.toggle(_this.props.fadeTabs);\n });\n }; // Render the items\n\n\n _ListGroup.prototype.renderItems = function (listGroup, itemTemplate) {\n // Clear the items\n this._items = []; // Get the tab content element\n\n var tabs = this.el.querySelector(\".tab-content\"); // Parse the items\n\n var items = this.props.items || [];\n\n for (var i = 0; i < items.length; i++) {\n // Create the item\n var item = new item_1.ListGroupItem(items[i], tabs ? true : false, itemTemplate);\n\n this._items.push(item);\n\n listGroup.appendChild(item.el); // See if we are rendering tabs\n\n if (tabs) {\n // Configure the events\n this.configureEvents(item); // Add the tab content\n\n tabs.appendChild(item.elTab); // See if the fade option is enabled\n\n if (this.props.fadeTabs) {\n // Set the class name\n item.elTab.classList.add(\"fade\"); // See if the tab is active\n\n if (item.props.isActive) {\n // Set the class name\n item.elTab.classList.add(\"show\");\n item.elTab.classList.add(\"active\");\n }\n }\n }\n }\n };\n /**\r\n * Public Interface\r\n */\n\n\n _ListGroup.prototype.showTab = function (tabId) {\n // Parse the tabs\n for (var i = 0; i < this._items.length; i++) {\n var item = this._items[i]; // See if this is the target tab\n\n if (tabId === i + 1 || item.elTab.id == tabId) {\n // Toggle it if it's not visible\n item.isVisible ? null : item.toggle(this.props.fadeTabs);\n } // Else, see if it's visible\n else if (item.isVisible) {\n // Toggle it\n item.toggle(this.props.fadeTabs);\n }\n }\n };\n\n return _ListGroup;\n}(base_1.Base);\n\nexports.ListGroup = function (props, template, itemTemplate) {\n return new _ListGroup(props, template, itemTemplate);\n};\n\n//# sourceURL=webpack://gd-bs/./build/components/listGroup/index.js?");
1196
1196
 
1197
1197
  /***/ }),
1198
1198