gd-bs 6.6.62 → 6.6.64

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.
@@ -51,7 +51,7 @@ var DropdownFormItem = /** @class */ (function () {
51
51
  // Else, see if a value exists
52
52
  else if (this._parent.value != undefined) {
53
53
  // Ensure it's an array
54
- var values = this._parent.value && typeof (this._parent.value) === "object" ? this._parent.value : [this._parent.value];
54
+ var values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== "string" ? this._parent.value : [this._parent.value];
55
55
  // Parse the values
56
56
  for (var i = 0; i < values.length; i++) {
57
57
  var value = this._props.value == undefined ? this._props.text : this._props.value;
@@ -434,7 +434,7 @@ var _Dropdown = /** @class */ (function (_super) {
434
434
  return values;
435
435
  }
436
436
  // Ensure it's an array
437
- if (typeof (currentValues) !== "object") {
437
+ if (typeof (currentValues) === "string") {
438
438
  // Make it an array
439
439
  currentValues = [currentValues];
440
440
  }
@@ -442,7 +442,7 @@ var _Dropdown = /** @class */ (function (_super) {
442
442
  var currentValue = currentValues[i];
443
443
  var currentItem = {};
444
444
  // See if this is a string
445
- if (typeof (currentValue) !== "object") {
445
+ if (typeof (currentValue) == "string") {
446
446
  // Set the text and value properties
447
447
  currentItem.text = currentValue;
448
448
  currentItem.value = currentValue;
@@ -553,7 +553,7 @@ var _Dropdown = /** @class */ (function (_super) {
553
553
  if (this._cb) {
554
554
  // Get the values
555
555
  var items = this._cb.getValue();
556
- items = typeof (items) === "object" ? items : [items];
556
+ items = typeof (items["length"]) === "number" ? items : [items];
557
557
  // Parse the items
558
558
  for (var i = 0; i < items.length; i++) {
559
559
  // Add the value
@@ -677,7 +677,7 @@ var _Dropdown = /** @class */ (function (_super) {
677
677
  // Sets the dropdown value
678
678
  _Dropdown.prototype.setValue = function (value) {
679
679
  // Ensure it's an array
680
- var values = value == null ? [] : (typeof (value) === "object" ? value : [value]);
680
+ var values = value == null ? [] : (typeof (value.length) === "number" && typeof (value) !== "string" ? value : [value]);
681
681
  // See if this is a checkbox
682
682
  if (this._cb) {
683
683
  // Set the value
@@ -76,7 +76,7 @@ var DropdownItem = /** @class */ (function () {
76
76
  // Else, see if a value exists
77
77
  else if (this._parent.value != undefined) {
78
78
  // Ensure it's an array
79
- var values = this._parent.value && typeof (this._parent.value) === "object" ? this._parent.value : [this._parent.value];
79
+ var values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== "string" ? this._parent.value : [this._parent.value];
80
80
  // Parse the values
81
81
  for (var j = 0; j < values.length; j++) {
82
82
  var value = this._props.value == undefined ? this._props.text : this._props.value;
@@ -66,6 +66,11 @@ var _Nav = /** @class */ (function (_super) {
66
66
  link.el.addEventListener("click", function () {
67
67
  var prevTab = null;
68
68
  var newTab = link;
69
+ // See if this link is disabled
70
+ if (link.isDisabled) {
71
+ // Do nothing
72
+ return;
73
+ }
69
74
  // Parse the links
70
75
  for (var i = 0; i < _this._links.length; i++) {
71
76
  var link_2 = _this._links[i];
@@ -116,6 +116,12 @@ var NavLink = /** @class */ (function (_super) {
116
116
  enumerable: false,
117
117
  configurable: true
118
118
  });
119
+ Object.defineProperty(NavLink.prototype, "isDisabled", {
120
+ // Returns true if the link is disabled
121
+ get: function () { return this._elLink.classList.contains("disabled"); },
122
+ enumerable: false,
123
+ configurable: true
124
+ });
119
125
  Object.defineProperty(NavLink.prototype, "tabName", {
120
126
  // Gets the tab name
121
127
  get: function () { return this._elLink.innerHTML.trim(); },