monobill-mintui 0.6.673 → 0.6.674

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/dist/index.js CHANGED
@@ -10397,7 +10397,7 @@ var Gn = class extends HTMLElement {
10397
10397
  if (!r) return;
10398
10398
  let i = this._getVirtualRowCount(), a = this._virtualRowHeightPxForSync(e), o = this._virtualColspan();
10399
10399
  if (i === 0) {
10400
- e ? this._fetchError ? r.innerHTML = `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>` : r.innerHTML = "<li class=\"list-none px-4 py-8 text-center text-sm\">No records found.</li>" : this._fetchError ? r.innerHTML = `<tr><td colspan="${o}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>` : r.innerHTML = `<tr><td colspan="${o}" class="text-center py-8">No records found.</td></tr>`, this._virtualLastRangeStart = -1, this._virtualLastRangeEnd = -1, this._virtualLastRangeCacheSig = "";
10400
+ e ? this._fetchError ? r.innerHTML = `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>` : r.innerHTML = "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>" : this._fetchError ? r.innerHTML = `<tr><td colspan="${o}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>` : r.innerHTML = `<tr><td colspan="${o}" class="text-center py-8">No data available.</td></tr>`, this._virtualLastRangeStart = -1, this._virtualLastRangeEnd = -1, this._virtualLastRangeCacheSig = "";
10401
10401
  return;
10402
10402
  }
10403
10403
  let s = 0, c = window.innerHeight;
@@ -10617,7 +10617,7 @@ var Gn = class extends HTMLElement {
10617
10617
  let r = !n.show || n.show(this, e);
10618
10618
  s += `<td style="${this._getStyle(n)}" class="${this._getClasses(n, !0)}">`, r && (s += this._buildTableCellInnerHtml(n, e, t, "table")), s += "</td>";
10619
10619
  }), s += "</tr>";
10620
- }), n.length === 0 && (this._fetchError ? (s += `<tr><td colspan="${this._configuration.columns.filter((e) => !e.hidden).length}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>`, c += `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>`) : (s += `<tr><td colspan="${this._configuration.columns.filter((e) => !e.hidden).length}" class="text-center py-8">No records found.</td></tr>`, c += "<li class=\"list-none px-4 py-8 text-center text-sm\">No records found.</li>")), r.innerHTML = s;
10620
+ }), n.length === 0 && (this._fetchError ? (s += `<tr><td colspan="${this._configuration.columns.filter((e) => !e.hidden).length}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>`, c += `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>`) : (s += `<tr><td colspan="${this._configuration.columns.filter((e) => !e.hidden).length}" class="text-center py-8">No data available.</td></tr>`, c += "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>")), r.innerHTML = s;
10621
10621
  let l = this.querySelector(`ul[data-mint-rt-mobile-list="${this._tableId}"]`);
10622
10622
  if (l && (l.innerHTML = c), this._attachTableEventListeners(), this._attachRowClickHandler(), a && i) {
10623
10623
  let e = i.querySelector("input") || i._element;
@@ -10773,7 +10773,7 @@ var Gn = class extends HTMLElement {
10773
10773
  this._ensureMobileListMql();
10774
10774
  let e = String(this._configuration.id || "").trim();
10775
10775
  e && (this.id = e), this._detachVirtualScroll(), this._detachFixedChromeResize(), this._virtualScrollActive() || this._virtualRowCache.clear();
10776
- let t = !this._loaded || this._rows.length > 0 || this._search.length > 0 || this._searching || !!this._configuration.buttons?.length, n = this._getRows();
10776
+ let t = !this._loaded || this._rows.length > 0 || this._search.length > 0 || this._searching || this._configuration.showSearch !== !1 || !!this._configuration.buttons?.length, n = this._getRows();
10777
10777
  this._lastPage || Math.ceil(this._rows.length / this._perPage);
10778
10778
  let r = this._isExternalLoading(), i = "";
10779
10779
  if (t) {
@@ -10814,7 +10814,7 @@ var Gn = class extends HTMLElement {
10814
10814
  }
10815
10815
  }), i += "</tr>";
10816
10816
  i += "</tbody>", i += "</table>", i += "</mint-table>", i += "</div>", i += this._paginationHostPlaceholderHtml();
10817
- } else if (n.length > 0 || this._search.length > 0 || this._searching || this._fetchError) {
10817
+ } else {
10818
10818
  let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", a = this._escapeHtml(this._virtualMaxHeightCss()), o = t || this._fixedHeader(), s = this._fixedHeader() && this._fixedControls(), c = o ? " data-mint-rt-scroll-inner=\"\"" : "", l = "table-section" + (this._inMintCard ? " rounded-t-none" : ""), u = `mint-resource-table-mobile-list m-0 min-h-0 w-full list-none border-collapse overflow-x-hidden ${this._inMintCard ? "px-3.5 py-3.5" : "py-3"} md:hidden`, d = "";
10819
10819
  if (t) {
10820
10820
  let e = this._renderColgroupHtml();
@@ -10828,15 +10828,15 @@ var Gn = class extends HTMLElement {
10828
10828
  let r = !n.show || n.show(this, e);
10829
10829
  i += `<td style="${this._getStyle(n)}" class="${this._getClasses(n, !0)}">`, r && (i += this._buildTableCellInnerHtml(n, e, t, "table")), i += "</td>";
10830
10830
  }), i += "</tr>";
10831
- }), !this._fetching && !this._loading && !r && n.length === 0 && !e) if (this._fetchError) {
10831
+ }), !this._fetching && !this._loading && !r && n.length === 0) if (this._fetchError) {
10832
10832
  let e = this._configuration.columns.filter((e) => !e.hidden).length;
10833
10833
  i += `<tr><td colspan="${e}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>`, d += `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>`;
10834
10834
  } else {
10835
10835
  let e = this._configuration.columns.filter((e) => !e.hidden).length;
10836
- i += `<tr><td colspan="${e}" class="text-center py-8">No records found.</td></tr>`, d += "<li class=\"list-none px-4 py-8 text-center text-sm\">No records found.</li>";
10836
+ i += `<tr><td colspan="${e}" class="text-center py-8">No data available.</td></tr>`, d += "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>";
10837
10837
  }
10838
- i += "</tbody>", i += "</table>", i += "</mint-table>", i += "</div>", i += `<ul class="${u}" data-mint-rt-mobile-list="${this._tableId}">${e ? "" : d}</ul>`, e || (i += this._paginationHostPlaceholderHtml()), t && (i += "</div>");
10839
- } else i += "<slot name=\"empty\"></slot>";
10838
+ i += "</tbody>", i += "</table>", i += "</mint-table>", i += "</div>", i += `<ul class="${u}" data-mint-rt-mobile-list="${this._tableId}">${e && n.length > 0 ? "" : d}</ul>`, e || (i += this._paginationHostPlaceholderHtml()), t && (i += "</div>");
10839
+ }
10840
10840
  this._fixedHeader() ? this.setAttribute("data-mint-rt-fixed-header", "") : this.removeAttribute("data-mint-rt-fixed-header"), this._fixedControls() ? this.setAttribute("data-mint-rt-fixed-controls", "") : this.removeAttribute("data-mint-rt-fixed-controls"), this.innerHTML = i, this._replaceUtilityClasses(), this._updatePagination(), this.querySelectorAll("mint-button[data-action]").forEach((e) => {
10841
10841
  e.render && e.render();
10842
10842
  }), this.querySelectorAll("mint-button[data-mint-rt-toolbar]").forEach((e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monobill-mintui",
3
- "version": "0.6.673",
3
+ "version": "0.6.674",
4
4
  "description": "Framework-independent HTML custom elements with component-scoped CSS.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",