gd-bs 5.6.7 → 5.7.0
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/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 +3 -14
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +9 -676
- package/dist/gd-bs.min.js +1 -1
- package/index.html +1 -0
- package/package.json +1 -1
- 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
|
@@ -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 = require("tippy.js");
|
|
13
|
+
exports.tippy = tippy;
|
|
14
14
|
// Bootstrap Global library
|
|
15
|
-
var BS = { Components: Components, tippy:
|
|
15
|
+
var BS = { Components: Components, tippy: tippy };
|
|
16
16
|
window["GD"] = window["GD"] || BS;
|
package/dist/gd-bs-icons.js
CHANGED
|
@@ -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
|
|