dattatable 2.11.33 → 2.11.34
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.
|
@@ -19,12 +19,31 @@ var Navigation = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
// Renders the component
|
|
21
21
|
Navigation.prototype.render = function () {
|
|
22
|
-
|
|
22
|
+
// See if an icon is defined
|
|
23
|
+
var brand;
|
|
24
|
+
if (this._props.iconType) {
|
|
25
|
+
// Set the icon
|
|
26
|
+
var size = this._props.iconSize || 32;
|
|
27
|
+
var icon = typeof (this._props.iconType) === "function" ? this._props.iconType(size) : this._props.iconType;
|
|
28
|
+
// Set the text
|
|
29
|
+
var text = document.createElement("div");
|
|
30
|
+
text.classList.add("ms-2");
|
|
31
|
+
text.append(this._props.title || "");
|
|
32
|
+
// Set the brand
|
|
33
|
+
brand = document.createElement("div");
|
|
34
|
+
brand.classList.add("d-flex");
|
|
35
|
+
brand.appendChild(icon);
|
|
36
|
+
brand.appendChild(text);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// Set the brand
|
|
40
|
+
brand = this._props.title;
|
|
41
|
+
}
|
|
23
42
|
// Define the default props
|
|
24
43
|
var props = {
|
|
25
|
-
|
|
44
|
+
brand: brand,
|
|
26
45
|
className: this._props.className,
|
|
27
|
-
|
|
46
|
+
el: this._props.el,
|
|
28
47
|
enableSearch: this._props.hideSearch != null ? !this._props.hideSearch : null,
|
|
29
48
|
items: this._props.items,
|
|
30
49
|
itemsEnd: this._props.itemsEnd,
|
|
@@ -38,26 +57,6 @@ var Navigation = /** @class */ (function () {
|
|
|
38
57
|
// Update the collapse visibility
|
|
39
58
|
el.classList.remove("navbar-expand-lg");
|
|
40
59
|
el.classList.add("navbar-expand-sm");
|
|
41
|
-
// See if an icon is defined
|
|
42
|
-
if (_this._props.iconType) {
|
|
43
|
-
// Clear the title
|
|
44
|
-
//el.innerHTML = "";
|
|
45
|
-
debugger;
|
|
46
|
-
// Set the icon
|
|
47
|
-
var size = _this._props.iconSize || 32;
|
|
48
|
-
var icon = typeof (_this._props.iconType) === "function" ? _this._props.iconType(size) : _this._props.iconType;
|
|
49
|
-
// Set the text
|
|
50
|
-
var text = document.createElement("div");
|
|
51
|
-
text.classList.add("h5");
|
|
52
|
-
text.classList.add("ms-2");
|
|
53
|
-
text.append(_this._props.title || "");
|
|
54
|
-
// Add the icon
|
|
55
|
-
var elIcon = document.createElement("div");
|
|
56
|
-
elIcon.classList.add("d-flex");
|
|
57
|
-
elIcon.appendChild(icon);
|
|
58
|
-
elIcon.appendChild(text);
|
|
59
|
-
el.appendChild(elIcon);
|
|
60
|
-
}
|
|
61
60
|
}
|
|
62
61
|
};
|
|
63
62
|
// Call the rendering event
|
package/dist/dattatable.js
CHANGED
|
@@ -236,7 +236,7 @@ eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assig
|
|
|
236
236
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
237
237
|
|
|
238
238
|
"use strict";
|
|
239
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Navigation = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.13.18/node_modules/gd-sprest-bs/build/index.js\");\r\nvar filter_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/filter */ \"./node_modules/.pnpm/gd-sprest-bs@10.13.18/node_modules/gd-sprest-bs/build/icons/svgs/filter.js\");\r\n/**\r\n * Navigation\r\n */\r\nvar Navigation = /** @class */ (function () {\r\n // Constructor\r\n function Navigation(props) {\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the navigation\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Navigation.prototype.render = function () {\r\n
|
|
239
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Navigation = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.13.18/node_modules/gd-sprest-bs/build/index.js\");\r\nvar filter_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/filter */ \"./node_modules/.pnpm/gd-sprest-bs@10.13.18/node_modules/gd-sprest-bs/build/icons/svgs/filter.js\");\r\n/**\r\n * Navigation\r\n */\r\nvar Navigation = /** @class */ (function () {\r\n // Constructor\r\n function Navigation(props) {\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the navigation\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Navigation.prototype.render = function () {\r\n // See if an icon is defined\r\n var brand;\r\n if (this._props.iconType) {\r\n // Set the icon\r\n var size = this._props.iconSize || 32;\r\n var icon = typeof (this._props.iconType) === \"function\" ? this._props.iconType(size) : this._props.iconType;\r\n // Set the text\r\n var text = document.createElement(\"div\");\r\n text.classList.add(\"ms-2\");\r\n text.append(this._props.title || \"\");\r\n // Set the brand\r\n brand = document.createElement(\"div\");\r\n brand.classList.add(\"d-flex\");\r\n brand.appendChild(icon);\r\n brand.appendChild(text);\r\n }\r\n else {\r\n // Set the brand\r\n brand = this._props.title;\r\n }\r\n // Define the default props\r\n var props = {\r\n brand: brand,\r\n className: this._props.className,\r\n el: this._props.el,\r\n enableSearch: this._props.hideSearch != null ? !this._props.hideSearch : null,\r\n items: this._props.items,\r\n itemsEnd: this._props.itemsEnd,\r\n searchBox: {\r\n hideButton: true,\r\n onChange: this._props.onSearch,\r\n onSearch: this._props.onSearch,\r\n placeholder: this._props.searchPlaceholder || \"Search this app\",\r\n },\r\n onRendered: function (el) {\r\n // Update the collapse visibility\r\n el.classList.remove(\"navbar-expand-lg\");\r\n el.classList.add(\"navbar-expand-sm\");\r\n }\r\n };\r\n // Call the rendering event\r\n this._props.onRendering ? this._props.onRendering(props) : null;\r\n // Render a navbar\r\n this._nav = gd_sprest_bs_1.Components.Navbar(props);\r\n // See if we are showing the filter\r\n if (this._props.hideFilter != true) {\r\n // Render the filter icon\r\n // Create a span to wrap the icon in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex filter-icon ms-2 rounded\";\r\n this._nav.el.firstElementChild.appendChild(span);\r\n // Render a tooltip\r\n var ttp = gd_sprest_bs_1.Components.Tooltip({\r\n el: span,\r\n content: \"Filters\",\r\n type: gd_sprest_bs_1.Components.TooltipTypes.Secondary,\r\n btnProps: {\r\n // Render the filter button\r\n iconType: filter_1.filter,\r\n iconSize: 28,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary\r\n },\r\n });\r\n // Call the event\r\n this._props.onShowFilter && ttp ? ttp.el.addEventListener(\"click\", this._props.onShowFilter) : null;\r\n this._props.onFilterRendered ? this._props.onFilterRendered(span) : null;\r\n }\r\n // Call the event\r\n this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector(\"input[type='search']\")) : null;\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Returns the current search value\r\n Navigation.prototype.getSearchValue = function () { return this._nav.getSearchValue(); };\r\n return Navigation;\r\n}());\r\nexports.Navigation = Navigation;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/navigation.js?");
|
|
240
240
|
|
|
241
241
|
/***/ }),
|
|
242
242
|
|