gd-bs 5.3.2 → 5.3.5
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/build/components/buttonGroup/index.js +17 -8
- package/build/components/tooltipGroup/index.js +28 -19
- package/dist/gd-bs-icons.js +2 -2
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +6 -0
- package/dist/gd-bs.js +2 -2
- package/dist/gd-bs.min.js +1 -1
- package/package.json +2 -1
- package/src/components/buttonGroup/index.ts +20 -9
- package/src/components/buttonGroup/types.d.ts +3 -0
- package/src/components/tooltipGroup/index.ts +29 -19
- package/src/components/tooltipGroup/types.d.ts +3 -0
|
@@ -53,16 +53,20 @@ var _ButtonGroup = /** @class */ (function (_super) {
|
|
|
53
53
|
// Parse the buttons
|
|
54
54
|
var buttons = this.props.buttons || [];
|
|
55
55
|
for (var i = 0; i < buttons.length; i++) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
buttonProps.type = buttonProps.type || this.props.buttonType;
|
|
59
|
-
// Create the button
|
|
60
|
-
var button = button_1.Button(buttonProps, btnTemplate);
|
|
61
|
-
this._buttons.push(button);
|
|
62
|
-
// Append the button to the group
|
|
63
|
-
this.el.appendChild(button.el);
|
|
56
|
+
// Render the button
|
|
57
|
+
this.renderButton(buttons[i], btnTemplate);
|
|
64
58
|
}
|
|
65
59
|
};
|
|
60
|
+
// Renders a button
|
|
61
|
+
_ButtonGroup.prototype.renderButton = function (props, template) {
|
|
62
|
+
// Set the property
|
|
63
|
+
props.type = props.type || this.props.buttonType;
|
|
64
|
+
// Create the button
|
|
65
|
+
var button = button_1.Button(props, template);
|
|
66
|
+
this._buttons.push(button);
|
|
67
|
+
// Append the button to the group
|
|
68
|
+
this.el.appendChild(button.el);
|
|
69
|
+
};
|
|
66
70
|
Object.defineProperty(_ButtonGroup.prototype, "buttons", {
|
|
67
71
|
/**
|
|
68
72
|
* Public Interface
|
|
@@ -72,6 +76,11 @@ var _ButtonGroup = /** @class */ (function (_super) {
|
|
|
72
76
|
enumerable: false,
|
|
73
77
|
configurable: true
|
|
74
78
|
});
|
|
79
|
+
// Adds a button to the group
|
|
80
|
+
_ButtonGroup.prototype.add = function (props, btnTemplate) {
|
|
81
|
+
// Render the button
|
|
82
|
+
this.renderButton(props, btnTemplate);
|
|
83
|
+
};
|
|
75
84
|
return _ButtonGroup;
|
|
76
85
|
}(base_1.Base));
|
|
77
86
|
exports.ButtonGroup = function (props, template, btnTemplate) { return new _ButtonGroup(props, template, btnTemplate); };
|
|
@@ -47,33 +47,42 @@ var _TooltipGroup = /** @class */ (function (_super) {
|
|
|
47
47
|
this.renderTooltips(btnTemplate);
|
|
48
48
|
};
|
|
49
49
|
// Render the tooltips
|
|
50
|
-
_TooltipGroup.prototype.renderTooltips = function (
|
|
50
|
+
_TooltipGroup.prototype.renderTooltips = function (btnTemplate) {
|
|
51
51
|
// Clear the tooltips
|
|
52
52
|
this._tooltips = [];
|
|
53
53
|
// Parse the tooltips
|
|
54
54
|
var tooltips = this.props.tooltips || [];
|
|
55
55
|
for (var i = 0; i < tooltips.length; i++) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
tooltipProps.options = tooltipProps.options || this.props.tooltipOptions;
|
|
59
|
-
tooltipProps.placement = tooltipProps.placement || this.props.tooltipPlacement;
|
|
60
|
-
tooltipProps.type = tooltipProps.type || this.props.tooltipType;
|
|
61
|
-
// See if the button props exists
|
|
62
|
-
if (tooltipProps.btnProps) {
|
|
63
|
-
// Set the button type
|
|
64
|
-
tooltipProps.btnProps.type = tooltipProps.btnProps.type || this.props.buttonType;
|
|
65
|
-
}
|
|
66
|
-
// Create the tooltip
|
|
67
|
-
var tooltip = tooltip_1.Tooltip(tooltipProps, tooltipTemplate);
|
|
68
|
-
this._tooltips.push(tooltip);
|
|
69
|
-
// Append the tooltip to the group
|
|
70
|
-
this.el.appendChild(tooltip.el);
|
|
56
|
+
// Render the tooltip
|
|
57
|
+
this.renderTooltip(tooltips[i], btnTemplate);
|
|
71
58
|
}
|
|
72
59
|
};
|
|
60
|
+
// Renders a tooltip
|
|
61
|
+
_TooltipGroup.prototype.renderTooltip = function (props, btnTemplate) {
|
|
62
|
+
// Set the properties
|
|
63
|
+
props.options = props.options || this.props.tooltipOptions;
|
|
64
|
+
props.placement = props.placement || this.props.tooltipPlacement;
|
|
65
|
+
props.type = props.type || this.props.tooltipType;
|
|
66
|
+
// See if the button props exists
|
|
67
|
+
if (props.btnProps) {
|
|
68
|
+
// Set the button type
|
|
69
|
+
props.btnProps.type = props.btnProps.type || this.props.buttonType;
|
|
70
|
+
}
|
|
71
|
+
// Create the tooltip
|
|
72
|
+
var tooltip = tooltip_1.Tooltip(props, btnTemplate);
|
|
73
|
+
this._tooltips.push(tooltip);
|
|
74
|
+
// Append the tooltip to the group
|
|
75
|
+
this.el.appendChild(tooltip.el);
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Public Interface
|
|
79
|
+
*/
|
|
80
|
+
// Adds a button to the group
|
|
81
|
+
_TooltipGroup.prototype.add = function (props, tooltipTemplate) {
|
|
82
|
+
// Render the tooltip
|
|
83
|
+
this.renderTooltip(props);
|
|
84
|
+
};
|
|
73
85
|
Object.defineProperty(_TooltipGroup.prototype, "tooltips", {
|
|
74
|
-
/**
|
|
75
|
-
* Public Interface
|
|
76
|
-
*/
|
|
77
86
|
// Reference to the tooltips
|
|
78
87
|
get: function () { return this._tooltips; },
|
|
79
88
|
enumerable: false,
|
package/dist/gd-bs-icons.js
CHANGED
|
@@ -764,7 +764,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
764
764
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
765
765
|
|
|
766
766
|
"use strict";
|
|
767
|
-
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.ButtonGroup = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./src/components/buttonGroup/templates.ts\");\n/**\r\n * Button Group\r\n * @property props - The button group properties.\r\n */\n\n\nvar _ButtonGroup =\n/** @class */\nfunction (_super) {\n __extends(_ButtonGroup, _super); // Constructor\n\n\n function _ButtonGroup(props, template, btnTemplate) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._buttons = null; // Configure the button group\n\n _this.configure(btnTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the button group\n\n\n _ButtonGroup.prototype.configure = function (btnTemplate) {\n // Set the attributes\n this.props.id ? this.el.id = this.props.id : null;\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null; // Set the class names\n\n this.el.classList.add(this.props.isVertical ? \"btn-group-vertical\" : \"btn-group\");\n this.props.isLarge ? this.el.classList.add(\"btn-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"btn-group-sm\") : null; // Render the buttons\n\n this.renderButtons(btnTemplate);\n }; // Render the buttons\n\n\n _ButtonGroup.prototype.renderButtons = function (btnTemplate) {\n // Clear the buttons\n this._buttons = []; // Parse the buttons\n\n var buttons = this.props.buttons || [];\n\n for (var i = 0; i < buttons.length; i++) {\n
|
|
767
|
+
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.ButtonGroup = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./src/components/buttonGroup/templates.ts\");\n/**\r\n * Button Group\r\n * @property props - The button group properties.\r\n */\n\n\nvar _ButtonGroup =\n/** @class */\nfunction (_super) {\n __extends(_ButtonGroup, _super); // Constructor\n\n\n function _ButtonGroup(props, template, btnTemplate) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._buttons = null; // Configure the button group\n\n _this.configure(btnTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the button group\n\n\n _ButtonGroup.prototype.configure = function (btnTemplate) {\n // Set the attributes\n this.props.id ? this.el.id = this.props.id : null;\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null; // Set the class names\n\n this.el.classList.add(this.props.isVertical ? \"btn-group-vertical\" : \"btn-group\");\n this.props.isLarge ? this.el.classList.add(\"btn-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"btn-group-sm\") : null; // Render the buttons\n\n this.renderButtons(btnTemplate);\n }; // Render the buttons\n\n\n _ButtonGroup.prototype.renderButtons = function (btnTemplate) {\n // Clear the buttons\n this._buttons = []; // Parse the buttons\n\n var buttons = this.props.buttons || [];\n\n for (var i = 0; i < buttons.length; i++) {\n // Render the button\n this.renderButton(buttons[i], btnTemplate);\n }\n }; // Renders a button\n\n\n _ButtonGroup.prototype.renderButton = function (props, template) {\n // Set the property\n props.type = props.type || this.props.buttonType; // Create the button\n\n var button = button_1.Button(props, template);\n\n this._buttons.push(button); // Append the button to the group\n\n\n this.el.appendChild(button.el);\n };\n\n Object.defineProperty(_ButtonGroup.prototype, \"buttons\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the buttons\n get: function get() {\n return this._buttons;\n },\n enumerable: false,\n configurable: true\n }); // Adds a button to the group\n\n _ButtonGroup.prototype.add = function (props, btnTemplate) {\n // Render the button\n this.renderButton(props, btnTemplate);\n };\n\n return _ButtonGroup;\n}(base_1.Base);\n\nexports.ButtonGroup = function (props, template, btnTemplate) {\n return new _ButtonGroup(props, template, btnTemplate);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/buttonGroup/index.ts?");
|
|
768
768
|
|
|
769
769
|
/***/ }),
|
|
770
770
|
|
|
@@ -1490,7 +1490,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
1490
1490
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1491
1491
|
|
|
1492
1492
|
"use strict";
|
|
1493
|
-
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.TooltipGroup = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar tooltip_1 = __webpack_require__(/*! ../tooltip */ \"./src/components/tooltip/index.ts\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./src/components/tooltipGroup/templates.ts\");\n/**\r\n * Tooltip Group\r\n * @property props - The tooltip group properties.\r\n */\n\n\nvar _TooltipGroup =\n/** @class */\nfunction (_super) {\n __extends(_TooltipGroup, _super); // Constructor\n\n\n function _TooltipGroup(props, template, btnTemplate) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._tooltips = null; // Configure the tooltip group\n\n _this.configure(btnTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip group\n\n\n _TooltipGroup.prototype.configure = function (btnTemplate) {\n // Set the attributes\n this.props.id ? this.el.id = this.props.id : null;\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null; // Set the class names\n\n this.el.classList.add(this.props.isVertical ? \"btn-group-vertical\" : \"btn-group\");\n this.props.isLarge ? this.el.classList.add(\"btn-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"btn-group-sm\") : null; // Render the tooltips\n\n this.renderTooltips(btnTemplate);\n }; // Render the tooltips\n\n\n _TooltipGroup.prototype.renderTooltips = function (
|
|
1493
|
+
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.TooltipGroup = void 0;\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar tooltip_1 = __webpack_require__(/*! ../tooltip */ \"./src/components/tooltip/index.ts\");\n\nvar templates_1 = __webpack_require__(/*! ./templates */ \"./src/components/tooltipGroup/templates.ts\");\n/**\r\n * Tooltip Group\r\n * @property props - The tooltip group properties.\r\n */\n\n\nvar _TooltipGroup =\n/** @class */\nfunction (_super) {\n __extends(_TooltipGroup, _super); // Constructor\n\n\n function _TooltipGroup(props, template, btnTemplate) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._tooltips = null; // Configure the tooltip group\n\n _this.configure(btnTemplate); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip group\n\n\n _TooltipGroup.prototype.configure = function (btnTemplate) {\n // Set the attributes\n this.props.id ? this.el.id = this.props.id : null;\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null; // Set the class names\n\n this.el.classList.add(this.props.isVertical ? \"btn-group-vertical\" : \"btn-group\");\n this.props.isLarge ? this.el.classList.add(\"btn-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"btn-group-sm\") : null; // Render the tooltips\n\n this.renderTooltips(btnTemplate);\n }; // Render the tooltips\n\n\n _TooltipGroup.prototype.renderTooltips = function (btnTemplate) {\n // Clear the tooltips\n this._tooltips = []; // Parse the tooltips\n\n var tooltips = this.props.tooltips || [];\n\n for (var i = 0; i < tooltips.length; i++) {\n // Render the tooltip\n this.renderTooltip(tooltips[i], btnTemplate);\n }\n }; // Renders a tooltip\n\n\n _TooltipGroup.prototype.renderTooltip = function (props, btnTemplate) {\n // Set the properties\n props.options = props.options || this.props.tooltipOptions;\n props.placement = props.placement || this.props.tooltipPlacement;\n props.type = props.type || this.props.tooltipType; // See if the button props exists\n\n if (props.btnProps) {\n // Set the button type\n props.btnProps.type = props.btnProps.type || this.props.buttonType;\n } // Create the tooltip\n\n\n var tooltip = tooltip_1.Tooltip(props, btnTemplate);\n\n this._tooltips.push(tooltip); // Append the tooltip to the group\n\n\n this.el.appendChild(tooltip.el);\n };\n /**\r\n * Public Interface\r\n */\n // Adds a button to the group\n\n\n _TooltipGroup.prototype.add = function (props, tooltipTemplate) {\n // Render the tooltip\n this.renderTooltip(props);\n };\n\n Object.defineProperty(_TooltipGroup.prototype, \"tooltips\", {\n // Reference to the tooltips\n get: function get() {\n return this._tooltips;\n },\n enumerable: false,\n configurable: true\n });\n return _TooltipGroup;\n}(base_1.Base);\n\nexports.TooltipGroup = function (props, template, tooltipTemplate) {\n return new _TooltipGroup(props, template, tooltipTemplate);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltipGroup/index.ts?");
|
|
1494
1494
|
|
|
1495
1495
|
/***/ }),
|
|
1496
1496
|
|