gd-bs 6.6.40 → 6.6.42
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/form/control.js +18 -4
- package/build/components/navbar/index.js +26 -8
- package/build/components/navbar/templates.js +1 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/index.html +1 -0
- package/package.json +1 -1
- package/src/components/form/control.ts +16 -4
- package/src/components/navbar/index.ts +25 -8
- package/src/components/navbar/templates.ts +1 -0
|
@@ -625,8 +625,15 @@ var FormControl = /** @class */ (function () {
|
|
|
625
625
|
if (this._el) {
|
|
626
626
|
// See if this is a row
|
|
627
627
|
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
628
|
-
//
|
|
629
|
-
this._el.parentElement.parentElement.
|
|
628
|
+
// See if there are other controls in this row
|
|
629
|
+
if (this._el.parentElement.parentElement.querySelectorAll(".col").length > 1) {
|
|
630
|
+
// Hide the column element
|
|
631
|
+
this._el.parentElement.classList.add("d-none");
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
// Hide the row element
|
|
635
|
+
this._el.parentElement.parentElement.classList.add("d-none");
|
|
636
|
+
}
|
|
630
637
|
}
|
|
631
638
|
// Else, ensure the parent element exists
|
|
632
639
|
else if (this._el.parentElement) {
|
|
@@ -727,8 +734,15 @@ var FormControl = /** @class */ (function () {
|
|
|
727
734
|
if (this._el) {
|
|
728
735
|
// See if this is a row
|
|
729
736
|
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
730
|
-
//
|
|
731
|
-
this._el.parentElement.parentElement.
|
|
737
|
+
// See if there are other controls in this row
|
|
738
|
+
if (this._el.parentElement.parentElement.querySelectorAll(".col").length > 1) {
|
|
739
|
+
// Show the column element
|
|
740
|
+
this._el.parentElement.classList.remove("d-none");
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
// Show the row element
|
|
744
|
+
this._el.parentElement.parentElement.classList.remove("d-none");
|
|
745
|
+
}
|
|
732
746
|
}
|
|
733
747
|
// Else, ensure the parent element exists
|
|
734
748
|
else if (this._el.parentElement) {
|
|
@@ -52,18 +52,36 @@ var _Navbar = /** @class */ (function (_super) {
|
|
|
52
52
|
}
|
|
53
53
|
// Configure the card group
|
|
54
54
|
_Navbar.prototype.configure = function (itemTemplate) {
|
|
55
|
-
// See if
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
// See if we are applying a brand
|
|
56
|
+
if (this.props.brand) {
|
|
57
|
+
var elBrand = this.el.querySelector("span.navbar-brand");
|
|
58
|
+
var elBrandLink = this.el.querySelector("a.navbar-brand");
|
|
59
|
+
// See if we are using a link
|
|
60
|
+
if (this.props.brandUrl || this.props.onClickBrand) {
|
|
61
|
+
// Remove the element
|
|
62
|
+
elBrand ? elBrand.parentElement.removeChild(elBrand) : null;
|
|
59
63
|
// Update the brand
|
|
60
|
-
|
|
64
|
+
elBrandLink ? elBrandLink.href = this.props.brandUrl : null;
|
|
61
65
|
// Append the content
|
|
62
|
-
(0, common_1.appendContent)(
|
|
66
|
+
(0, common_1.appendContent)(elBrandLink, this.props.brand);
|
|
63
67
|
}
|
|
64
68
|
else {
|
|
65
|
-
// Remove the
|
|
66
|
-
|
|
69
|
+
// Remove the link element
|
|
70
|
+
elBrandLink ? elBrandLink.parentElement.removeChild(elBrandLink) : null;
|
|
71
|
+
// Append the content
|
|
72
|
+
(0, common_1.appendContent)(elBrand, this.props.brand);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// Remove the brand link
|
|
77
|
+
var elBrandLink = this.el.querySelector("a.navbar-brand");
|
|
78
|
+
if (elBrandLink) {
|
|
79
|
+
elBrandLink.parentNode.removeChild(elBrandLink);
|
|
80
|
+
}
|
|
81
|
+
// Remove the brand element
|
|
82
|
+
var elBrand = this.el.querySelector("span.navbar-brand");
|
|
83
|
+
if (elBrand) {
|
|
84
|
+
elBrand.parentNode.removeChild(elBrand);
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
// Update the nav bar
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HTMLItemButton = exports.HTMLItem = exports.HTML = void 0;
|
|
4
4
|
// Navbar
|
|
5
|
-
exports.HTML = "\n<nav class=\"navbar navbar-expand-lg\">\n <div class=\"container-fluid\">\n <a class=\"navbar-brand\" href=\"#\"></a>\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" aria-expanded=\"false\"\n aria-label=\"Toggle Navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\">\n <ul class=\"navbar-nav me-auto mb-2 mb-lg-0\"></ul>\n <ul class=\"navbar-nav ms-auto mb-2 mb-lg-0\"></ul>\n </div>\n <form class=\"d-flex mb-2 mb-lg-0\">\n <input class=\"form-control lh-1 me-1\" type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n <button class=\"btn\" type=\"submit\">Search</button>\n </form>\n </div>\n</nav>".trim();
|
|
5
|
+
exports.HTML = "\n<nav class=\"navbar navbar-expand-lg\">\n <div class=\"container-fluid\">\n <a class=\"navbar-brand\" href=\"#\"></a>\n <span class=\"navbar-brand mb-0 h1\"></span>\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" aria-expanded=\"false\"\n aria-label=\"Toggle Navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\">\n <ul class=\"navbar-nav me-auto mb-2 mb-lg-0\"></ul>\n <ul class=\"navbar-nav ms-auto mb-2 mb-lg-0\"></ul>\n </div>\n <form class=\"d-flex mb-2 mb-lg-0\">\n <input class=\"form-control lh-1 me-1\" type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n <button class=\"btn\" type=\"submit\">Search</button>\n </form>\n </div>\n</nav>".trim();
|
|
6
6
|
// Item
|
|
7
7
|
exports.HTMLItem = "\n<li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\" role=\"link\">\n <span class=\"visually-hidden\">(current)</span>\n </a>\n</li>".trim();
|
|
8
8
|
// Item
|