monobill-mintui 0.6.715 → 0.6.716

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.
@@ -143,6 +143,7 @@ var n = {
143
143
  "pl-0": "rtu-d569803f7",
144
144
  "pointer-events-none": "rtu-a4326536b",
145
145
  "pr-4": "rtu-ba64a7c03",
146
+ "pt-1.5": "rtu-6874bf95d",
146
147
  "pt-3": "rtu-ce335a8e4",
147
148
  "px-1": "rtu-d8e0e382c",
148
149
  "px-2": "rtu-d5eab218a",
@@ -158,6 +159,7 @@ var n = {
158
159
  "rounded-md": "rtu-421ac2be5",
159
160
  "rounded-t-none": "rtu-79ee0e356",
160
161
  "shrink-0": "rtu-012fbd121",
162
+ "space-y-2": "rtu-6f7e013d6",
161
163
  sticky: "rtu-3e0fd166d",
162
164
  table: "rtu-c3ee137d4",
163
165
  "table-fixed": "rtu-604d60250",
@@ -688,7 +690,16 @@ var n = {
688
690
  }
689
691
  _buildMobileListItemHtml(e, t, n = !1) {
690
692
  if (!this._configuration) return "";
691
- let r = t, i = typeof this._configuration.onRowClick == "function", a = this._mobileThumbnailColumn(), o = this._mobilePrimaryColumn(), s = this._mobileActionsDropdownColumn(), c = a ? this._buildTableCellInnerHtml(a, e, r, "mobile") : "", l = o ? this._buildTableCellInnerHtml(o, e, r, "mobile") : "", u = s ? this._buildTableCellInnerHtml(s, e, r, "mobile") : "", d = [], f = this._configuration.mobileShowLabels === !0;
693
+ let r = t, i = typeof this._configuration.onRowClick == "function", a = this._mobileThumbnailColumn(), o = this._mobilePrimaryColumn(), s = this._mobileActionsDropdownColumn(), c = a ? this._buildTableCellInnerHtml(a, e, r, "mobile") : "", l = o ? this._buildTableCellInnerHtml(o, e, r, "mobile") : "", u = s ? this._buildTableCellInnerHtml(s, e, r, "mobile") : "";
694
+ if (typeof this._configuration.mobileRowFormat == "function") {
695
+ let t = this._configuration.mobileRowFormat(this, e, r, u), n = [
696
+ "list-none",
697
+ "mint-resource-table-mobile-row",
698
+ i ? "cursor-pointer" : ""
699
+ ].filter(Boolean).join(" ");
700
+ return `<li data-row-index="${r}" ${i ? "data-row-clickable=\"true\" " : ""}class="${n}">${t}</li>`;
701
+ }
702
+ let d = [], f = this._configuration.mobileShowLabels === !0;
692
703
  for (let t of this._configuration.columns) {
693
704
  if (t.hidden || a && t === a || o && t === o || s && t === s) continue;
694
705
  let n = this._columnPlainSummaryText(t, e);
@@ -1174,7 +1185,7 @@ var n = {
1174
1185
  }
1175
1186
  this._ensureMobileListMql();
1176
1187
  let e = this._useMobileListLayout();
1177
- this._lastRenderedMobileLayout = e, this.toggleAttribute("data-mint-rt-mobile-layout", e), this._scheduleInitialMobileLayoutSync(e);
1188
+ this._lastRenderedMobileLayout = e, this.toggleAttribute("data-mint-rt-mobile-layout", e), this.toggleAttribute("data-mint-rt-mobile-cards", typeof this._configuration.mobileRowFormat == "function"), this._scheduleInitialMobileLayoutSync(e);
1178
1189
  let t = String(this._configuration.id || "").trim();
1179
1190
  t && (this.id = t), this._detachVirtualScroll(), this._detachFixedChromeResize(), this._virtualScrollActive() || this._virtualRowCache.clear();
1180
1191
  let n = !this._loaded || this._rows.length > 0 || this._search.length > 0 || this._searching || this._configuration.showSearch !== !1 || !!this._configuration.buttons?.length, r = this._getRows();
@@ -1188,11 +1199,9 @@ var n = {
1188
1199
  this._inMintCard ? "p-3.5" : "mb-3",
1189
1200
  e ? "sticky top-0 z-20 bg-white dark:bg-mint-nav border-b border-gray-200 dark:border-mint-divider" : ""
1190
1201
  ].filter(Boolean).join(" ");
1191
- if (a += `<div id="mint-rt-fixed-controls-${this._tableId}" class="${t}">`, a += "<div class=\"flex min-w-0 flex-1 items-center gap-2\">", a += this._buildMobileSortToolbarHtml(), a += this._toolbarButtonsHtml("left"), this._configuration.showSearch !== !1) {
1192
- let e = `search-${this._tableId}`, t = this._escapeHtml(this._configuration.searchPlaceholder || "Search...");
1193
- a += `<mint-input id="${e}" type="search" label="" placeholder="${t}" class="min-w-0 flex-1" icon="search" value="${this._escapeHtml(this._search)}"></mint-input>`;
1194
- }
1195
- a += this._toolbarButtonsHtml("right"), a += "</div>", a += "</div>";
1202
+ a += `<div id="mint-rt-fixed-controls-${this._tableId}" class="${t}">`, a += "<div class=\"flex min-w-0 flex-1 items-center gap-2\">";
1203
+ let n = this._configuration.mobileSearchFirst === !0, r = this._configuration.showSearch === !1 ? "" : `<mint-input id="search-${this._tableId}" type="search" label="" placeholder="${this._escapeHtml(this._configuration.searchPlaceholder || "Search...")}" class="min-w-0 flex-1" icon="search" value="${this._escapeHtml(this._search)}"></mint-input>`;
1204
+ n && (a += r), a += this._buildMobileSortToolbarHtml(), a += this._toolbarButtonsHtml("left"), n || (a += r), a += this._toolbarButtonsHtml("right"), a += "</div>", a += "</div>";
1196
1205
  }
1197
1206
  if ((this._type === "ajax" && !this._loaded || this._type === "provided" && i) && !this._fetchError && !this._sorting) {
1198
1207
  let e = this._fixedHeader() ? " data-mint-rt-scroll-inner=\"\"" : "", t = this._fixedHeader() && this._fixedControls(), n = this._fixedHeader() ? t ? "sticky top-[var(--mint-rt-fixed-controls-h,0px)] z-30 " : "sticky top-0 z-30 " : "sticky top-0 z-10 ";
@@ -1219,13 +1228,13 @@ var n = {
1219
1228
  }), a += "</tr>";
1220
1229
  a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += this._paginationHostPlaceholderHtml();
1221
1230
  } else {
1222
- let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = 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"}`, d = "";
1231
+ let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = 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 = this._inMintCard ? "px-3.5 py-3.5" : "py-3", d = typeof this._configuration.mobileRowFormat == "function", f = d ? "space-y-2" : "", p = `mint-resource-table-mobile-list m-0 min-h-0 w-full list-none border-collapse overflow-x-hidden ${d && this._inMintCard ? "px-3.5 pt-1.5 pb-3.5" : u} ${f}`, m = "";
1223
1232
  if (t) {
1224
1233
  let e = this._renderColgroupHtml();
1225
1234
  a += `<div id="mint-rt-vscroll-${this._tableId}" class="overflow-y-auto overflow-x-auto min-h-0 w-full" style="max-height: ${n}; scrollbar-gutter: stable; overscroll-behavior-x: contain; overscroll-behavior-y: none; overflow-anchor: none;">`, a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}" class="w-full min-w-0 table-fixed">`, a += e, a += this._renderTheadHtml(!0, !0, !0, s);
1226
1235
  } else a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}">`, e && (a += this._renderColgroupHtml()), a += this._renderTheadHtml(!0, !0, !!e, s);
1227
1236
  if (a += "<tbody" + (e ? ` data-mint-rt-tbody="${this._tableId}"` : "") + ">", !this._fetching && !this._loading && !i && !e && r.forEach((e, t) => {
1228
- d += this._buildMobileListItemHtml(e, t, t === r.length - 1);
1237
+ m += this._buildMobileListItemHtml(e, t, t === r.length - 1);
1229
1238
  let n = typeof this._configuration.onRowClick == "function", i = n ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-mint-elevated" : "";
1230
1239
  a += `<tr data-row-index="${t}" ${n ? "data-row-clickable=\"true\"" : ""}${i ? ` class="${i}"` : ""}>`, this._configuration.columns.forEach((n) => {
1231
1240
  if (n.hidden) return;
@@ -1234,12 +1243,12 @@ var n = {
1234
1243
  }), a += "</tr>";
1235
1244
  }), !this._fetching && !this._loading && !i && r.length === 0) if (this._fetchError) {
1236
1245
  let e = this._configuration.columns.filter((e) => !e.hidden).length;
1237
- a += `<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>`;
1246
+ a += `<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>`, m += `<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>`;
1238
1247
  } else {
1239
1248
  let e = this._configuration.columns.filter((e) => !e.hidden).length;
1240
- a += `<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>";
1249
+ a += `<tr><td colspan="${e}" class="text-center py-8">No data available.</td></tr>`, m += "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>";
1241
1250
  }
1242
- a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += `<ul class="${u}" data-mint-rt-mobile-list="${this._tableId}">${e && r.length > 0 ? "" : d}</ul>`, e || (a += this._paginationHostPlaceholderHtml()), t && (a += "</div>");
1251
+ a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += `<ul class="${p}" data-mint-rt-mobile-list="${this._tableId}">${e && r.length > 0 ? "" : m}</ul>`, e || (a += this._paginationHostPlaceholderHtml()), t && (a += "</div>");
1243
1252
  }
1244
1253
  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 = a, this._replaceUtilityClasses(), this._updatePagination(), this.querySelectorAll("mint-button[data-action]").forEach((e) => {
1245
1254
  e.render && e.render();
@@ -120,6 +120,7 @@ export const resourceTableUtilityAliases: {
120
120
  "pl-0": string;
121
121
  "pointer-events-none": string;
122
122
  "pr-4": string;
123
+ "pt-1.5": string;
123
124
  "pt-3": string;
124
125
  "px-1": string;
125
126
  "px-2": string;
@@ -135,6 +136,7 @@ export const resourceTableUtilityAliases: {
135
136
  "rounded-md": string;
136
137
  "rounded-t-none": string;
137
138
  "shrink-0": string;
139
+ "space-y-2": string;
138
140
  sticky: string;
139
141
  table: string;
140
142
  "table-fixed": string;
@@ -1 +1 @@
1
- {"version":3,"file":"utility-aliases.d.ts","sourceRoot":"","sources":["../../../src/components/resource-table/utility-aliases.js"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiKC"}
1
+ {"version":3,"file":"utility-aliases.d.ts","sourceRoot":"","sources":["../../../src/components/resource-table/utility-aliases.js"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmKC"}