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
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -631,8 +631,14 @@ export class FormControl implements IFormControl {
|
|
|
631
631
|
if (this._el) {
|
|
632
632
|
// See if this is a row
|
|
633
633
|
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
634
|
-
//
|
|
635
|
-
this._el.parentElement.parentElement.
|
|
634
|
+
// See if there are other controls in this row
|
|
635
|
+
if (this._el.parentElement.parentElement.querySelectorAll(".col").length > 1) {
|
|
636
|
+
// Hide the column element
|
|
637
|
+
this._el.parentElement.classList.add("d-none");
|
|
638
|
+
} else {
|
|
639
|
+
// Hide the row element
|
|
640
|
+
this._el.parentElement.parentElement.classList.add("d-none");
|
|
641
|
+
}
|
|
636
642
|
}
|
|
637
643
|
// Else, ensure the parent element exists
|
|
638
644
|
else if (this._el.parentElement) {
|
|
@@ -734,8 +740,14 @@ export class FormControl implements IFormControl {
|
|
|
734
740
|
if (this._el) {
|
|
735
741
|
// See if this is a row
|
|
736
742
|
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
737
|
-
//
|
|
738
|
-
this._el.parentElement.parentElement.
|
|
743
|
+
// See if there are other controls in this row
|
|
744
|
+
if (this._el.parentElement.parentElement.querySelectorAll(".col").length > 1) {
|
|
745
|
+
// Show the column element
|
|
746
|
+
this._el.parentElement.classList.remove("d-none");
|
|
747
|
+
} else {
|
|
748
|
+
// Show the row element
|
|
749
|
+
this._el.parentElement.parentElement.classList.remove("d-none");
|
|
750
|
+
}
|
|
739
751
|
}
|
|
740
752
|
// Else, ensure the parent element exists
|
|
741
753
|
else if (this._el.parentElement) {
|
|
@@ -40,19 +40,36 @@ class _Navbar extends Base<INavbarProps> implements INavbar {
|
|
|
40
40
|
|
|
41
41
|
// Configure the card group
|
|
42
42
|
private configure(itemTemplate: string) {
|
|
43
|
-
// See if
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
// See if we are applying a brand
|
|
44
|
+
if (this.props.brand) {
|
|
45
|
+
let elBrand = this.el.querySelector("span.navbar-brand") as HTMLSpanElement;
|
|
46
|
+
let elBrandLink = this.el.querySelector("a.navbar-brand") as HTMLAnchorElement;
|
|
47
|
+
|
|
48
|
+
// See if we are using a link
|
|
49
|
+
if (this.props.brandUrl || this.props.onClickBrand) {
|
|
50
|
+
// Remove the element
|
|
51
|
+
elBrand ? elBrand.parentElement.removeChild(elBrand) : null;
|
|
52
|
+
|
|
47
53
|
// Update the brand
|
|
48
|
-
|
|
54
|
+
elBrandLink ? elBrandLink.href = this.props.brandUrl : null;
|
|
49
55
|
|
|
50
56
|
// Append the content
|
|
51
|
-
appendContent(
|
|
57
|
+
appendContent(elBrandLink, this.props.brand);
|
|
52
58
|
} else {
|
|
53
|
-
// Remove the
|
|
54
|
-
|
|
59
|
+
// Remove the link element
|
|
60
|
+
elBrandLink ? elBrandLink.parentElement.removeChild(elBrandLink) : null;
|
|
61
|
+
|
|
62
|
+
// Append the content
|
|
63
|
+
appendContent(elBrand, this.props.brand);
|
|
55
64
|
}
|
|
65
|
+
} else {
|
|
66
|
+
// Remove the brand link
|
|
67
|
+
let elBrandLink = this.el.querySelector("a.navbar-brand");
|
|
68
|
+
if (elBrandLink) { elBrandLink.parentNode.removeChild(elBrandLink); }
|
|
69
|
+
|
|
70
|
+
// Remove the brand element
|
|
71
|
+
let elBrand = this.el.querySelector("span.navbar-brand");
|
|
72
|
+
if (elBrand) { elBrand.parentNode.removeChild(elBrand); }
|
|
56
73
|
}
|
|
57
74
|
|
|
58
75
|
// Update the nav bar
|
|
@@ -3,6 +3,7 @@ export const HTML = `
|
|
|
3
3
|
<nav class="navbar navbar-expand-lg">
|
|
4
4
|
<div class="container-fluid">
|
|
5
5
|
<a class="navbar-brand" href="#"></a>
|
|
6
|
+
<span class="navbar-brand mb-0 h1"></span>
|
|
6
7
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" aria-expanded="false"
|
|
7
8
|
aria-label="Toggle Navigation">
|
|
8
9
|
<span class="navbar-toggler-icon"></span>
|