monobill-mintui 0.6.657 → 0.6.658
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/components/resource-table/ResourceTable.d.ts +2 -3
- package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
- package/dist/components/resource-table/browser.js +25 -27
- package/dist/components/resource-table/index.cjs +2 -2
- package/dist/components/resource-table/index.js +25 -27
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +25 -27
- package/dist/page.css +1 -1
- package/package.json +1 -1
|
@@ -425,7 +425,7 @@ var n = {
|
|
|
425
425
|
let n = this._thumbnailMobilePx(e);
|
|
426
426
|
return Math.max(t, n + 36);
|
|
427
427
|
}
|
|
428
|
-
return Math.max(t,
|
|
428
|
+
return Math.max(t, 64);
|
|
429
429
|
}
|
|
430
430
|
let n = this._mobileThumbnailColumn();
|
|
431
431
|
if (n) {
|
|
@@ -645,34 +645,32 @@ var n = {
|
|
|
645
645
|
else typeof e.format == "function" ? a += this._escapeHtml(e.format(this, t)) : e.data && (a += this._escapeHtml(String(t[e.data] || "")));
|
|
646
646
|
return r === "table" && e.thumbnail && a && !e.actions && !e.action ? this._wrapThumbnailDesktopBox(a, e) : a;
|
|
647
647
|
}
|
|
648
|
-
_buildMobileListItemHtml(e, t, n
|
|
648
|
+
_buildMobileListItemHtml(e, t, n = !1) {
|
|
649
649
|
if (!this._configuration) return "";
|
|
650
|
-
let
|
|
650
|
+
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;
|
|
651
651
|
for (let t of this._configuration.columns) {
|
|
652
|
-
if (t.hidden ||
|
|
652
|
+
if (t.hidden || a && t === a || o && t === o || s && t === s) continue;
|
|
653
653
|
let n = this._columnPlainSummaryText(t, e);
|
|
654
|
-
if (n) if (
|
|
654
|
+
if (n) if (f) {
|
|
655
655
|
let e = this._stripHtml(String(t.label || "")).trim();
|
|
656
|
-
e ?
|
|
657
|
-
} else
|
|
656
|
+
e ? d.push(`${this._escapeHtml(e)}: ${this._escapeHtml(n)}`) : d.push(this._escapeHtml(n));
|
|
657
|
+
} else d.push(this._escapeHtml(n));
|
|
658
658
|
}
|
|
659
|
-
let
|
|
659
|
+
let p = d.join("<span class=\"text-gray-300 dark:text-gray-600\" aria-hidden=\"true\"> · </span>"), m = [
|
|
660
660
|
"list-none",
|
|
661
661
|
"mint-resource-table-mobile-row",
|
|
662
|
-
...
|
|
662
|
+
...n ? [] : [
|
|
663
663
|
"border-b",
|
|
664
664
|
"border-gray-200",
|
|
665
665
|
"dark:border-mint-divider"
|
|
666
666
|
],
|
|
667
|
-
|
|
668
|
-
].filter(Boolean).join(" "),
|
|
669
|
-
if (
|
|
670
|
-
let e = this._thumbnailMobilePx(
|
|
671
|
-
|
|
667
|
+
i ? "cursor-pointer" : ""
|
|
668
|
+
].filter(Boolean).join(" "), h = `<div class="flex items-center gap-3 py-3 pr-4${a ? " pl-0" : " pl-4"}">`;
|
|
669
|
+
if (a) {
|
|
670
|
+
let e = this._thumbnailMobilePx(a), t = `width:${e}px;height:${e}px;min-width:${e}px;min-height:${e}px`;
|
|
671
|
+
h += `<div class="flex shrink-0 items-stretch overflow-hidden rounded-md border border-gray-200 bg-gray-100 p-0 dark:border-mint-divider dark:bg-mint-hover [&>*]:m-0 [&>*]:min-h-0 [&>*]:min-w-0 [&>*]:w-full [&>*]:max-w-full [&>*]:p-0 [&>span]:flex [&>span]:h-full [&>span]:w-full [&>span]:min-h-0 [&>span]:min-w-0 [&>span]:items-stretch [&>span]:justify-stretch [&_img]:!m-0 [&_img]:!box-border [&_img]:!block [&_img]:!h-full [&_img]:!w-full [&_img]:!min-h-0 [&_img]:!min-w-0 [&_img]:!max-h-full [&_img]:!max-w-full [&_img]:!border-0 [&_img]:!p-0 [&_img]:!rounded-none [&_img]:!object-cover [&_img]:!object-center" style="${t}">${c}</div>`;
|
|
672
672
|
}
|
|
673
|
-
|
|
674
|
-
let _ = typeof n == "number" && n > 0 ? ` style="box-sizing:border-box;min-height:${n}px;max-height:${n}px;height:${n}px;overflow:hidden"` : "";
|
|
675
|
-
return `<li data-row-index="${i}" ${a ? "data-row-clickable=\"true\" " : ""}class="${h}"${_}>${g}</li>`;
|
|
673
|
+
return h += "<div class=\"flex min-w-0 flex-1 flex-col justify-center gap-1 mint-resource-table-mobile-content\">", h += "<div class=\"flex items-start justify-between gap-2 mint-resource-table-mobile-primary-row\">", h += `<div class="min-w-0 text-sm font-semibold leading-snug text-gray-900 dark:text-white mint-resource-table-mobile-primary">${l}</div>`, u && (h += `<div class="shrink-0 -mr-1 mint-resource-table-mobile-actions">${u}</div>`), h += "</div>", p && (h += `<div class="text-xs font-normal leading-snug text-gray-500 dark:text-gray-400 mint-resource-table-mobile-meta">${p}</div>`), h += "</div></div>", `<li data-row-index="${r}" ${i ? "data-row-clickable=\"true\" " : ""}class="${m}">${h}</li>`;
|
|
676
674
|
}
|
|
677
675
|
_buildMobileListPlaceholderLi(e, t, n = !1) {
|
|
678
676
|
let r = this._mobileThumbnailColumn(), i = r ? this._thumbnailMobilePx(r) : 56, a = `width:${i}px;height:${i}px;min-width:${i}px;min-height:${i}px`;
|
|
@@ -693,14 +691,14 @@ var n = {
|
|
|
693
691
|
i === "px" ? s = ` style="width:${r}px;min-width:0"` : i === "lit" ? s = ` style="width:${this._escapeHtml(r)};min-width:0"` : a && (s = ` style="${a}"`), o += `<col${s} />`;
|
|
694
692
|
}), o += "</colgroup>", o;
|
|
695
693
|
}
|
|
696
|
-
_buildDataRowHtml(e, t, n
|
|
694
|
+
_buildDataRowHtml(e, t, n = !1) {
|
|
697
695
|
if (!this._configuration) return "";
|
|
698
|
-
let
|
|
699
|
-
return
|
|
696
|
+
let r = t, i = "", a = typeof this._configuration.onRowClick == "function", o = a ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800" : "", s = a ? " data-row-clickable=\"true\"" : "", c = o ? ` class="${o}"` : "";
|
|
697
|
+
return i += `<tr data-row-index="${r}"${n ? " data-mint-rt-last-row=\"\"" : ""}${s}${c}>`, this._configuration.columns.forEach((t) => {
|
|
700
698
|
if (t.hidden) return;
|
|
701
|
-
let n = !t.show || t.show(this, e),
|
|
702
|
-
|
|
703
|
-
}),
|
|
699
|
+
let n = !t.show || t.show(this, e), a = `${this._getStyle(t)}box-sizing:border-box;vertical-align:middle;`;
|
|
700
|
+
i += `<td style="${a}" class="${this._getClasses(t, !0)}">`, i += n ? this._buildTableCellInnerHtml(t, e, r) : "", i += "</td>";
|
|
701
|
+
}), i += "</tr>", i;
|
|
704
702
|
}
|
|
705
703
|
_getVirtualRowCount() {
|
|
706
704
|
return !this._virtualScrollActive() || !this._configuration ? 0 : this._type === "provided" ? this._getAllFilteredRowsSorted().length : this._type === "ajax" ? this._totalRows : 0;
|
|
@@ -781,14 +779,14 @@ var n = {
|
|
|
781
779
|
g += `<li aria-hidden="true" class="pointer-events-none m-0 block list-none border-0 p-0" style="height:${m}px"></li>`;
|
|
782
780
|
for (let e = d; e < f; e++) {
|
|
783
781
|
let t = this._getVirtualRowAt(e), n = i > 0 && e === i - 1;
|
|
784
|
-
t ? g += this._buildMobileListItemHtml(t, e,
|
|
782
|
+
t ? g += this._buildMobileListItemHtml(t, e, n) : g += this._buildMobileListPlaceholderLi(e, a, n);
|
|
785
783
|
}
|
|
786
784
|
g += `<li aria-hidden="true" class="pointer-events-none m-0 block list-none border-0 p-0" style="height:${h}px"></li>`;
|
|
787
785
|
} else {
|
|
788
786
|
g += `<tr data-mint-rt-spacer="top" aria-hidden="true"><td colspan="${o}" style="height:${m}px;padding:0;border:0;line-height:0;font-size:0"></td></tr>`;
|
|
789
787
|
for (let e = d; e < f; e++) {
|
|
790
788
|
let t = this._getVirtualRowAt(e), n = i > 0 && e === i - 1;
|
|
791
|
-
t ? g += this._buildDataRowHtml(t, e,
|
|
789
|
+
t ? g += this._buildDataRowHtml(t, e, n) : g += this._buildVirtualPlaceholderRowHtml(e, a, n);
|
|
792
790
|
}
|
|
793
791
|
g += `<tr data-mint-rt-spacer="bottom" aria-hidden="true"><td colspan="${o}" style="height:${h}px;padding:0;border:0;line-height:0;font-size:0"></td></tr>`;
|
|
794
792
|
}
|
|
@@ -973,7 +971,7 @@ var n = {
|
|
|
973
971
|
let i = this.querySelector(`#search-${this._tableId}`), a = document.activeElement === i || i?.querySelector("input") === document.activeElement, o = this._search, s = "", c = "";
|
|
974
972
|
if ((this._fetching || this._loading) && !this._loaded && !this._sorting) return;
|
|
975
973
|
n.forEach((e, t) => {
|
|
976
|
-
c += this._buildMobileListItemHtml(e, t,
|
|
974
|
+
c += this._buildMobileListItemHtml(e, t, t === n.length - 1);
|
|
977
975
|
let r = typeof this._configuration.onRowClick == "function", i = r ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800" : "";
|
|
978
976
|
s += `<tr data-row-index="${t}" ${r ? "data-row-clickable=\"true\"" : ""}${i ? ` class="${i}"` : ""}>`, this._configuration.columns.forEach((n) => {
|
|
979
977
|
if (n.hidden) return;
|
|
@@ -1174,7 +1172,7 @@ var n = {
|
|
|
1174
1172
|
i += `<div id="mint-rt-vscroll-${this._tableId}" class="overflow-y-auto overflow-x-auto min-h-0 w-full" style="max-height: ${a}; scrollbar-gutter: stable; overscroll-behavior-x: contain; overscroll-behavior-y: none; overflow-anchor: none;">`, i += "<div class=\"hidden min-h-0 min-w-0 md:block\">", i += `<mint-table class="${l}"${c}>`, i += `<table id="${this._tableId}" class="w-full min-w-0 table-fixed">`, i += e, i += this._renderTheadHtml(!0, !0, !0, s);
|
|
1175
1173
|
} else i += "<div class=\"hidden min-h-0 min-w-0 md:block\">", i += `<mint-table class="${l}"${c}>`, i += `<table id="${this._tableId}">`, e && (i += this._renderColgroupHtml()), i += this._renderTheadHtml(!0, !0, !!e, s);
|
|
1176
1174
|
if (i += "<tbody" + (e ? ` data-mint-rt-tbody="${this._tableId}"` : "") + ">", !this._fetching && !this._loading && !r && !e && n.forEach((e, t) => {
|
|
1177
|
-
d += this._buildMobileListItemHtml(e, t,
|
|
1175
|
+
d += this._buildMobileListItemHtml(e, t, t === n.length - 1);
|
|
1178
1176
|
let r = typeof this._configuration.onRowClick == "function", a = r ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-mint-elevated" : "";
|
|
1179
1177
|
i += `<tr data-row-index="${t}" ${r ? "data-row-clickable=\"true\"" : ""}${a ? ` class="${a}"` : ""}>`, this._configuration.columns.forEach((n) => {
|
|
1180
1178
|
if (n.hidden) return;
|