gd-bs 6.5.2 → 6.5.4

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.
@@ -32,7 +32,7 @@ var CardBody = /** @class */ (function () {
32
32
  // Update the title
33
33
  var elTitle = this._el.querySelector(".card-title");
34
34
  if (this._props.title || this._props.onRenderTitle) {
35
- // Append the content
35
+ // Append the title
36
36
  (0, common_1.appendContent)(elTitle, this._props.title);
37
37
  // Call the render event
38
38
  this._props.onRenderTitle ? this._props.onRenderTitle(elTitle, this._props) : null;
@@ -44,25 +44,33 @@ var CardBody = /** @class */ (function () {
44
44
  // Update the sub-title
45
45
  var subTitle = this._el.querySelector(".card-subtitle");
46
46
  if (this._props.subTitle) {
47
- // Set the title
47
+ // Set the sub-title
48
48
  subTitle.innerHTML = this._props.subTitle;
49
49
  }
50
50
  else {
51
- // Remove the title
51
+ // Remove the sub-title
52
52
  this._el.removeChild(subTitle);
53
53
  }
54
54
  // Update the text
55
55
  var text = this._el.querySelector(".card-text");
56
56
  if (this._props.text) {
57
- // Set the title
57
+ // Set the text
58
58
  text.innerHTML = this._props.text;
59
59
  }
60
+ // Else, see if there is content
61
+ else if (this._props.content && typeof (this._props.content) === "string") {
62
+ // Set the text
63
+ text.innerHTML = this._props.content;
64
+ }
60
65
  else {
61
- // Remove the title
66
+ // Remove the text
62
67
  this._el.removeChild(text);
63
68
  }
64
- // Append the content
65
- (0, common_1.appendContent)(this._el, this._props.content);
69
+ // See if the content is an element
70
+ if (this._props.content && typeof (this._props.content) !== "string") {
71
+ // Append the content
72
+ (0, common_1.appendContent)(this._el, this._props.content);
73
+ }
66
74
  // Render the actions
67
75
  this.renderActions();
68
76
  };
@@ -180,6 +180,8 @@ var _Pagination = /** @class */ (function (_super) {
180
180
  this._items = [];
181
181
  // Create the previous link
182
182
  var item = this.createItem("Previous", itemTemplate);
183
+ item.classList.add("disabled");
184
+ item.classList.add("previous");
183
185
  list.appendChild(item);
184
186
  // Loop for the number of pages to create
185
187
  // Parse the number of pages
@@ -192,6 +194,8 @@ var _Pagination = /** @class */ (function (_super) {
192
194
  }
193
195
  // Create the next link
194
196
  item = this.createItem("Next", itemTemplate);
197
+ pages > 1 ? null : item.classList.add("disabled");
198
+ item.classList.add("next");
195
199
  list.appendChild(item);
196
200
  };
197
201
  return _Pagination;