gd-bs 6.0.0 → 6.0.2
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 +32 -0
- package/build/components/popover/index.js +3 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +2 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/control.ts +34 -0
- package/src/components/popover/index.ts +4 -2
- package/src/components/popover/types.d.ts +2 -0
|
@@ -511,6 +511,22 @@ var FormControl = /** @class */ (function () {
|
|
|
511
511
|
return this._tb.getValue();
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
|
+
// Hides the control
|
|
515
|
+
FormControl.prototype.hide = function () {
|
|
516
|
+
// Ensure an element exists
|
|
517
|
+
if (this._el) {
|
|
518
|
+
// See if this is a row
|
|
519
|
+
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
520
|
+
// Hide the row element
|
|
521
|
+
this._el.parentElement.parentElement.classList.add("d-none");
|
|
522
|
+
}
|
|
523
|
+
// Else, ensure the parent element exists
|
|
524
|
+
else if (this._el.parentElement) {
|
|
525
|
+
// Hide the group element
|
|
526
|
+
this._el.parentElement.classList.add("d-none");
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
};
|
|
514
530
|
// Is loaded
|
|
515
531
|
FormControl.prototype.isLoaded = function () {
|
|
516
532
|
var _this = this;
|
|
@@ -597,6 +613,22 @@ var FormControl = /** @class */ (function () {
|
|
|
597
613
|
// Set the value
|
|
598
614
|
this.control ? this.control.setValue(value) : null;
|
|
599
615
|
};
|
|
616
|
+
// Shows the control
|
|
617
|
+
FormControl.prototype.show = function () {
|
|
618
|
+
// Ensure an element exists
|
|
619
|
+
if (this._el) {
|
|
620
|
+
// See if this is a row
|
|
621
|
+
if (this._el.parentElement && this._el.parentElement.parentElement && this._el.parentElement.parentElement.classList.contains("row")) {
|
|
622
|
+
// Show the row element
|
|
623
|
+
this._el.parentElement.parentElement.classList.remove("d-none");
|
|
624
|
+
}
|
|
625
|
+
// Else, ensure the parent element exists
|
|
626
|
+
else if (this._el.parentElement) {
|
|
627
|
+
// Show the group element
|
|
628
|
+
this._el.parentElement.classList.remove("d-none");
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
};
|
|
600
632
|
// Updates the control validation
|
|
601
633
|
FormControl.prototype.updateValidation = function (elControl, validation) {
|
|
602
634
|
// Get the form control
|
|
@@ -231,9 +231,11 @@ var _Popover = /** @class */ (function (_super) {
|
|
|
231
231
|
// Create the popover content element
|
|
232
232
|
this._elContent = document.createElement("div");
|
|
233
233
|
this._elContent.classList.add("popover-content");
|
|
234
|
-
this._elContent.innerHTML = '<
|
|
234
|
+
this._elContent.innerHTML = '<div class="popover-header"></div><div class="popover-body"></div>';
|
|
235
235
|
(0, common_1.appendContent)(this._elContent.querySelector(".popover-header"), this.props.title);
|
|
236
|
+
(0, common_1.setClassNames)(this._elContent.querySelector(".popover-header"), this.props.classNameHeader);
|
|
236
237
|
(0, common_1.appendContent)(this._elContent.querySelector(".popover-body"), options.content);
|
|
238
|
+
(0, common_1.setClassNames)(this._elContent.querySelector(".popover-body"), this.props.classNameBody);
|
|
237
239
|
options.content = this._elContent;
|
|
238
240
|
// Set the on create event
|
|
239
241
|
options["onCreate"] = function (tippyObj) {
|