gd-bs 5.6.6 → 5.6.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/build/components/inputGroup/index.js +3 -3
- package/build/components/popover/index.js +1 -2
- package/build/components/tooltip/index.js +1 -2
- package/build/index-icons.js +3 -3
- package/build/index.js +3 -3
- package/dist/gd-bs-icons.js +4 -15
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +3 -3
- package/dist/gd-bs.js +14 -671
- package/dist/gd-bs.min.js +1 -1
- package/index.html +1 -0
- package/package.json +1 -1
- package/src/components/inputGroup/index.ts +3 -3
- package/src/components/inputGroup/types.d.ts +3 -3
- package/src/components/popover/index.ts +1 -2
- package/src/components/tooltip/index.ts +1 -2
- package/src/index-icons.ts +1 -1
- package/src/index.ts +1 -1
- package/build/libs.js +0 -6
- package/src/libs.ts +0 -3
|
@@ -266,19 +266,19 @@ var _InputGroup = /** @class */ (function (_super) {
|
|
|
266
266
|
/**
|
|
267
267
|
* Public Interface
|
|
268
268
|
*/
|
|
269
|
-
_InputGroup.prototype.getValue = function () { return this.
|
|
269
|
+
_InputGroup.prototype.getValue = function () { return this.elTextbox.value; };
|
|
270
270
|
// Sets the textbox value
|
|
271
271
|
_InputGroup.prototype.setValue = function (value) {
|
|
272
272
|
if (value === void 0) { value = ""; }
|
|
273
273
|
// Set the textbox value
|
|
274
|
-
this.
|
|
274
|
+
this.elTextbox.value = value;
|
|
275
275
|
// See if a change event exists
|
|
276
276
|
if (this._initFl && this.props.onChange) {
|
|
277
277
|
// Execute the change event
|
|
278
278
|
this.props.onChange(value);
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
Object.defineProperty(_InputGroup.prototype, "
|
|
281
|
+
Object.defineProperty(_InputGroup.prototype, "elTextbox", {
|
|
282
282
|
// Returns the textbox
|
|
283
283
|
get: function () { return this.el.querySelector("input") || this.el.querySelector("textarea"); },
|
|
284
284
|
enumerable: false,
|
|
@@ -26,7 +26,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Popover = exports.PopoverPlacements = exports.PopoverTypes = void 0;
|
|
28
28
|
var tippy_js_1 = require("tippy.js");
|
|
29
|
-
var libs_1 = require("../../libs");
|
|
30
29
|
var button_1 = require("../button");
|
|
31
30
|
var base_1 = require("../base");
|
|
32
31
|
var common_1 = require("../common");
|
|
@@ -254,7 +253,7 @@ var _Popover = /** @class */ (function (_super) {
|
|
|
254
253
|
_this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;
|
|
255
254
|
};
|
|
256
255
|
// Create the tippy
|
|
257
|
-
this._tippy =
|
|
256
|
+
this._tippy = tippy_js_1.default(this.el, options);
|
|
258
257
|
};
|
|
259
258
|
/**
|
|
260
259
|
* Public Interface
|
|
@@ -26,7 +26,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Tooltip = exports.TooltipPlacements = exports.TooltipTypes = void 0;
|
|
28
28
|
var tippy_js_1 = require("tippy.js");
|
|
29
|
-
var libs_1 = require("../../libs");
|
|
30
29
|
var base_1 = require("../base");
|
|
31
30
|
var button_1 = require("../button");
|
|
32
31
|
var common_1 = require("../common");
|
|
@@ -302,7 +301,7 @@ var _Tooltip = /** @class */ (function (_super) {
|
|
|
302
301
|
_this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;
|
|
303
302
|
};
|
|
304
303
|
// Create the tippy
|
|
305
|
-
this._tippy =
|
|
304
|
+
this._tippy = tippy_js_1.default(this.props.target || this.el, options);
|
|
306
305
|
};
|
|
307
306
|
Object.defineProperty(_Tooltip.prototype, "button", {
|
|
308
307
|
/**
|
package/build/index-icons.js
CHANGED
|
@@ -9,12 +9,12 @@ require("./ie");
|
|
|
9
9
|
var Components = require("./components");
|
|
10
10
|
exports.Components = Components;
|
|
11
11
|
// TippyJS library
|
|
12
|
-
var
|
|
13
|
-
|
|
12
|
+
var tippy_js_1 = require("tippy.js");
|
|
13
|
+
exports.tippy = tippy_js_1.default;
|
|
14
14
|
// Icons
|
|
15
15
|
var icons_1 = require("./icons");
|
|
16
16
|
Object.defineProperty(exports, "Icons", { enumerable: true, get: function () { return icons_1.Icons; } });
|
|
17
17
|
Object.defineProperty(exports, "IconTypes", { enumerable: true, get: function () { return icons_1.IconTypes; } });
|
|
18
18
|
// Bootstrap Global library
|
|
19
|
-
var BS = { Components: Components, Icons: icons_1.Icons, IconTypes: icons_1.IconTypes, tippy:
|
|
19
|
+
var BS = { Components: Components, Icons: icons_1.Icons, IconTypes: icons_1.IconTypes, tippy: tippy_js_1.default };
|
|
20
20
|
window["GD"] = window["GD"] || BS;
|
package/build/index.js
CHANGED
|
@@ -9,8 +9,8 @@ require("./ie");
|
|
|
9
9
|
var Components = require("./components");
|
|
10
10
|
exports.Components = Components;
|
|
11
11
|
// TippyJS library
|
|
12
|
-
var
|
|
13
|
-
|
|
12
|
+
var tippy_js_1 = require("tippy.js");
|
|
13
|
+
exports.tippy = tippy_js_1.default;
|
|
14
14
|
// Bootstrap Global library
|
|
15
|
-
var BS = { Components: Components, tippy:
|
|
15
|
+
var BS = { Components: Components, tippy: tippy_js_1.default };
|
|
16
16
|
window["GD"] = window["GD"] || BS;
|
package/dist/gd-bs-icons.js
CHANGED
|
@@ -1116,7 +1116,7 @@ eval("\n\nvar __createBinding = this && this.__createBinding || (Object.create ?
|
|
|
1116
1116
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1117
1117
|
|
|
1118
1118
|
"use strict";
|
|
1119
|
-
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.InputGroup = exports.InputGroupTypes = 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/inputGroup/templates.ts\");\n/**\r\n * Input Group Types\r\n */\n\n\nvar InputGroupTypes;\n\n(function (InputGroupTypes) {\n InputGroupTypes[InputGroupTypes[\"ColorPicker\"] = 1] = \"ColorPicker\";\n InputGroupTypes[InputGroupTypes[\"Email\"] = 2] = \"Email\";\n InputGroupTypes[InputGroupTypes[\"File\"] = 3] = \"File\";\n InputGroupTypes[InputGroupTypes[\"Password\"] = 4] = \"Password\";\n InputGroupTypes[InputGroupTypes[\"Range\"] = 5] = \"Range\";\n InputGroupTypes[InputGroupTypes[\"Search\"] = 6] = \"Search\";\n InputGroupTypes[InputGroupTypes[\"TextArea\"] = 7] = \"TextArea\";\n InputGroupTypes[InputGroupTypes[\"TextField\"] = 8] = \"TextField\";\n})(InputGroupTypes = exports.InputGroupTypes || (exports.InputGroupTypes = {}));\n/**\r\n * Input Group\r\n * @param props The input group properties.\r\n */\n\n\nvar _InputGroup =\n/** @class */\nfunction (_super) {\n __extends(_InputGroup, _super); // Constructor\n\n\n function _InputGroup(props, template) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._initFl = false; // Configure the collapse\n\n _this.configure(); // Configure the textbox\n\n\n _this.configureTextbox(); // Configure the events\n\n\n _this.configureEvents(); // Configure the parent\n\n\n _this.configureParent(); // Set the flag\n\n\n _this._initFl = true;\n return _this;\n } // Configure the card group\n\n\n _InputGroup.prototype.configure = function () {\n var elInput = this.el.querySelector(\"input\");\n\n if (elInput) {\n // Set the class names\n this.props.isLarge ? this.el.classList.add(\"input-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"input-group-sm\") : null; // Update the label\n\n var label = this.el.querySelector(\"label\");\n\n if (label) {\n this.props.id ? label.setAttribute(\"for\", this.props.id) : null; // See if this is a file\n\n if (this.props.type == InputGroupTypes.File) {\n // Set the class\n label.classList.add(\"form-file-label\"); // Set the text\n\n var spanText = document.createElement(\"span\");\n spanText.classList.add(\"form-file-text\");\n spanText.innerHTML = this.props.label || \"Choose a file...\";\n label.appendChild(spanText); // Set the button\n\n var spanButton = document.createElement(\"span\");\n spanButton.classList.add(\"form-file-button\");\n spanButton.innerHTML = \"Browse\";\n label.appendChild(spanButton);\n } else {\n // Set the label if it exists\n if (this.props.label) {\n label.innerHTML = this.props.label;\n } // Else, remove it\n else {\n this.el.removeChild(label);\n }\n }\n } // See if the label exists\n\n\n if (this.props.prependedLabel) {\n // Add the label\n var label_1 = document.createElement(\"span\");\n label_1.classList.add(\"input-group-text\");\n label_1.innerHTML = this.props.prependedLabel;\n this.el.insertBefore(label_1, elInput);\n } // Parse the buttons\n\n\n var buttons = this.props.prependedButtons || [];\n\n for (var i = 0; i < buttons.length; i++) {\n // Add the button\n this.el.insertBefore(button_1.Button(buttons[i]).el, elInput);\n } // Default the appended buttons\n\n\n var appendedButtons = this.props.appendedButtons || [];\n\n if (this.props.type == InputGroupTypes.Range) {\n // Add the button\n appendedButtons.push({\n id: \"range-value\",\n text: this.props.value == null ? \"\" : this.props.value\n });\n } // See if the label exists\n\n\n if (this.props.appendedLabel) {\n // Add the label\n var label_2 = document.createElement(\"span\");\n label_2.classList.add(\"input-group-text\");\n label_2.innerHTML = this.props.appendedLabel;\n this.el.appendChild(label_2);\n } // Parse the buttons\n\n\n for (var i = 0; i < appendedButtons.length; i++) {\n // Add the button\n this.el.appendChild(button_1.Button(appendedButtons[i]).el);\n }\n }\n }; // Configure the events\n\n\n _InputGroup.prototype.configureEvents = function () {\n var _this = this;\n\n var isMultiLine = this.props.type == InputGroupTypes.TextArea;\n var elInput = this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\");\n\n if (elInput) {\n // See if a change event exists\n var callbackValue_1 = null;\n\n if (this.props.onChange) {\n // Add an input event\n elInput.addEventListener(\"input\", function (ev) {\n // See if we have already executed the change event\n if (callbackValue_1 != elInput.value) {\n // Set the value\n callbackValue_1 = elInput.value; // Call the change event\n\n _this.props.onChange(callbackValue_1, ev);\n }\n });\n } // See if this is a range\n\n\n if (this.props.type == InputGroupTypes.Range) {\n // Add a change event\n elInput.addEventListener(\"input\", function () {\n // Get the button\n var btn = _this.el.querySelector(\"#range-value\");\n\n if (btn) {\n // Update the value\n btn.innerHTML = elInput.value;\n }\n });\n } // See if this is not a multi-line\n\n\n if (!isMultiLine) {\n // Add a mouse up event to detect the clear event\n elInput.addEventListener(\"mouseup\", function (ev) {\n // Get the current value\n var el = ev.currentTarget;\n var oldValue = el.value; // Wait for the user to stop updating the value\n\n setTimeout(function () {\n // Get the current value\n var currentValue = el.value; // See if the values have changed\n\n if (currentValue != oldValue) {\n // See if we have already executed the change event\n if (callbackValue_1 != currentValue) {\n // Set the value\n callbackValue_1 = currentValue; // Call the events\n\n _this.props.onChange ? _this.props.onChange(callbackValue_1, ev) : null;\n _this.props.onClear && callbackValue_1 == \"\" ? _this.props.onClear() : null;\n }\n }\n }, 1);\n });\n }\n }\n }; // Configures the text box\n\n\n _InputGroup.prototype.configureTextbox = function () {\n var isTextArea = this.props.type == InputGroupTypes.TextArea;\n var input = this.el.querySelector(\"input\");\n var textarea = this.el.querySelector(\"textarea\"); // See if this is a text area\n\n if (isTextArea) {\n // Remove the input\n input ? this.el.removeChild(input) : null; // Ensure the textarea exists\n\n if (textarea) {\n // Update the textbox\n this.props.id ? textarea.id = this.props.id : null;\n this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;\n textarea.disabled = this.props.isDisabled ? true : false;\n textarea.readOnly = this.props.isReadonly ? true : false;\n textarea.rows = this.props.rows;\n this.props.title ? textarea.title = this.props.title : null;\n }\n } else {\n // Remove the textarea\n textarea ? this.el.removeChild(textarea) : null; // Ensure the input exists\n\n if (input) {\n // Update the textbox\n this.props.id ? input.id = this.props.id : null;\n this.props.placeholder ? input.placeholder = this.props.placeholder : null;\n input.disabled = this.props.isDisabled ? true : false;\n input.readOnly = this.props.isReadonly ? true : false;\n this.props.title ? input.title = this.props.title : null;\n typeof this.props.min === \"number\" ? input.min = this.props.min + \"\" : null;\n typeof this.props.max === \"number\" ? input.max = this.props.max + \"\" : null;\n typeof this.props.step === \"number\" ? input.step = this.props.step + \"\" : null; // Update the type\n\n switch (this.props.type) {\n // Color Picker\n case InputGroupTypes.ColorPicker:\n input.classList.add(\"form-control-color\");\n input.type = \"color\";\n break;\n // Email\n\n case InputGroupTypes.Email:\n input.classList.add(\"form-email\");\n input.type = \"email\";\n break;\n // File\n\n case InputGroupTypes.File:\n this.el.classList.add(\"form-file\");\n input.classList.remove(\"form-control\");\n input.classList.add(\"form-file-input\");\n input.type = \"file\";\n break;\n // Password\n\n case InputGroupTypes.Password:\n input.classList.add(\"form-password\");\n input.type = \"password\";\n break;\n // Range\n\n case InputGroupTypes.Range:\n input.classList.add(\"form-range\");\n input.type = \"range\";\n break;\n // Search\n\n case InputGroupTypes.Search:\n input.classList.add(\"form-search\");\n input.type = \"search\";\n input.setAttribute(\"aria-label\", \"Search\");\n break;\n }\n }\n } // Set the default value\n\n\n this.setValue(this.props.value);\n };\n /**\r\n * Public Interface\r\n */\n\n\n _InputGroup.prototype.getValue = function () {\n return this.textbox.value;\n }; // Sets the textbox value\n\n\n _InputGroup.prototype.setValue = function (value) {\n if (value === void 0) {\n value = \"\";\n } // Set the textbox value\n\n\n this.textbox.value = value; // See if a change event exists\n\n if (this._initFl && this.props.onChange) {\n // Execute the change event\n this.props.onChange(value);\n }\n };\n\n Object.defineProperty(_InputGroup.prototype, \"textbox\", {\n // Returns the textbox\n get: function get() {\n return this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\");\n },\n enumerable: false,\n configurable: true\n });\n return _InputGroup;\n}(base_1.Base);\n\nexports.InputGroup = function (props, template) {\n return new _InputGroup(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/inputGroup/index.ts?");
|
|
1119
|
+
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.InputGroup = exports.InputGroupTypes = 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/inputGroup/templates.ts\");\n/**\r\n * Input Group Types\r\n */\n\n\nvar InputGroupTypes;\n\n(function (InputGroupTypes) {\n InputGroupTypes[InputGroupTypes[\"ColorPicker\"] = 1] = \"ColorPicker\";\n InputGroupTypes[InputGroupTypes[\"Email\"] = 2] = \"Email\";\n InputGroupTypes[InputGroupTypes[\"File\"] = 3] = \"File\";\n InputGroupTypes[InputGroupTypes[\"Password\"] = 4] = \"Password\";\n InputGroupTypes[InputGroupTypes[\"Range\"] = 5] = \"Range\";\n InputGroupTypes[InputGroupTypes[\"Search\"] = 6] = \"Search\";\n InputGroupTypes[InputGroupTypes[\"TextArea\"] = 7] = \"TextArea\";\n InputGroupTypes[InputGroupTypes[\"TextField\"] = 8] = \"TextField\";\n})(InputGroupTypes = exports.InputGroupTypes || (exports.InputGroupTypes = {}));\n/**\r\n * Input Group\r\n * @param props The input group properties.\r\n */\n\n\nvar _InputGroup =\n/** @class */\nfunction (_super) {\n __extends(_InputGroup, _super); // Constructor\n\n\n function _InputGroup(props, template) {\n if (template === void 0) {\n template = templates_1.HTML;\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._initFl = false; // Configure the collapse\n\n _this.configure(); // Configure the textbox\n\n\n _this.configureTextbox(); // Configure the events\n\n\n _this.configureEvents(); // Configure the parent\n\n\n _this.configureParent(); // Set the flag\n\n\n _this._initFl = true;\n return _this;\n } // Configure the card group\n\n\n _InputGroup.prototype.configure = function () {\n var elInput = this.el.querySelector(\"input\");\n\n if (elInput) {\n // Set the class names\n this.props.isLarge ? this.el.classList.add(\"input-group-lg\") : null;\n this.props.isSmall ? this.el.classList.add(\"input-group-sm\") : null; // Update the label\n\n var label = this.el.querySelector(\"label\");\n\n if (label) {\n this.props.id ? label.setAttribute(\"for\", this.props.id) : null; // See if this is a file\n\n if (this.props.type == InputGroupTypes.File) {\n // Set the class\n label.classList.add(\"form-file-label\"); // Set the text\n\n var spanText = document.createElement(\"span\");\n spanText.classList.add(\"form-file-text\");\n spanText.innerHTML = this.props.label || \"Choose a file...\";\n label.appendChild(spanText); // Set the button\n\n var spanButton = document.createElement(\"span\");\n spanButton.classList.add(\"form-file-button\");\n spanButton.innerHTML = \"Browse\";\n label.appendChild(spanButton);\n } else {\n // Set the label if it exists\n if (this.props.label) {\n label.innerHTML = this.props.label;\n } // Else, remove it\n else {\n this.el.removeChild(label);\n }\n }\n } // See if the label exists\n\n\n if (this.props.prependedLabel) {\n // Add the label\n var label_1 = document.createElement(\"span\");\n label_1.classList.add(\"input-group-text\");\n label_1.innerHTML = this.props.prependedLabel;\n this.el.insertBefore(label_1, elInput);\n } // Parse the buttons\n\n\n var buttons = this.props.prependedButtons || [];\n\n for (var i = 0; i < buttons.length; i++) {\n // Add the button\n this.el.insertBefore(button_1.Button(buttons[i]).el, elInput);\n } // Default the appended buttons\n\n\n var appendedButtons = this.props.appendedButtons || [];\n\n if (this.props.type == InputGroupTypes.Range) {\n // Add the button\n appendedButtons.push({\n id: \"range-value\",\n text: this.props.value == null ? \"\" : this.props.value\n });\n } // See if the label exists\n\n\n if (this.props.appendedLabel) {\n // Add the label\n var label_2 = document.createElement(\"span\");\n label_2.classList.add(\"input-group-text\");\n label_2.innerHTML = this.props.appendedLabel;\n this.el.appendChild(label_2);\n } // Parse the buttons\n\n\n for (var i = 0; i < appendedButtons.length; i++) {\n // Add the button\n this.el.appendChild(button_1.Button(appendedButtons[i]).el);\n }\n }\n }; // Configure the events\n\n\n _InputGroup.prototype.configureEvents = function () {\n var _this = this;\n\n var isMultiLine = this.props.type == InputGroupTypes.TextArea;\n var elInput = this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\");\n\n if (elInput) {\n // See if a change event exists\n var callbackValue_1 = null;\n\n if (this.props.onChange) {\n // Add an input event\n elInput.addEventListener(\"input\", function (ev) {\n // See if we have already executed the change event\n if (callbackValue_1 != elInput.value) {\n // Set the value\n callbackValue_1 = elInput.value; // Call the change event\n\n _this.props.onChange(callbackValue_1, ev);\n }\n });\n } // See if this is a range\n\n\n if (this.props.type == InputGroupTypes.Range) {\n // Add a change event\n elInput.addEventListener(\"input\", function () {\n // Get the button\n var btn = _this.el.querySelector(\"#range-value\");\n\n if (btn) {\n // Update the value\n btn.innerHTML = elInput.value;\n }\n });\n } // See if this is not a multi-line\n\n\n if (!isMultiLine) {\n // Add a mouse up event to detect the clear event\n elInput.addEventListener(\"mouseup\", function (ev) {\n // Get the current value\n var el = ev.currentTarget;\n var oldValue = el.value; // Wait for the user to stop updating the value\n\n setTimeout(function () {\n // Get the current value\n var currentValue = el.value; // See if the values have changed\n\n if (currentValue != oldValue) {\n // See if we have already executed the change event\n if (callbackValue_1 != currentValue) {\n // Set the value\n callbackValue_1 = currentValue; // Call the events\n\n _this.props.onChange ? _this.props.onChange(callbackValue_1, ev) : null;\n _this.props.onClear && callbackValue_1 == \"\" ? _this.props.onClear() : null;\n }\n }\n }, 1);\n });\n }\n }\n }; // Configures the text box\n\n\n _InputGroup.prototype.configureTextbox = function () {\n var isTextArea = this.props.type == InputGroupTypes.TextArea;\n var input = this.el.querySelector(\"input\");\n var textarea = this.el.querySelector(\"textarea\"); // See if this is a text area\n\n if (isTextArea) {\n // Remove the input\n input ? this.el.removeChild(input) : null; // Ensure the textarea exists\n\n if (textarea) {\n // Update the textbox\n this.props.id ? textarea.id = this.props.id : null;\n this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;\n textarea.disabled = this.props.isDisabled ? true : false;\n textarea.readOnly = this.props.isReadonly ? true : false;\n textarea.rows = this.props.rows;\n this.props.title ? textarea.title = this.props.title : null;\n }\n } else {\n // Remove the textarea\n textarea ? this.el.removeChild(textarea) : null; // Ensure the input exists\n\n if (input) {\n // Update the textbox\n this.props.id ? input.id = this.props.id : null;\n this.props.placeholder ? input.placeholder = this.props.placeholder : null;\n input.disabled = this.props.isDisabled ? true : false;\n input.readOnly = this.props.isReadonly ? true : false;\n this.props.title ? input.title = this.props.title : null;\n typeof this.props.min === \"number\" ? input.min = this.props.min + \"\" : null;\n typeof this.props.max === \"number\" ? input.max = this.props.max + \"\" : null;\n typeof this.props.step === \"number\" ? input.step = this.props.step + \"\" : null; // Update the type\n\n switch (this.props.type) {\n // Color Picker\n case InputGroupTypes.ColorPicker:\n input.classList.add(\"form-control-color\");\n input.type = \"color\";\n break;\n // Email\n\n case InputGroupTypes.Email:\n input.classList.add(\"form-email\");\n input.type = \"email\";\n break;\n // File\n\n case InputGroupTypes.File:\n this.el.classList.add(\"form-file\");\n input.classList.remove(\"form-control\");\n input.classList.add(\"form-file-input\");\n input.type = \"file\";\n break;\n // Password\n\n case InputGroupTypes.Password:\n input.classList.add(\"form-password\");\n input.type = \"password\";\n break;\n // Range\n\n case InputGroupTypes.Range:\n input.classList.add(\"form-range\");\n input.type = \"range\";\n break;\n // Search\n\n case InputGroupTypes.Search:\n input.classList.add(\"form-search\");\n input.type = \"search\";\n input.setAttribute(\"aria-label\", \"Search\");\n break;\n }\n }\n } // Set the default value\n\n\n this.setValue(this.props.value);\n };\n /**\r\n * Public Interface\r\n */\n\n\n _InputGroup.prototype.getValue = function () {\n return this.elTextbox.value;\n }; // Sets the textbox value\n\n\n _InputGroup.prototype.setValue = function (value) {\n if (value === void 0) {\n value = \"\";\n } // Set the textbox value\n\n\n this.elTextbox.value = value; // See if a change event exists\n\n if (this._initFl && this.props.onChange) {\n // Execute the change event\n this.props.onChange(value);\n }\n };\n\n Object.defineProperty(_InputGroup.prototype, \"elTextbox\", {\n // Returns the textbox\n get: function get() {\n return this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\");\n },\n enumerable: false,\n configurable: true\n });\n return _InputGroup;\n}(base_1.Base);\n\nexports.InputGroup = function (props, template) {\n return new _InputGroup(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/inputGroup/index.ts?");
|
|
1120
1120
|
|
|
1121
1121
|
/***/ }),
|
|
1122
1122
|
|
|
@@ -1347,7 +1347,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
1347
1347
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1348
1348
|
|
|
1349
1349
|
"use strict";
|
|
1350
|
-
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\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Popover = exports.PopoverPlacements = exports.PopoverTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar libs_1 = __webpack_require__(/*! ../../libs */ \"./src/libs.ts\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Popover Types\r\n */\n\n\nvar PopoverTypes;\n\n(function (PopoverTypes) {\n PopoverTypes[PopoverTypes[\"Danger\"] = 1] = \"Danger\";\n PopoverTypes[PopoverTypes[\"Dark\"] = 2] = \"Dark\";\n PopoverTypes[PopoverTypes[\"Info\"] = 3] = \"Info\";\n PopoverTypes[PopoverTypes[\"Light\"] = 4] = \"Light\";\n PopoverTypes[PopoverTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n PopoverTypes[PopoverTypes[\"Material\"] = 6] = \"Material\";\n PopoverTypes[PopoverTypes[\"Primary\"] = 7] = \"Primary\";\n PopoverTypes[PopoverTypes[\"Secondary\"] = 8] = \"Secondary\";\n PopoverTypes[PopoverTypes[\"Success\"] = 9] = \"Success\";\n PopoverTypes[PopoverTypes[\"Translucent\"] = 10] = \"Translucent\";\n PopoverTypes[PopoverTypes[\"Warning\"] = 11] = \"Warning\";\n})(PopoverTypes = exports.PopoverTypes || (exports.PopoverTypes = {}));\n/**\r\n * Popover Placements\r\n */\n\n\nvar PopoverPlacements;\n\n(function (PopoverPlacements) {\n PopoverPlacements[PopoverPlacements[\"Auto\"] = 1] = \"Auto\";\n PopoverPlacements[PopoverPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n PopoverPlacements[PopoverPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n PopoverPlacements[PopoverPlacements[\"Bottom\"] = 4] = \"Bottom\";\n PopoverPlacements[PopoverPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n PopoverPlacements[PopoverPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n PopoverPlacements[PopoverPlacements[\"Left\"] = 7] = \"Left\";\n PopoverPlacements[PopoverPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n PopoverPlacements[PopoverPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n PopoverPlacements[PopoverPlacements[\"Right\"] = 10] = \"Right\";\n PopoverPlacements[PopoverPlacements[\"RightStart\"] = 11] = \"RightStart\";\n PopoverPlacements[PopoverPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n PopoverPlacements[PopoverPlacements[\"Top\"] = 13] = \"Top\";\n PopoverPlacements[PopoverPlacements[\"TopStart\"] = 14] = \"TopStart\";\n PopoverPlacements[PopoverPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(PopoverPlacements = exports.PopoverPlacements || (exports.PopoverPlacements = {}));\n/**\r\n * Popover\r\n */\n\n\nvar _Popover =\n/** @class */\nfunction (_super) {\n __extends(_Popover, _super); // Constructor\n\n\n function _Popover(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent, if the target wasn't specified\n\n\n _this.props.target ? null : _this.configureParent();\n return _this;\n } // Configure the card group\n\n\n _Popover.prototype.configure = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case PopoverPlacements.Auto:\n placement = \"auto\";\n break;\n\n case PopoverPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case PopoverPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case PopoverPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case PopoverPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case PopoverPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case PopoverPlacements.Left:\n placement = \"left\";\n break;\n\n case PopoverPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case PopoverPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case PopoverPlacements.Right:\n placement = \"right\";\n break;\n\n case PopoverPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case PopoverPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case PopoverPlacements.Top:\n placement = \"top\";\n break;\n\n case PopoverPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case PopoverPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Dark\n case PopoverTypes.Dark:\n theme = \"dark\";\n break;\n // Danger\n\n case PopoverTypes.Danger:\n theme = \"danger\";\n break;\n // Info\n\n case PopoverTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case PopoverTypes.Light:\n theme = \"light\";\n break;\n\n case PopoverTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case PopoverTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case PopoverTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case PopoverTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case PopoverTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case PopoverTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case PopoverTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Light Border\n\n default:\n theme = \"light-border\";\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: true,\n animation: \"scale\",\n arrow: true,\n delay: 100,\n inertia: true,\n interactive: true,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // See if we are targeting an element\n\n\n var elPopover = null;\n\n if (this.props.target) {\n // Set the popover to the target element\n elPopover = this.props.target; // Ensure the attributes are set in the target element\n\n elPopover.setAttribute(\"tabindex\", \"0\"); // Update this element\n\n this.el = elPopover;\n } else {\n // Create the button\n var btnProps = this.props.btnProps || {};\n btnProps.isLink = this.props.isDismissible ? true : false;\n btnProps.tabIndex = btnProps.tabIndex || 0;\n this.el = button_1.Button(btnProps).el;\n } // Create the popover content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"popover-content\");\n\n this._elContent.innerHTML = '<h5 class=\"popover-header m-0\"></h5><div class=\"popover-body\"></div>';\n common_1.appendContent(this._elContent.querySelector(\".popover-header\"), this.props.title);\n common_1.appendContent(this._elContent.querySelector(\".popover-body\"), options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Set the styling\n\n elContent.style.padding = \"0\"; // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = libs_1.tippy(this.el, options);\n };\n /**\r\n * Public Interface\r\n */\n // Disables the popover\n\n\n _Popover.prototype.disable = function () {\n // Disable the target element\n this.el.disabled = true;\n }; // Enables the popover\n\n\n _Popover.prototype.enable = function () {\n // Enable the target element\n this.el.disabled = false;\n }; // Hides the popover\n\n\n _Popover.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Popover.prototype, \"isVisible\", {\n // Determines if the popover is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Popover.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Popover.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the popover\n\n\n _Popover.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the popover\n\n\n _Popover.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Popover;\n}(base_1.Base);\n\nexports.Popover = function (props, template) {\n return new _Popover(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/popover/index.ts?");
|
|
1350
|
+
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\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Popover = exports.PopoverPlacements = exports.PopoverTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar button_1 = __webpack_require__(/*! ../button */ \"./src/components/button/index.ts\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./src/components/base.ts\");\n\nvar common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Popover Types\r\n */\n\n\nvar PopoverTypes;\n\n(function (PopoverTypes) {\n PopoverTypes[PopoverTypes[\"Danger\"] = 1] = \"Danger\";\n PopoverTypes[PopoverTypes[\"Dark\"] = 2] = \"Dark\";\n PopoverTypes[PopoverTypes[\"Info\"] = 3] = \"Info\";\n PopoverTypes[PopoverTypes[\"Light\"] = 4] = \"Light\";\n PopoverTypes[PopoverTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n PopoverTypes[PopoverTypes[\"Material\"] = 6] = \"Material\";\n PopoverTypes[PopoverTypes[\"Primary\"] = 7] = \"Primary\";\n PopoverTypes[PopoverTypes[\"Secondary\"] = 8] = \"Secondary\";\n PopoverTypes[PopoverTypes[\"Success\"] = 9] = \"Success\";\n PopoverTypes[PopoverTypes[\"Translucent\"] = 10] = \"Translucent\";\n PopoverTypes[PopoverTypes[\"Warning\"] = 11] = \"Warning\";\n})(PopoverTypes = exports.PopoverTypes || (exports.PopoverTypes = {}));\n/**\r\n * Popover Placements\r\n */\n\n\nvar PopoverPlacements;\n\n(function (PopoverPlacements) {\n PopoverPlacements[PopoverPlacements[\"Auto\"] = 1] = \"Auto\";\n PopoverPlacements[PopoverPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n PopoverPlacements[PopoverPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n PopoverPlacements[PopoverPlacements[\"Bottom\"] = 4] = \"Bottom\";\n PopoverPlacements[PopoverPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n PopoverPlacements[PopoverPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n PopoverPlacements[PopoverPlacements[\"Left\"] = 7] = \"Left\";\n PopoverPlacements[PopoverPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n PopoverPlacements[PopoverPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n PopoverPlacements[PopoverPlacements[\"Right\"] = 10] = \"Right\";\n PopoverPlacements[PopoverPlacements[\"RightStart\"] = 11] = \"RightStart\";\n PopoverPlacements[PopoverPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n PopoverPlacements[PopoverPlacements[\"Top\"] = 13] = \"Top\";\n PopoverPlacements[PopoverPlacements[\"TopStart\"] = 14] = \"TopStart\";\n PopoverPlacements[PopoverPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(PopoverPlacements = exports.PopoverPlacements || (exports.PopoverPlacements = {}));\n/**\r\n * Popover\r\n */\n\n\nvar _Popover =\n/** @class */\nfunction (_super) {\n __extends(_Popover, _super); // Constructor\n\n\n function _Popover(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent, if the target wasn't specified\n\n\n _this.props.target ? null : _this.configureParent();\n return _this;\n } // Configure the card group\n\n\n _Popover.prototype.configure = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case PopoverPlacements.Auto:\n placement = \"auto\";\n break;\n\n case PopoverPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case PopoverPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case PopoverPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case PopoverPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case PopoverPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case PopoverPlacements.Left:\n placement = \"left\";\n break;\n\n case PopoverPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case PopoverPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case PopoverPlacements.Right:\n placement = \"right\";\n break;\n\n case PopoverPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case PopoverPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case PopoverPlacements.Top:\n placement = \"top\";\n break;\n\n case PopoverPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case PopoverPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Dark\n case PopoverTypes.Dark:\n theme = \"dark\";\n break;\n // Danger\n\n case PopoverTypes.Danger:\n theme = \"danger\";\n break;\n // Info\n\n case PopoverTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case PopoverTypes.Light:\n theme = \"light\";\n break;\n\n case PopoverTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case PopoverTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case PopoverTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case PopoverTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case PopoverTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case PopoverTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case PopoverTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Light Border\n\n default:\n theme = \"light-border\";\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: true,\n animation: \"scale\",\n arrow: true,\n delay: 100,\n inertia: true,\n interactive: true,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // See if we are targeting an element\n\n\n var elPopover = null;\n\n if (this.props.target) {\n // Set the popover to the target element\n elPopover = this.props.target; // Ensure the attributes are set in the target element\n\n elPopover.setAttribute(\"tabindex\", \"0\"); // Update this element\n\n this.el = elPopover;\n } else {\n // Create the button\n var btnProps = this.props.btnProps || {};\n btnProps.isLink = this.props.isDismissible ? true : false;\n btnProps.tabIndex = btnProps.tabIndex || 0;\n this.el = button_1.Button(btnProps).el;\n } // Create the popover content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"popover-content\");\n\n this._elContent.innerHTML = '<h5 class=\"popover-header m-0\"></h5><div class=\"popover-body\"></div>';\n common_1.appendContent(this._elContent.querySelector(\".popover-header\"), this.props.title);\n common_1.appendContent(this._elContent.querySelector(\".popover-body\"), options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Set the styling\n\n elContent.style.padding = \"0\"; // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = tippy_js_1[\"default\"](this.el, options);\n };\n /**\r\n * Public Interface\r\n */\n // Disables the popover\n\n\n _Popover.prototype.disable = function () {\n // Disable the target element\n this.el.disabled = true;\n }; // Enables the popover\n\n\n _Popover.prototype.enable = function () {\n // Enable the target element\n this.el.disabled = false;\n }; // Hides the popover\n\n\n _Popover.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Popover.prototype, \"isVisible\", {\n // Determines if the popover is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Popover.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Popover.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the popover\n\n\n _Popover.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the popover\n\n\n _Popover.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Popover;\n}(base_1.Base);\n\nexports.Popover = function (props, template) {\n return new _Popover(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/popover/index.ts?");
|
|
1351
1351
|
|
|
1352
1352
|
/***/ }),
|
|
1353
1353
|
|
|
@@ -1512,7 +1512,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
1512
1512
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1513
1513
|
|
|
1514
1514
|
"use strict";
|
|
1515
|
-
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\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Tooltip = exports.TooltipPlacements = exports.TooltipTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nvar libs_1 = __webpack_require__(/*! ../../libs */ \"./src/libs.ts\");\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 common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Tooltip Types\r\n */\n\n\nvar TooltipTypes;\n\n(function (TooltipTypes) {\n TooltipTypes[TooltipTypes[\"Danger\"] = 1] = \"Danger\";\n TooltipTypes[TooltipTypes[\"Dark\"] = 2] = \"Dark\";\n TooltipTypes[TooltipTypes[\"Info\"] = 3] = \"Info\";\n TooltipTypes[TooltipTypes[\"Light\"] = 4] = \"Light\";\n TooltipTypes[TooltipTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n TooltipTypes[TooltipTypes[\"Material\"] = 6] = \"Material\";\n TooltipTypes[TooltipTypes[\"Primary\"] = 7] = \"Primary\";\n TooltipTypes[TooltipTypes[\"Secondary\"] = 8] = \"Secondary\";\n TooltipTypes[TooltipTypes[\"Success\"] = 9] = \"Success\";\n TooltipTypes[TooltipTypes[\"Translucent\"] = 10] = \"Translucent\";\n TooltipTypes[TooltipTypes[\"Warning\"] = 11] = \"Warning\";\n})(TooltipTypes = exports.TooltipTypes || (exports.TooltipTypes = {}));\n/**\r\n * Tooltip Placements\r\n */\n\n\nvar TooltipPlacements;\n\n(function (TooltipPlacements) {\n TooltipPlacements[TooltipPlacements[\"Auto\"] = 1] = \"Auto\";\n TooltipPlacements[TooltipPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n TooltipPlacements[TooltipPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n TooltipPlacements[TooltipPlacements[\"Bottom\"] = 4] = \"Bottom\";\n TooltipPlacements[TooltipPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n TooltipPlacements[TooltipPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n TooltipPlacements[TooltipPlacements[\"Left\"] = 7] = \"Left\";\n TooltipPlacements[TooltipPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n TooltipPlacements[TooltipPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n TooltipPlacements[TooltipPlacements[\"Right\"] = 10] = \"Right\";\n TooltipPlacements[TooltipPlacements[\"RightStart\"] = 11] = \"RightStart\";\n TooltipPlacements[TooltipPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n TooltipPlacements[TooltipPlacements[\"Top\"] = 13] = \"Top\";\n TooltipPlacements[TooltipPlacements[\"TopStart\"] = 14] = \"TopStart\";\n TooltipPlacements[TooltipPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(TooltipPlacements = exports.TooltipPlacements || (exports.TooltipPlacements = {}));\n/**\r\n * Tooltip\r\n */\n\n\nvar _Tooltip =\n/** @class */\nfunction (_super) {\n __extends(_Tooltip, _super); // Constructor\n\n\n function _Tooltip(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._btn = null;\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip\n\n\n _Tooltip.prototype.configure = function () {\n // See if the target element was not defined\n if (this.props.target == null) {\n // Default the toggle property for the button\n var btnProps = this.props.btnProps || {};\n btnProps.type = btnProps.type || button_1.ButtonTypes.OutlineSecondary; // Create the button\n\n this._btn = button_1.Button(btnProps); // Update the element\n\n this.el = this._btn.el;\n } // Configure the options\n\n\n this.configureOptions();\n }; // Configure the options\n\n\n _Tooltip.prototype.configureOptions = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case TooltipPlacements.Auto:\n placement = \"auto\";\n break;\n\n case TooltipPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case TooltipPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case TooltipPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case TooltipPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case TooltipPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case TooltipPlacements.Left:\n placement = \"left\";\n break;\n\n case TooltipPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case TooltipPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case TooltipPlacements.Right:\n placement = \"right\";\n break;\n\n case TooltipPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case TooltipPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case TooltipPlacements.Top:\n placement = \"top\";\n break;\n\n case TooltipPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case TooltipPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Danger\n case TooltipTypes.Danger:\n theme = \"danger\";\n break;\n // Dark\n\n case TooltipTypes.Dark:\n theme = \"dark\";\n break;\n // Info\n\n case TooltipTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case TooltipTypes.Light:\n theme = \"light\";\n break;\n\n case TooltipTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case TooltipTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case TooltipTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case TooltipTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case TooltipTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case TooltipTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case TooltipTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Secondary\n\n default:\n // Set the default theme\n theme = \"secondary\"; // See if a button exists\n\n if (this.props.btnProps && this.props.btnProps.type > 0) {\n // Match the theme to the button type\n switch (this.props.btnProps.type) {\n // Danger\n case button_1.ButtonTypes.Danger:\n case button_1.ButtonTypes.OutlineDanger:\n theme = \"danger\";\n break;\n // Dark\n\n case button_1.ButtonTypes.Dark:\n case button_1.ButtonTypes.OutlineDark:\n theme = \"dark\";\n break;\n // Info\n\n case button_1.ButtonTypes.Info:\n case button_1.ButtonTypes.OutlineInfo:\n theme = \"info\";\n break;\n // Light\n\n case button_1.ButtonTypes.Light:\n case button_1.ButtonTypes.OutlineLight:\n theme = \"light\";\n break;\n // Link\n\n case button_1.ButtonTypes.Link:\n case button_1.ButtonTypes.OutlineLink:\n theme = \"light-border\";\n break;\n // Primary\n\n case button_1.ButtonTypes.Primary:\n case button_1.ButtonTypes.OutlinePrimary:\n theme = \"primary\";\n break;\n // Secondary\n\n case button_1.ButtonTypes.Secondary:\n case button_1.ButtonTypes.OutlineSecondary:\n theme = \"secondary\";\n break;\n // Success\n\n case button_1.ButtonTypes.Success:\n case button_1.ButtonTypes.OutlineSuccess:\n theme = \"success\";\n break;\n // Warning\n\n case button_1.ButtonTypes.Warning:\n case button_1.ButtonTypes.OutlineWarning:\n theme = \"warning\";\n break;\n }\n }\n\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: false,\n animation: \"scale\",\n arrow: true,\n content: this.props.content,\n delay: 100,\n inertia: true,\n interactive: false,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // Create the tooltip content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"tooltip-content\");\n\n common_1.appendContent(this._elContent, options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = libs_1.tippy(this.props.target || this.el, options);\n };\n\n Object.defineProperty(_Tooltip.prototype, \"button\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the button\n get: function get() {\n return this._btn;\n },\n enumerable: false,\n configurable: true\n }); // Disbles the tooltip\n\n _Tooltip.prototype.disable = function () {\n // Disable the button\n this._btn ? this._btn.disable() : null;\n }; // Enables the tooltip\n\n\n _Tooltip.prototype.enable = function () {\n // Enable the button\n this._btn ? this._btn.enable() : null;\n }; // Hides the tooltip\n\n\n _Tooltip.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Tooltip.prototype, \"isVisible\", {\n // Determines if the tooltip is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Tooltip.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Tooltip.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the tooltip\n\n\n _Tooltip.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the tooltip\n\n\n _Tooltip.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Tooltip;\n}(base_1.Base);\n\nexports.Tooltip = function (props, template) {\n return new _Tooltip(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltip/index.ts?");
|
|
1515
|
+
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\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Tooltip = exports.TooltipPlacements = exports.TooltipTypes = void 0;\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\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 common_1 = __webpack_require__(/*! ../common */ \"./src/components/common.ts\");\n/**\r\n * Tooltip Types\r\n */\n\n\nvar TooltipTypes;\n\n(function (TooltipTypes) {\n TooltipTypes[TooltipTypes[\"Danger\"] = 1] = \"Danger\";\n TooltipTypes[TooltipTypes[\"Dark\"] = 2] = \"Dark\";\n TooltipTypes[TooltipTypes[\"Info\"] = 3] = \"Info\";\n TooltipTypes[TooltipTypes[\"Light\"] = 4] = \"Light\";\n TooltipTypes[TooltipTypes[\"LightBorder\"] = 5] = \"LightBorder\";\n TooltipTypes[TooltipTypes[\"Material\"] = 6] = \"Material\";\n TooltipTypes[TooltipTypes[\"Primary\"] = 7] = \"Primary\";\n TooltipTypes[TooltipTypes[\"Secondary\"] = 8] = \"Secondary\";\n TooltipTypes[TooltipTypes[\"Success\"] = 9] = \"Success\";\n TooltipTypes[TooltipTypes[\"Translucent\"] = 10] = \"Translucent\";\n TooltipTypes[TooltipTypes[\"Warning\"] = 11] = \"Warning\";\n})(TooltipTypes = exports.TooltipTypes || (exports.TooltipTypes = {}));\n/**\r\n * Tooltip Placements\r\n */\n\n\nvar TooltipPlacements;\n\n(function (TooltipPlacements) {\n TooltipPlacements[TooltipPlacements[\"Auto\"] = 1] = \"Auto\";\n TooltipPlacements[TooltipPlacements[\"AutoStart\"] = 2] = \"AutoStart\";\n TooltipPlacements[TooltipPlacements[\"AutoEnd\"] = 3] = \"AutoEnd\";\n TooltipPlacements[TooltipPlacements[\"Bottom\"] = 4] = \"Bottom\";\n TooltipPlacements[TooltipPlacements[\"BottomStart\"] = 5] = \"BottomStart\";\n TooltipPlacements[TooltipPlacements[\"BottomEnd\"] = 6] = \"BottomEnd\";\n TooltipPlacements[TooltipPlacements[\"Left\"] = 7] = \"Left\";\n TooltipPlacements[TooltipPlacements[\"LeftStart\"] = 8] = \"LeftStart\";\n TooltipPlacements[TooltipPlacements[\"LeftEnd\"] = 9] = \"LeftEnd\";\n TooltipPlacements[TooltipPlacements[\"Right\"] = 10] = \"Right\";\n TooltipPlacements[TooltipPlacements[\"RightStart\"] = 11] = \"RightStart\";\n TooltipPlacements[TooltipPlacements[\"RightEnd\"] = 12] = \"RightEnd\";\n TooltipPlacements[TooltipPlacements[\"Top\"] = 13] = \"Top\";\n TooltipPlacements[TooltipPlacements[\"TopStart\"] = 14] = \"TopStart\";\n TooltipPlacements[TooltipPlacements[\"TopEnd\"] = 15] = \"TopEnd\";\n})(TooltipPlacements = exports.TooltipPlacements || (exports.TooltipPlacements = {}));\n/**\r\n * Tooltip\r\n */\n\n\nvar _Tooltip =\n/** @class */\nfunction (_super) {\n __extends(_Tooltip, _super); // Constructor\n\n\n function _Tooltip(props, template) {\n if (template === void 0) {\n template = \"\";\n }\n\n var _this = _super.call(this, template, props) || this;\n\n _this._btn = null;\n _this._elContent = null;\n _this._tippy = null; // Configure the collapse\n\n _this.configure(); // Configure the parent\n\n\n _this.configureParent();\n\n return _this;\n } // Configure the tooltip\n\n\n _Tooltip.prototype.configure = function () {\n // See if the target element was not defined\n if (this.props.target == null) {\n // Default the toggle property for the button\n var btnProps = this.props.btnProps || {};\n btnProps.type = btnProps.type || button_1.ButtonTypes.OutlineSecondary; // Create the button\n\n this._btn = button_1.Button(btnProps); // Update the element\n\n this.el = this._btn.el;\n } // Configure the options\n\n\n this.configureOptions();\n }; // Configure the options\n\n\n _Tooltip.prototype.configureOptions = function () {\n var _this = this; // Set the placements\n\n\n var placement = null;\n\n switch (this.props.placement) {\n // Auto\n case TooltipPlacements.Auto:\n placement = \"auto\";\n break;\n\n case TooltipPlacements.AutoEnd:\n placement = \"auto-end\";\n break;\n\n case TooltipPlacements.AutoStart:\n placement = \"auto-start\";\n break;\n // Bottom\n\n case TooltipPlacements.Bottom:\n placement = \"bottom\";\n break;\n\n case TooltipPlacements.BottomEnd:\n placement = \"bottom-end\";\n break;\n\n case TooltipPlacements.BottomStart:\n placement = \"bottom-start\";\n break;\n // Left\n\n case TooltipPlacements.Left:\n placement = \"left\";\n break;\n\n case TooltipPlacements.LeftEnd:\n placement = \"left-end\";\n break;\n\n case TooltipPlacements.LeftStart:\n placement = \"left-start\";\n break;\n // Right\n\n case TooltipPlacements.Right:\n placement = \"right\";\n break;\n\n case TooltipPlacements.RightEnd:\n placement = \"right-end\";\n break;\n\n case TooltipPlacements.RightStart:\n placement = \"right-start\";\n break;\n // Top\n\n case TooltipPlacements.Top:\n placement = \"top\";\n break;\n\n case TooltipPlacements.TopEnd:\n placement = \"top-end\";\n break;\n\n case TooltipPlacements.TopStart:\n placement = \"top-start\";\n break;\n // Default - Auto\n\n default:\n placement = \"top\";\n break;\n } // Set the theme\n\n\n var theme = null;\n\n switch (this.props.type) {\n // Danger\n case TooltipTypes.Danger:\n theme = \"danger\";\n break;\n // Dark\n\n case TooltipTypes.Dark:\n theme = \"dark\";\n break;\n // Info\n\n case TooltipTypes.Info:\n theme = \"info\";\n break;\n // Light\n\n case TooltipTypes.Light:\n theme = \"light\";\n break;\n\n case TooltipTypes.LightBorder:\n theme = \"light-border\";\n break;\n // Material\n\n case TooltipTypes.Material:\n theme = \"material\";\n break;\n // Primary\n\n case TooltipTypes.Primary:\n theme = \"primary\";\n break;\n // Secondary\n\n case TooltipTypes.Secondary:\n theme = \"secondary\";\n break;\n // Success\n\n case TooltipTypes.Success:\n theme = \"success\";\n break;\n // Translucent\n\n case TooltipTypes.Translucent:\n theme = \"translucent\";\n break;\n // Warning\n\n case TooltipTypes.Warning:\n theme = \"warning\";\n break;\n // Default - Secondary\n\n default:\n // Set the default theme\n theme = \"secondary\"; // See if a button exists\n\n if (this.props.btnProps && this.props.btnProps.type > 0) {\n // Match the theme to the button type\n switch (this.props.btnProps.type) {\n // Danger\n case button_1.ButtonTypes.Danger:\n case button_1.ButtonTypes.OutlineDanger:\n theme = \"danger\";\n break;\n // Dark\n\n case button_1.ButtonTypes.Dark:\n case button_1.ButtonTypes.OutlineDark:\n theme = \"dark\";\n break;\n // Info\n\n case button_1.ButtonTypes.Info:\n case button_1.ButtonTypes.OutlineInfo:\n theme = \"info\";\n break;\n // Light\n\n case button_1.ButtonTypes.Light:\n case button_1.ButtonTypes.OutlineLight:\n theme = \"light\";\n break;\n // Link\n\n case button_1.ButtonTypes.Link:\n case button_1.ButtonTypes.OutlineLink:\n theme = \"light-border\";\n break;\n // Primary\n\n case button_1.ButtonTypes.Primary:\n case button_1.ButtonTypes.OutlinePrimary:\n theme = \"primary\";\n break;\n // Secondary\n\n case button_1.ButtonTypes.Secondary:\n case button_1.ButtonTypes.OutlineSecondary:\n theme = \"secondary\";\n break;\n // Success\n\n case button_1.ButtonTypes.Success:\n case button_1.ButtonTypes.OutlineSuccess:\n theme = \"success\";\n break;\n // Warning\n\n case button_1.ButtonTypes.Warning:\n case button_1.ButtonTypes.OutlineWarning:\n theme = \"warning\";\n break;\n }\n }\n\n break;\n } // Set the options\n\n\n var options = __assign({\n allowHTML: false,\n animation: \"scale\",\n arrow: true,\n content: this.props.content,\n delay: 100,\n inertia: true,\n interactive: false,\n placement: placement,\n plugins: [tippy_js_1.animateFill, tippy_js_1.followCursor, tippy_js_1.inlinePositioning, tippy_js_1.sticky],\n theme: theme\n }, this.props.options); // Create the tooltip content element\n\n\n this._elContent = document.createElement(\"div\");\n\n this._elContent.classList.add(\"tooltip-content\");\n\n common_1.appendContent(this._elContent, options.content);\n options.content = this._elContent; // Set the on create event\n\n options[\"onCreate\"] = function (tippyObj) {\n // Get the content element\n var elContent = tippyObj.popper.querySelector(\".tippy-content\");\n\n if (elContent) {\n // Set the class\n elContent.classList.add(\"bs\"); // Get the custom class name(s)\n\n var custom = (_this.props.className || \"\").trim().split(\" \");\n\n for (var i = 0; i < custom.length; i++) {\n var className = custom[i]; // Add the custom class name\n\n className ? elContent.classList.add(custom[i]) : null;\n }\n } // Call the custom event if it's defined\n\n\n _this.props.options && _this.props.options.onCreate ? _this.props.options.onCreate(tippyObj) : null;\n }; // Create the tippy\n\n\n this._tippy = tippy_js_1[\"default\"](this.props.target || this.el, options);\n };\n\n Object.defineProperty(_Tooltip.prototype, \"button\", {\n /**\r\n * Public Interface\r\n */\n // Reference to the button\n get: function get() {\n return this._btn;\n },\n enumerable: false,\n configurable: true\n }); // Disbles the tooltip\n\n _Tooltip.prototype.disable = function () {\n // Disable the button\n this._btn ? this._btn.disable() : null;\n }; // Enables the tooltip\n\n\n _Tooltip.prototype.enable = function () {\n // Enable the button\n this._btn ? this._btn.enable() : null;\n }; // Hides the tooltip\n\n\n _Tooltip.prototype.hide = function () {\n // See if it's visible\n if (this.isVisible) {\n this._tippy.hide();\n }\n };\n\n Object.defineProperty(_Tooltip.prototype, \"isVisible\", {\n // Determines if the tooltip is visible\n get: function get() {\n return this._tippy.state.isVisible;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(_Tooltip.prototype, \"tippy\", {\n // The tippy instance\n get: function get() {\n return this._tippy;\n },\n enumerable: false,\n configurable: true\n }); // Sets the tippy content\n\n _Tooltip.prototype.setContent = function (content) {\n // Set the tippy content\n this.tippy.setContent(content);\n }; // Shows the tooltip\n\n\n _Tooltip.prototype.show = function () {\n // See if it's hidden\n if (!this.isVisible) {\n this._tippy.show();\n }\n }; // Toggles the tooltip\n\n\n _Tooltip.prototype.toggle = function () {\n // Toggle the element\n if (this.isVisible) {\n // Hide the element\n this.hide();\n } else {\n // Show the element\n this.show();\n }\n };\n\n return _Tooltip;\n}(base_1.Base);\n\nexports.Tooltip = function (props, template) {\n return new _Tooltip(props, template);\n};\n\n//# sourceURL=webpack://gd-bs/./src/components/tooltip/index.ts?");
|
|
1516
1516
|
|
|
1517
1517
|
/***/ }),
|
|
1518
1518
|
|
|
@@ -19925,18 +19925,7 @@ eval("// Fix to ensure the library loads in IE\n(function () {\n if (typeof win
|
|
|
19925
19925
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
19926
19926
|
|
|
19927
19927
|
"use strict";
|
|
19928
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.IconTypes = exports.Icons = exports.tippy = exports.Components = void 0; // Bootstrap styles\n\n__webpack_require__(/*! ./bs */ \"./src/bs.scss\"); // Import the IE fix\n\n\n__webpack_require__(/*! ./ie */ \"./src/ie.ts\"); // Bootstrap Components\n\n\nvar Components = __webpack_require__(/*! ./components */ \"./src/components/index.ts\");\n\nexports.Components = Components; // TippyJS library\n\nvar
|
|
19929
|
-
|
|
19930
|
-
/***/ }),
|
|
19931
|
-
|
|
19932
|
-
/***/ "./src/libs.ts":
|
|
19933
|
-
/*!*********************!*\
|
|
19934
|
-
!*** ./src/libs.ts ***!
|
|
19935
|
-
\*********************/
|
|
19936
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
19937
|
-
|
|
19938
|
-
"use strict";
|
|
19939
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.tippy = void 0; // Tippy.js Lib\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nexports.tippy = tippy_js_1[\"default\"];\n\n//# sourceURL=webpack://gd-bs/./src/libs.ts?");
|
|
19928
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.IconTypes = exports.Icons = exports.tippy = exports.Components = void 0; // Bootstrap styles\n\n__webpack_require__(/*! ./bs */ \"./src/bs.scss\"); // Import the IE fix\n\n\n__webpack_require__(/*! ./ie */ \"./src/ie.ts\"); // Bootstrap Components\n\n\nvar Components = __webpack_require__(/*! ./components */ \"./src/components/index.ts\");\n\nexports.Components = Components; // TippyJS library\n\nvar tippy_js_1 = __webpack_require__(/*! tippy.js */ \"./node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js\");\n\nexports.tippy = tippy_js_1[\"default\"]; // Icons\n\nvar icons_1 = __webpack_require__(/*! ./icons */ \"./src/icons/index.ts\");\n\nObject.defineProperty(exports, \"Icons\", ({\n enumerable: true,\n get: function get() {\n return icons_1.Icons;\n }\n}));\nObject.defineProperty(exports, \"IconTypes\", ({\n enumerable: true,\n get: function get() {\n return icons_1.IconTypes;\n }\n})); // Bootstrap Global library\n\nvar BS = {\n Components: Components,\n Icons: icons_1.Icons,\n IconTypes: icons_1.IconTypes,\n tippy: tippy_js_1[\"default\"]\n};\nwindow[\"GD\"] = window[\"GD\"] || BS;\n\n//# sourceURL=webpack://gd-bs/./src/index-icons.ts?");
|
|
19940
19929
|
|
|
19941
19930
|
/***/ }),
|
|
19942
19931
|
|