@mmlogic/components 0.5.6 → 0.5.7
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/cjs/{cell-renderer-Coy-aD3k.js → cell-renderer-pwUGEDql.js} +8 -24
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/mrd-boolean-field_25.cjs.entry.js +190 -52
- package/dist/cjs/mrd-merge-view.cjs.entry.js +1 -1
- package/dist/collection/components/table/mrd-table/mrd-table.css +52 -22
- package/dist/collection/components/table/mrd-table/mrd-table.js +175 -45
- package/dist/collection/components/table/mrd-table/table-parts.js +6 -3
- package/dist/collection/components/table/mrd-table/virtual-scroll.js +8 -3
- package/dist/collection/utils/i18n.js +8 -24
- package/dist/components/i18n.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/{cell-renderer-Dd_PKH0_.js → cell-renderer-B8rJpnq8.js} +8 -24
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/mrd-boolean-field_25.entry.js +190 -52
- package/dist/esm/mrd-merge-view.entry.js +1 -1
- package/dist/mosterdcomponents/cell-renderer-B8u5BCK-.js.map +1 -0
- package/dist/mosterdcomponents/client-layout-Bc42CfJB.js.map +1 -0
- package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +1 -0
- package/dist/mosterdcomponents/field-helpers-CUJsHr1V.js.map +1 -0
- package/dist/mosterdcomponents/file-upload-common-DdTDuxEU.js.map +1 -0
- package/dist/mosterdcomponents/format-gcecItcD.js.map +1 -0
- package/dist/mosterdcomponents/i18n-Ba7_jO9I.js.map +1 -0
- package/dist/mosterdcomponents/index-1ayBojyN.js.map +1 -0
- package/dist/mosterdcomponents/index-DhffneUF.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js.map +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
- package/dist/mosterdcomponents/{p-53b00783.entry.js → p-5614d8f5.entry.js} +2 -2
- package/dist/mosterdcomponents/{p-1fc897f4.entry.js → p-e540de6a.entry.js} +1 -1
- package/dist/mosterdcomponents/p-rTM1tU_M.js +1 -0
- package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +1 -0
- package/dist/mosterdcomponents/query-params-BZbQoeYF.js.map +1 -0
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
- package/dist/mosterdcomponents/validation-CjjTt66G.js.map +1 -0
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +47 -5
- package/dist/types/components/table/mrd-table/table-parts.d.ts +0 -2
- package/dist/types/components/table/mrd-table/virtual-scroll.d.ts +6 -1
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-CGm4ff1O.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, w as writeTask } from './index-CDiBvvJU.js';
|
|
2
|
-
import { t, p as parseLocalizedNumber, f as formatNumber, a as formatDate, b as formatDateTime, c as formatCurrency, C as CellRenderer, d as formatPercentage } from './cell-renderer-
|
|
2
|
+
import { t, p as parseLocalizedNumber, f as formatNumber, a as formatDate, b as formatDateTime, c as formatCurrency, C as CellRenderer, d as formatPercentage } from './cell-renderer-B8rJpnq8.js';
|
|
3
3
|
import { b as ClientLayoutItemFieldDataType, e as ClientLayoutNavigateBehaviour, a as ClientLayoutItemType, c as ClientLayoutItemRelationDisplayType, d as ClientLayoutItemRelationEditBehavior, r as resolveArchetype, A as ARCHETYPE_DOCUMENT, h as ARCHETYPE_INVOICE_LINE, f as ARCHETYPE_INVOICE, g as ARCHETYPE_EMAIL } from './client-layout-Bc42CfJB.js';
|
|
4
4
|
|
|
5
5
|
const mrdBooleanFieldCss = () => `.sc-mrd-boolean-field-h{display:block}.mrd-boolean-field.sc-mrd-boolean-field{display:flex;align-items:center;width:100%}.mrd-boolean-field__toggle-label.sc-mrd-boolean-field{display:flex;align-items:center;gap:var(--mrd-space-3);cursor:pointer;user-select:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field{background-color:var(--mrd-color-primary)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{transform:translateX(20px)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:focus+.mrd-boolean-field__toggle.sc-mrd-boolean-field{box-shadow:var(--mrd-shadow-focus)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:disabled+.mrd-boolean-field__toggle.sc-mrd-boolean-field{opacity:0.5;cursor:not-allowed}.mrd-boolean-field__toggle.sc-mrd-boolean-field{position:relative;display:inline-block;width:44px;height:24px;background-color:var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius-full);transition:background-color var(--mrd-transition);flex-shrink:0}.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;background-color:var(--mrd-color-white);border-radius:50%;transition:transform var(--mrd-transition);box-shadow:var(--mrd-shadow-sm)}.mrd-boolean-field__text.sc-mrd-boolean-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-color-neutral-800)}.mrd-boolean-field__text--required.sc-mrd-boolean-field::after{content:" *";color:var(--mrd-color-danger)}`;
|
|
@@ -6373,7 +6373,10 @@ const TableCell = ({ col, row, locale, onDownload, onOpenTextblock, onOpenJson }
|
|
|
6373
6373
|
return (h("td", { class: "mrd-table__cell" }, preview, h("button", { class: "mrd-table__textblock-btn", onClick: (e) => { e.stopPropagation(); onOpenTextblock(full); }, "aria-label": t('textblock_show_more', locale) }, "\u22EF")));
|
|
6374
6374
|
}
|
|
6375
6375
|
const value = CellRenderer.render(col, row, locale);
|
|
6376
|
-
return (
|
|
6376
|
+
return (
|
|
6377
|
+
// title: columns are locked to the width measured on page 0, so a longer value on a
|
|
6378
|
+
// later page is ellipsised rather than widening the column — the tooltip keeps it readable.
|
|
6379
|
+
h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}`, title: value || undefined }, value));
|
|
6377
6380
|
};
|
|
6378
6381
|
/** Formats the aggregation total for one column, '' when not applicable. */
|
|
6379
6382
|
function formatAggregationValue(col, aggregations, locale) {
|
|
@@ -6415,11 +6418,11 @@ const JsonModal = ({ html, locale, onClose }) => {
|
|
|
6415
6418
|
return null;
|
|
6416
6419
|
return (h("div", { class: "mrd-table__modal-backdrop", onClick: onClose, role: "dialog", "aria-modal": "true" }, h("div", { class: "mrd-table__modal", onClick: (e) => e.stopPropagation() }, h("button", { class: "mrd-table__modal-close", onClick: onClose, "aria-label": t('close', locale) }, "\u2715"), h("pre", { class: "mrd-table__modal-json", innerHTML: html }))));
|
|
6417
6420
|
};
|
|
6418
|
-
const Toolbar = ({ locale,
|
|
6421
|
+
const Toolbar = ({ locale, filterCount, actions, views, activeViewIdx, viewPopoverOpen, createPickerOpen, createTypes, cb }) => {
|
|
6419
6422
|
var _a;
|
|
6420
6423
|
const hasActions = actions.length > 0;
|
|
6421
6424
|
const hasViewSwitcher = views.length > 1;
|
|
6422
|
-
return (h("div", { class: "mrd-table__toolbar" }, h("div", { class: "mrd-table__toolbar-left" },
|
|
6425
|
+
return (h("div", { class: "mrd-table__toolbar" }, h("div", { class: "mrd-table__toolbar-left" }, filterCount > 0 && (h("button", { class: "mrd-table__action mrd-table__action--secondary mrd-table__filter-clear", onClick: cb.onClearAllFilters }, h("svg", { class: "mrd-table__action-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { fill: "currentColor", d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })), h("span", { class: "mrd-table__filter-clear-label" }, t('table_filter_clear_all', locale), " (", filterCount, ")")))), hasViewSwitcher && (h("div", { class: "mrd-table__toolbar-center" }, h("div", { class: "mrd-table__view-switcher" }, h("button", { class: "mrd-table__view-arrow", "aria-label": "Previous view", onClick: () => cb.onViewSwitch((activeViewIdx - 1 + views.length) % views.length) }, "\u25C0"), h("div", { class: "mrd-table__view-title-wrap" }, h("button", { class: "mrd-table__view-title", onClick: (e) => cb.onToggleViewPopover(e) }, (_a = views[activeViewIdx]) === null || _a === void 0 ? void 0 : _a.label), viewPopoverOpen && (h("div", { class: "mrd-table__view-popover", onClick: (e) => e.stopPropagation() }, views.map((v, i) => (h("button", { key: String(i), class: `mrd-table__view-popover-item${i === activeViewIdx ? ' mrd-table__view-popover-item--active' : ''}`, onClick: () => {
|
|
6423
6426
|
if (i !== activeViewIdx)
|
|
6424
6427
|
cb.onViewSwitch(i);
|
|
6425
6428
|
cb.onCloseViewPopover();
|
|
@@ -6536,13 +6539,18 @@ const MAX_RETRY_ATTEMPTS = 3;
|
|
|
6536
6539
|
function visibleCount(tableHeight, rowHeight) {
|
|
6537
6540
|
return Math.ceil(tableHeight / rowHeight);
|
|
6538
6541
|
}
|
|
6539
|
-
/** Render window (with buffer) for the given scroll offset.
|
|
6542
|
+
/** Render window (with buffer) for the given scroll offset.
|
|
6543
|
+
* total <= 0 means "not known yet" (no totalElements prop, no aggregation total and no page
|
|
6544
|
+
* loaded — e.g. right after a filter reset), *not* "no rows". Clamping to total - 1 would
|
|
6545
|
+
* collapse the window to renderEnd = -1, so nothing renders and no page is ever requested;
|
|
6546
|
+
* the window is left unclamped instead and the render pass clamps it against
|
|
6547
|
+
* effectiveTotal once real data has landed. */
|
|
6540
6548
|
function computeWindow(scrollTop, rowHeight, tableHeight, total) {
|
|
6541
6549
|
const visStart = Math.floor(scrollTop / rowHeight);
|
|
6542
|
-
const
|
|
6550
|
+
const unclamped = visStart + visibleCount(tableHeight, rowHeight) + BUFFER;
|
|
6543
6551
|
return {
|
|
6544
6552
|
renderStart: Math.max(0, visStart - BUFFER),
|
|
6545
|
-
renderEnd: Math.min(total - 1,
|
|
6553
|
+
renderEnd: total > 0 ? Math.min(total - 1, unclamped) : unclamped,
|
|
6546
6554
|
};
|
|
6547
6555
|
}
|
|
6548
6556
|
/** First/last page (0-based) covering the given row window. */
|
|
@@ -6584,12 +6592,16 @@ function getStalePages(requestedAt, now, timeoutMs) {
|
|
|
6584
6592
|
return stale;
|
|
6585
6593
|
}
|
|
6586
6594
|
|
|
6587
|
-
const mrdTableCss = () => `.sc-mrd-table-h{display:block;width:100%}.mrd-table.sc-mrd-table{overflow-x:auto}.mrd-table__scroll.sc-mrd-table{overflow-y:auto;overflow-x:auto;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);overflow-anchor:none}.mrd-table__table.sc-mrd-table{width:auto;min-width:100%;border-collapse:collapse;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900)}.mrd-table__scroll.sc-mrd-table .mrd-table__table.sc-mrd-table{min-width:max-content}.mrd-table__header.sc-mrd-table{position:sticky;top:0;z-index:1;background:var(--mrd-color-white);text-align:left;padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:2px solid var(--mrd-border-color);color:var(--mrd-color-neutral-600);font-weight:var(--mrd-font-weight-medium);white-space:nowrap;font-size:var(--mrd-font-size-xs);text-transform:uppercase;letter-spacing:0.04em}.mrd-table__header--sortable.sc-mrd-table{cursor:pointer;user-select:none}.mrd-table__header--sortable.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-800)}.mrd-table__header--sorted-asc.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header--filtered.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-label.sc-mrd-table{margin-right:var(--mrd-space-1)}.mrd-table__sort-icon.sc-mrd-table{font-size:0.85rem;opacity:0.4;vertical-align:middle}.mrd-table__header--sorted-asc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table{opacity:1;color:var(--mrd-color-primary)}.mrd-table__filter-icon.sc-mrd-table{display:inline-flex;align-items:center;vertical-align:middle;margin-left:var(--mrd-space-1);color:var(--mrd-color-primary)}.mrd-table__row.sc-mrd-table{border-bottom:1px solid var(--mrd-border-color)}.mrd-table__row.sc-mrd-table:hover{background:var(--mrd-color-neutral-200) !important}.mrd-table__row--clickable.sc-mrd-table{cursor:pointer}.mrd-table__row--loading.sc-mrd-table{background:transparent}.mrd-table__row--failed.sc-mrd-table{background:transparent}.mrd-table__spacer.sc-mrd-table{border:none}.mrd-table__spacer.sc-mrd-table td.sc-mrd-table{padding:0;border:none}.mrd-table__cell.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);vertical-align:top;white-space:nowrap}.mrd-table__cell--numeric.sc-mrd-table{text-align:right;font-variant-numeric:tabular-nums}.mrd-table__cell--placeholder.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__cell--failed.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__placeholder-bar.sc-mrd-table{display:block;height:0.75rem;width:55%;border-radius:var(--mrd-border-radius-sm);background:linear-gradient(90deg, var(--mrd-color-neutral-200) 25%, var(--mrd-color-neutral-100) 50%, var(--mrd-color-neutral-200) 75%);background-size:200% 100%;animation:mrd-shimmer 1.4s ease infinite}.mrd-table__retry-button.sc-mrd-table{border:none;background:none;padding:0;color:var(--mrd-color-danger);font-size:inherit;cursor:pointer;text-decoration:underline}.mrd-table__toolbar.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding-bottom:var(--mrd-space-2)}.mrd-table__toolbar-left.sc-mrd-table,.mrd-table__toolbar-right.sc-mrd-table{display:flex;gap:var(--mrd-space-2);align-items:center}.mrd-table__toolbar-center.sc-mrd-table{flex:1;display:flex;justify-content:center;align-items:center;gap:var(--mrd-space-1)}.mrd-table__view-switcher.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__view-arrow.sc-mrd-table{background:none;border:none;cursor:pointer;padding:0 var(--mrd-space-1);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-xs);line-height:1}.mrd-table__view-arrow.sc-mrd-table:hover{color:var(--mrd-color-neutral-800)}.mrd-table__view-title-wrap.sc-mrd-table{position:relative}.mrd-table__view-title.sc-mrd-table{font-size:var(--mrd-font-size-sm);font-weight:600;color:var(--mrd-color-neutral-800);font-family:var(--mrd-font-family);background:none;border:none;outline:none;cursor:pointer;padding:0 var(--mrd-space-1);max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-table__view-title.sc-mrd-table:hover{color:var(--mrd-color-primary)}.mrd-table__view-popover.sc-mrd-table{position:absolute;top:calc(100% + var(--mrd-space-1));left:50%;transform:translateX(-50%);background:var(--mrd-color-white);border:1px solid var(--mrd-color-neutral-200);border-radius:var(--mrd-radius-md);box-shadow:var(--mrd-shadow-md);z-index:100;min-width:160px;padding:var(--mrd-space-1) 0}.mrd-table__view-popover-item.sc-mrd-table{display:block;width:100%;text-align:left;background:none;border:none;cursor:pointer;padding:var(--mrd-space-2) var(--mrd-space-3);font-size:var(--mrd-font-size-sm);font-family:var(--mrd-font-family);color:var(--mrd-color-neutral-700);white-space:nowrap}.mrd-table__view-popover-item.sc-mrd-table:hover{background:var(--mrd-color-neutral-50)}.mrd-table__view-popover-item--active.sc-mrd-table{font-weight:600;color:var(--mrd-color-primary)}.mrd-table__action.sc-mrd-table{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;background:transparent;border:1px solid transparent;border-radius:var(--mrd-border-radius);cursor:pointer;color:var(--mrd-color-neutral-400);transition:background-color 0.15s, border-color 0.15s, color 0.15s}.mrd-table__action.sc-mrd-table:hover{background-color:var(--mrd-color-neutral-100);border-color:var(--mrd-color-neutral-300);color:var(--mrd-color-neutral-700)}.mrd-table__action.sc-mrd-table:hover .mrd-table__action-tooltip.sc-mrd-table{display:block}.mrd-table__action.sc-mrd-table:disabled{opacity:0.4;cursor:not-allowed}.mrd-table__action--primary.sc-mrd-table{color:var(--mrd-color-neutral-500)}.mrd-table__action--primary.sc-mrd-table:hover{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__action--danger.sc-mrd-table{color:var(--mrd-color-error)}.mrd-table__action--danger.sc-mrd-table:hover{background-color:var(--mrd-color-error-light, #fef2f2);border-color:var(--mrd-color-error)}.mrd-table__action-icon.sc-mrd-table{width:1.25rem;height:1.25rem;pointer-events:none;fill:currentColor}.mrd-table__action-tooltip.sc-mrd-table{display:none;position:absolute;bottom:calc(100% + 6px);right:0;padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);white-space:nowrap;background:var(--mrd-color-tooltip, #fffce1);color:var(--mrd-color-neutral-900);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius-sm, var(--mrd-border-radius));pointer-events:none;z-index:10}.mrd-table__create-picker-wrap.sc-mrd-table{position:relative}.mrd-table__create-picker.sc-mrd-table{position:absolute;right:0;top:calc(100% + 4px);background:var(--mrd-color-white, #fff);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));z-index:10;min-width:10rem;padding:var(--mrd-space-1) 0}.mrd-table__create-picker-item.sc-mrd-table{display:block;width:100%;text-align:left;padding:var(--mrd-space-2) var(--mrd-space-3);background:none;border:none;cursor:pointer;font-size:var(--mrd-font-size-sm);font-family:var(--mrd-font-family);color:var(--mrd-color-neutral-800)}.mrd-table__create-picker-item.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-900)}.mrd-table__filter-toggle--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-toggle--active.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary));color:var(--mrd-color-white)}.mrd-table__filter-badge.sc-mrd-table{position:absolute;top:-6px;right:-6px;min-width:1.25rem;height:1.25rem;padding:0 3px;background:var(--mrd-color-error, #e53e3e);color:var(--mrd-color-white);border-radius:9999px;font-size:0.65rem;font-weight:var(--mrd-font-weight-medium);line-height:1.25rem;text-align:center;pointer-events:none}.mrd-table__filter-popup.sc-mrd-table{position:fixed;width:280px;background:var(--mrd-color-white);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));z-index:var(--mrd-z-dropdown, 200);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-popup-header.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding:var(--mrd-space-2) var(--mrd-space-3);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__filter-popup-title.sc-mrd-table{font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-800);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-close.sc-mrd-table{background:transparent;border:none;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.9rem;padding:2px 4px;border-radius:3px;line-height:1}.mrd-table__filter-close.sc-mrd-table:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-800)}.mrd-table__filter-section.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-3)}.mrd-table__filter-section-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);font-weight:var(--mrd-font-weight-medium);text-transform:uppercase;letter-spacing:0.04em;color:var(--mrd-color-neutral-500);margin-bottom:var(--mrd-space-2)}.mrd-table__filter-sort-buttons.sc-mrd-table{display:flex;gap:var(--mrd-space-2)}.mrd-table__filter-sort-btn.sc-mrd-table{flex:1;padding:var(--mrd-space-1) var(--mrd-space-2);background:transparent;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);cursor:pointer;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-700)}.mrd-table__filter-sort-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-sort-btn--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-divider.sc-mrd-table{height:1px;background:var(--mrd-border-color);margin:0}.mrd-table__filter-editor.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-2)}.mrd-table__filter-select.sc-mrd-table,.mrd-table__filter-input.sc-mrd-table{width:100%;padding:var(--mrd-space-1) var(--mrd-space-2);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900);background:var(--mrd-color-white);box-sizing:border-box}.mrd-table__filter-select.sc-mrd-table:focus,.mrd-table__filter-input.sc-mrd-table:focus{outline:none;border-color:var(--mrd-color-primary);box-shadow:0 0 0 2px rgba(0, 0, 0, 0.06)}.mrd-table__filter-range.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__filter-range.sc-mrd-table .mrd-table__filter-input.sc-mrd-table{flex:1;min-width:0}.mrd-table__filter-range--stacked.sc-mrd-table{flex-direction:column;align-items:stretch;gap:var(--mrd-space-2)}.mrd-table__filter-range-sep.sc-mrd-table{color:var(--mrd-color-neutral-400);flex-shrink:0}.mrd-table__filter-range-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);margin-bottom:2px}.mrd-table__filter-radio-group.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1)}.mrd-table__filter-radio-group--inline.sc-mrd-table{flex-direction:row;gap:var(--mrd-space-3)}.mrd-table__filter-radio-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-list.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1);max-height:180px;overflow-y:auto}.mrd-table__filter-list-controls.sc-mrd-table{display:flex;gap:var(--mrd-space-2);margin-bottom:var(--mrd-space-1)}.mrd-table__filter-list-btn.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-primary);background:transparent;border:none;cursor:pointer;padding:0;text-decoration:underline}.mrd-table__filter-checkbox-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-no-support.sc-mrd-table{font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);margin:0;font-style:italic}.mrd-table__filter-popup-footer.sc-mrd-table{display:flex;justify-content:flex-end;gap:var(--mrd-space-2);padding:var(--mrd-space-2) var(--mrd-space-3);border-top:1px solid var(--mrd-border-color)}.mrd-table__filter-btn.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-3);border-radius:var(--mrd-border-radius);border:1px solid var(--mrd-border-color);font-size:var(--mrd-font-size-sm);cursor:pointer}.mrd-table__filter-btn--clear.sc-mrd-table{background:transparent;color:var(--mrd-color-neutral-600)}.mrd-table__filter-btn--clear.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-btn--apply.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-btn--apply.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary))}.mrd-table__totals-row.sc-mrd-table{border-top:2px solid var(--mrd-border-color)}.mrd-table__totals-cell.sc-mrd-table{position:sticky;bottom:0;z-index:2;padding:var(--mrd-space-2) var(--mrd-space-4);background:var(--mrd-color-white);font-weight:var(--mrd-font-weight-medium);font-variant-numeric:tabular-nums;white-space:nowrap;border-top:2px solid var(--mrd-border-color)}.mrd-table__totals-cell--numeric.sc-mrd-table{text-align:right}.mrd-table__footer.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);text-align:right}.mrd-table__empty.sc-mrd-table{padding:var(--mrd-space-4) var(--mrd-space-3);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-sm);text-align:center;margin:0}.mrd-table__file-btn.sc-mrd-table{display:inline-flex;align-items:center;gap:var(--mrd-space-1);background:none;border:none;padding:0;cursor:pointer;color:var(--mrd-color-primary);font-size:var(--mrd-font-size-sm);font-family:inherit;max-width:100%;overflow:hidden}.mrd-table__file-btn.sc-mrd-table:hover{text-decoration:underline;color:var(--mrd-color-primary-dark)}.mrd-table__file-icon.sc-mrd-table{flex-shrink:0;width:1rem;height:1rem}.mrd-table__textblock-btn.sc-mrd-table{display:inline;background:none;border:none;padding:0 0 0 var(--mrd-space-1);cursor:pointer;color:var(--mrd-color-primary);font-size:var(--mrd-font-size-sm);font-family:inherit;line-height:inherit;vertical-align:middle}.mrd-table__textblock-btn.sc-mrd-table:hover{color:var(--mrd-color-primary-dark)}.mrd-table__modal-backdrop.sc-mrd-table{position:fixed;inset:0;background:rgba(0, 0, 0, 0.4);z-index:var(--mrd-z-modal, 300);display:flex;align-items:center;justify-content:center}.mrd-table__modal.sc-mrd-table{background:#fff;border-radius:var(--mrd-radius-md, 0.5rem);padding:var(--mrd-space-6);max-width:min(600px, 90vw);max-height:70vh;overflow-y:auto;position:relative;box-shadow:var(--mrd-shadow-lg)}.mrd-table__modal-close.sc-mrd-table{position:absolute;top:var(--mrd-space-3);right:var(--mrd-space-3);background:none;border:none;cursor:pointer;font-size:1.25rem;line-height:1;color:var(--mrd-color-text-muted, #6b7280);padding:0}.mrd-table__modal-close.sc-mrd-table:hover{color:var(--mrd-color-text, #111827)}.mrd-table__modal-text.sc-mrd-table{margin:0;padding-right:var(--mrd-space-6);white-space:pre-wrap;word-break:break-word;font-size:var(--mrd-font-size-sm);line-height:1.6}.mrd-table__json-preview.sc-mrd-table{font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:inline-block;max-width:calc(100% - 1.5rem);vertical-align:middle}.mrd-table__modal-json.sc-mrd-table{margin:0;padding-right:var(--mrd-space-6);font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);white-space:pre-wrap;word-break:break-word;line-height:1.6;background:none;border:none}@keyframes mrd-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}`;
|
|
6595
|
+
const mrdTableCss = () => `.sc-mrd-table-h{display:block;width:100%}.mrd-table.sc-mrd-table{overflow-x:auto}.mrd-table__scroll.sc-mrd-table{overflow-y:auto;overflow-x:auto;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);overflow-anchor:none}.mrd-table__table.sc-mrd-table{width:auto;min-width:100%;border-collapse:collapse;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900)}.mrd-table__scroll.sc-mrd-table .mrd-table__table.sc-mrd-table{min-width:max-content}.mrd-table__header.sc-mrd-table{position:sticky;top:0;z-index:1;background:var(--mrd-color-white);text-align:left;padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:2px solid var(--mrd-border-color);color:var(--mrd-color-neutral-600);font-weight:var(--mrd-font-weight-medium);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--mrd-font-size-xs);text-transform:uppercase;letter-spacing:0.04em}.mrd-table__header--sortable.sc-mrd-table{cursor:pointer;user-select:none}.mrd-table__header--sortable.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-800)}.mrd-table__header--sorted-asc.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header--filtered.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-label.sc-mrd-table{margin-right:var(--mrd-space-1)}.mrd-table__col-resizer.sc-mrd-table{position:absolute;top:0;right:0;width:9px;height:100%;cursor:col-resize;touch-action:none;user-select:none}.mrd-table__col-resizer.sc-mrd-table::after{content:"";position:absolute;top:25%;right:4px;width:1px;height:50%;background:var(--mrd-border-color)}.mrd-table__col-resizer.sc-mrd-table:hover::after{width:2px;right:3px;background:var(--mrd-color-primary)}.mrd-table__col-resizer--active.sc-mrd-table::after{width:2px;right:3px;height:100%;top:0;background:var(--mrd-color-primary)}.mrd-table--resizing.sc-mrd-table{cursor:col-resize;user-select:none}.mrd-table__sort-icon.sc-mrd-table{font-size:0.85rem;opacity:0.4;vertical-align:middle}.mrd-table__header--sorted-asc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table{opacity:1;color:var(--mrd-color-primary)}.mrd-table__filter-icon.sc-mrd-table{display:inline-flex;align-items:center;vertical-align:middle;margin-left:var(--mrd-space-1);color:var(--mrd-color-primary)}.mrd-table__row.sc-mrd-table{border-bottom:1px solid var(--mrd-border-color)}.mrd-table__row.sc-mrd-table:hover{background:var(--mrd-color-neutral-200) !important}.mrd-table__row--clickable.sc-mrd-table{cursor:pointer}.mrd-table__row--loading.sc-mrd-table{background:transparent}.mrd-table__row--failed.sc-mrd-table{background:transparent}.mrd-table__spacer.sc-mrd-table{border:none}.mrd-table__spacer.sc-mrd-table td.sc-mrd-table{padding:0;border:none}.mrd-table__cell.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);vertical-align:top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-table__cell--numeric.sc-mrd-table{text-align:right;font-variant-numeric:tabular-nums}.mrd-table__cell--placeholder.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__cell--failed.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__placeholder-bar.sc-mrd-table{display:block;height:0.75rem;width:55%;border-radius:var(--mrd-border-radius-sm);background:linear-gradient(90deg, var(--mrd-color-neutral-200) 25%, var(--mrd-color-neutral-100) 50%, var(--mrd-color-neutral-200) 75%);background-size:200% 100%;animation:mrd-shimmer 1.4s ease infinite}.mrd-table__retry-button.sc-mrd-table{border:none;background:none;padding:0;color:var(--mrd-color-danger);font-size:inherit;cursor:pointer;text-decoration:underline}.mrd-table__toolbar.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding-bottom:var(--mrd-space-2)}.mrd-table__toolbar-left.sc-mrd-table,.mrd-table__toolbar-right.sc-mrd-table{display:flex;gap:var(--mrd-space-2);align-items:center}.mrd-table__toolbar-center.sc-mrd-table{flex:1;display:flex;justify-content:center;align-items:center;gap:var(--mrd-space-1)}.mrd-table__view-switcher.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__view-arrow.sc-mrd-table{background:none;border:none;cursor:pointer;padding:0 var(--mrd-space-1);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-xs);line-height:1}.mrd-table__view-arrow.sc-mrd-table:hover{color:var(--mrd-color-neutral-800)}.mrd-table__view-title-wrap.sc-mrd-table{position:relative}.mrd-table__view-title.sc-mrd-table{font-size:var(--mrd-font-size-sm);font-weight:600;color:var(--mrd-color-neutral-800);font-family:var(--mrd-font-family);background:none;border:none;outline:none;cursor:pointer;padding:0 var(--mrd-space-1);max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-table__view-title.sc-mrd-table:hover{color:var(--mrd-color-primary)}.mrd-table__view-popover.sc-mrd-table{position:absolute;top:calc(100% + var(--mrd-space-1));left:50%;transform:translateX(-50%);background:var(--mrd-color-white);border:1px solid var(--mrd-color-neutral-200);border-radius:var(--mrd-radius-md);box-shadow:var(--mrd-shadow-md);z-index:100;min-width:160px;padding:var(--mrd-space-1) 0}.mrd-table__view-popover-item.sc-mrd-table{display:block;width:100%;text-align:left;background:none;border:none;cursor:pointer;padding:var(--mrd-space-2) var(--mrd-space-3);font-size:var(--mrd-font-size-sm);font-family:var(--mrd-font-family);color:var(--mrd-color-neutral-700);white-space:nowrap}.mrd-table__view-popover-item.sc-mrd-table:hover{background:var(--mrd-color-neutral-50)}.mrd-table__view-popover-item--active.sc-mrd-table{font-weight:600;color:var(--mrd-color-primary)}.mrd-table__action.sc-mrd-table{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;background:transparent;border:1px solid transparent;border-radius:var(--mrd-border-radius);cursor:pointer;color:var(--mrd-color-neutral-400);transition:background-color 0.15s, border-color 0.15s, color 0.15s}.mrd-table__action.sc-mrd-table:hover{background-color:var(--mrd-color-neutral-100);border-color:var(--mrd-color-neutral-300);color:var(--mrd-color-neutral-700)}.mrd-table__action.sc-mrd-table:hover .mrd-table__action-tooltip.sc-mrd-table{display:block}.mrd-table__action.sc-mrd-table:disabled{opacity:0.4;cursor:not-allowed}.mrd-table__action--primary.sc-mrd-table{color:var(--mrd-color-neutral-500)}.mrd-table__action--primary.sc-mrd-table:hover{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__action--danger.sc-mrd-table{color:var(--mrd-color-error)}.mrd-table__action--danger.sc-mrd-table:hover{background-color:var(--mrd-color-error-light, #fef2f2);border-color:var(--mrd-color-error)}.mrd-table__action-icon.sc-mrd-table{width:1.25rem;height:1.25rem;pointer-events:none;fill:currentColor}.mrd-table__action-tooltip.sc-mrd-table{display:none;position:absolute;bottom:calc(100% + 6px);right:0;padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);white-space:nowrap;background:var(--mrd-color-tooltip, #fffce1);color:var(--mrd-color-neutral-900);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius-sm, var(--mrd-border-radius));pointer-events:none;z-index:10}.mrd-table__create-picker-wrap.sc-mrd-table{position:relative}.mrd-table__create-picker.sc-mrd-table{position:absolute;right:0;top:calc(100% + 4px);background:var(--mrd-color-white, #fff);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));z-index:10;min-width:10rem;padding:var(--mrd-space-1) 0}.mrd-table__create-picker-item.sc-mrd-table{display:block;width:100%;text-align:left;padding:var(--mrd-space-2) var(--mrd-space-3);background:none;border:none;cursor:pointer;font-size:var(--mrd-font-size-sm);font-family:var(--mrd-font-family);color:var(--mrd-color-neutral-800)}.mrd-table__create-picker-item.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-900)}.mrd-table__filter-clear.sc-mrd-table{width:auto;gap:var(--mrd-space-1);padding:0 var(--mrd-space-2);color:var(--mrd-color-primary);border-color:var(--mrd-color-primary)}.mrd-table__filter-clear.sc-mrd-table:hover{color:var(--mrd-color-primary);border-color:var(--mrd-color-primary)}.mrd-table__filter-clear-label.sc-mrd-table{font-size:var(--mrd-font-size-sm);white-space:nowrap}.mrd-table__filter-popup.sc-mrd-table{position:fixed;width:280px;background:var(--mrd-color-white);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));z-index:var(--mrd-z-dropdown, 200);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-popup-header.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding:var(--mrd-space-2) var(--mrd-space-3);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__filter-popup-title.sc-mrd-table{font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-800);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-close.sc-mrd-table{background:transparent;border:none;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.9rem;padding:2px 4px;border-radius:3px;line-height:1}.mrd-table__filter-close.sc-mrd-table:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-800)}.mrd-table__filter-section.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-3)}.mrd-table__filter-section-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);font-weight:var(--mrd-font-weight-medium);text-transform:uppercase;letter-spacing:0.04em;color:var(--mrd-color-neutral-500);margin-bottom:var(--mrd-space-2)}.mrd-table__filter-sort-buttons.sc-mrd-table{display:flex;gap:var(--mrd-space-2)}.mrd-table__filter-sort-btn.sc-mrd-table{flex:1;padding:var(--mrd-space-1) var(--mrd-space-2);background:transparent;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);cursor:pointer;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-700)}.mrd-table__filter-sort-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-sort-btn--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-divider.sc-mrd-table{height:1px;background:var(--mrd-border-color);margin:0}.mrd-table__filter-editor.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-2)}.mrd-table__filter-select.sc-mrd-table,.mrd-table__filter-input.sc-mrd-table{width:100%;padding:var(--mrd-space-1) var(--mrd-space-2);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900);background:var(--mrd-color-white);box-sizing:border-box}.mrd-table__filter-select.sc-mrd-table:focus,.mrd-table__filter-input.sc-mrd-table:focus{outline:none;border-color:var(--mrd-color-primary);box-shadow:0 0 0 2px rgba(0, 0, 0, 0.06)}.mrd-table__filter-range.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__filter-range.sc-mrd-table .mrd-table__filter-input.sc-mrd-table{flex:1;min-width:0}.mrd-table__filter-range--stacked.sc-mrd-table{flex-direction:column;align-items:stretch;gap:var(--mrd-space-2)}.mrd-table__filter-range-sep.sc-mrd-table{color:var(--mrd-color-neutral-400);flex-shrink:0}.mrd-table__filter-range-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);margin-bottom:2px}.mrd-table__filter-radio-group.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1)}.mrd-table__filter-radio-group--inline.sc-mrd-table{flex-direction:row;gap:var(--mrd-space-3)}.mrd-table__filter-radio-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-list.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1);max-height:180px;overflow-y:auto}.mrd-table__filter-list-controls.sc-mrd-table{display:flex;gap:var(--mrd-space-2);margin-bottom:var(--mrd-space-1)}.mrd-table__filter-list-btn.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-primary);background:transparent;border:none;cursor:pointer;padding:0;text-decoration:underline}.mrd-table__filter-checkbox-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-no-support.sc-mrd-table{font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);margin:0;font-style:italic}.mrd-table__filter-popup-footer.sc-mrd-table{display:flex;justify-content:flex-end;gap:var(--mrd-space-2);padding:var(--mrd-space-2) var(--mrd-space-3);border-top:1px solid var(--mrd-border-color)}.mrd-table__filter-btn.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-3);border-radius:var(--mrd-border-radius);border:1px solid var(--mrd-border-color);font-size:var(--mrd-font-size-sm);cursor:pointer}.mrd-table__filter-btn--clear.sc-mrd-table{background:transparent;color:var(--mrd-color-neutral-600)}.mrd-table__filter-btn--clear.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-btn--apply.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-btn--apply.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary))}.mrd-table__totals-row.sc-mrd-table{border-top:2px solid var(--mrd-border-color)}.mrd-table__totals-cell.sc-mrd-table{position:sticky;bottom:0;z-index:2;padding:var(--mrd-space-2) var(--mrd-space-4);background:var(--mrd-color-white);font-weight:var(--mrd-font-weight-medium);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-top:2px solid var(--mrd-border-color)}.mrd-table__totals-cell--numeric.sc-mrd-table{text-align:right}.mrd-table__footer.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);text-align:right}.mrd-table__empty.sc-mrd-table{padding:var(--mrd-space-4) var(--mrd-space-3);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-sm);text-align:center;margin:0}.mrd-table__file-btn.sc-mrd-table{display:inline-flex;align-items:center;gap:var(--mrd-space-1);background:none;border:none;padding:0;cursor:pointer;color:var(--mrd-color-primary);font-size:var(--mrd-font-size-sm);font-family:inherit;max-width:100%;overflow:hidden}.mrd-table__file-btn.sc-mrd-table:hover{text-decoration:underline;color:var(--mrd-color-primary-dark)}.mrd-table__file-icon.sc-mrd-table{flex-shrink:0;width:1rem;height:1rem}.mrd-table__textblock-btn.sc-mrd-table{display:inline;background:none;border:none;padding:0 0 0 var(--mrd-space-1);cursor:pointer;color:var(--mrd-color-primary);font-size:var(--mrd-font-size-sm);font-family:inherit;line-height:inherit;vertical-align:middle}.mrd-table__textblock-btn.sc-mrd-table:hover{color:var(--mrd-color-primary-dark)}.mrd-table__modal-backdrop.sc-mrd-table{position:fixed;inset:0;background:rgba(0, 0, 0, 0.4);z-index:var(--mrd-z-modal, 300);display:flex;align-items:center;justify-content:center}.mrd-table__modal.sc-mrd-table{background:#fff;border-radius:var(--mrd-radius-md, 0.5rem);padding:var(--mrd-space-6);max-width:min(600px, 90vw);max-height:70vh;overflow-y:auto;position:relative;box-shadow:var(--mrd-shadow-lg)}.mrd-table__modal-close.sc-mrd-table{position:absolute;top:var(--mrd-space-3);right:var(--mrd-space-3);background:none;border:none;cursor:pointer;font-size:1.25rem;line-height:1;color:var(--mrd-color-text-muted, #6b7280);padding:0}.mrd-table__modal-close.sc-mrd-table:hover{color:var(--mrd-color-text, #111827)}.mrd-table__modal-text.sc-mrd-table{margin:0;padding-right:var(--mrd-space-6);white-space:pre-wrap;word-break:break-word;font-size:var(--mrd-font-size-sm);line-height:1.6}.mrd-table__json-preview.sc-mrd-table{font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:inline-block;max-width:calc(100% - 1.5rem);vertical-align:middle}.mrd-table__modal-json.sc-mrd-table{margin:0;padding-right:var(--mrd-space-6);font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);white-space:pre-wrap;word-break:break-word;line-height:1.6;background:none;border:none}@keyframes mrd-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}`;
|
|
6588
6596
|
|
|
6589
6597
|
/** How often (ms) to scan outstanding page requests for staleness. */
|
|
6590
6598
|
const STALE_CHECK_INTERVAL_MS = 2000;
|
|
6591
6599
|
/** Breedte van de filterpopup in px — voor overflow-correctie. */
|
|
6592
6600
|
const POPUP_WIDTH = 280;
|
|
6601
|
+
/** Smallest column width (px) a user can drag a column down to. */
|
|
6602
|
+
const MIN_COL_WIDTH = 48;
|
|
6603
|
+
/** Upper bound (px) for a double-click auto-fit, so one huge value can't blow up the layout. */
|
|
6604
|
+
const MAX_AUTOFIT_WIDTH = 600;
|
|
6593
6605
|
const MrdTable = class {
|
|
6594
6606
|
constructor(hostRef) {
|
|
6595
6607
|
registerInstance(this, hostRef);
|
|
@@ -6613,6 +6625,13 @@ const MrdTable = class {
|
|
|
6613
6625
|
this.viewPopoverClickHandler = null;
|
|
6614
6626
|
/** Guards against scheduling more than one column-width measurement per freeze. */
|
|
6615
6627
|
this.colWidthMeasureScheduled = false;
|
|
6628
|
+
/** Drag origin of the running column resize (null = no drag in progress). */
|
|
6629
|
+
this.resizeOrigin = null;
|
|
6630
|
+
/** True once the user has dragged (or auto-fitted) a column — see colWidthsUserSet usages. */
|
|
6631
|
+
this.colWidthsUserSet = false;
|
|
6632
|
+
/** Set once the host drives this table through init()/setPage(). Never cleared: it has to
|
|
6633
|
+
* survive resetPages(), which empties loadedPages — see the isPaginated getter. */
|
|
6634
|
+
this.paginationActivated = false;
|
|
6616
6635
|
// ── Props ──────────────────────────────────────────────────────────────────
|
|
6617
6636
|
/** The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc. */
|
|
6618
6637
|
this.item = null;
|
|
@@ -6642,10 +6661,10 @@ const MrdTable = class {
|
|
|
6642
6661
|
this.renderStart = 0;
|
|
6643
6662
|
this.renderEnd = 0;
|
|
6644
6663
|
this.colWidths = [];
|
|
6664
|
+
/** Index of the column currently being dragged by its resize handle (null = not resizing). */
|
|
6665
|
+
this.resizingCol = null;
|
|
6645
6666
|
this.sortField = '';
|
|
6646
6667
|
this.sortDir = 'asc';
|
|
6647
|
-
/** Whether the filter UI is visible on column headers. */
|
|
6648
|
-
this.filterMode = false;
|
|
6649
6668
|
/** Active filters keyed by field name. */
|
|
6650
6669
|
this.activeFilters = new Map();
|
|
6651
6670
|
/** Field name of the currently open filter popup (null = closed). */
|
|
@@ -6682,15 +6701,24 @@ const MrdTable = class {
|
|
|
6682
6701
|
};
|
|
6683
6702
|
}
|
|
6684
6703
|
// ── Prop watchers ─────────────────────────────────────────────────────────
|
|
6685
|
-
/** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied).
|
|
6704
|
+
/** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied).
|
|
6705
|
+
* 0 means "unknown" (hosts that rely on minKnownTotal never set it, and some reset it
|
|
6706
|
+
* while a filter is being applied) — clamping to it would collapse the window to a
|
|
6707
|
+
* single row, so leave the window alone and let the render pass clamp it. */
|
|
6686
6708
|
totalElementsChanged(newVal) {
|
|
6687
|
-
|
|
6709
|
+
if (newVal > 0)
|
|
6710
|
+
this.renderEnd = Math.min(this.renderEnd, newVal - 1);
|
|
6688
6711
|
}
|
|
6689
6712
|
/** Reset to primary view when the item prop is replaced from outside. */
|
|
6690
6713
|
itemChanged(newVal) {
|
|
6691
6714
|
var _a, _b;
|
|
6692
6715
|
this.activeViewIdx = 0;
|
|
6693
6716
|
this.applyDefaultSort((_b = (_a = newVal === null || newVal === void 0 ? void 0 : newVal.view) === null || _a === void 0 ? void 0 : _a.defaultSort) !== null && _b !== void 0 ? _b : '');
|
|
6717
|
+
// The columns getter derives from item/activeViewIdx: locked widths belong to the old
|
|
6718
|
+
// column set and would otherwise be applied by index to the new one.
|
|
6719
|
+
this.colWidths = [];
|
|
6720
|
+
this.colWidthMeasureScheduled = false;
|
|
6721
|
+
this.colWidthsUserSet = false;
|
|
6694
6722
|
}
|
|
6695
6723
|
// ── Lifecycle ──────────────────────────────────────────────────────────────
|
|
6696
6724
|
componentWillLoad() {
|
|
@@ -6725,6 +6753,7 @@ const MrdTable = class {
|
|
|
6725
6753
|
this.retryAttempts.clear();
|
|
6726
6754
|
this.colWidths = [];
|
|
6727
6755
|
this.colWidthMeasureScheduled = false;
|
|
6756
|
+
this.colWidthsUserSet = false;
|
|
6728
6757
|
this.scrollTop = 0;
|
|
6729
6758
|
this.renderStart = 0;
|
|
6730
6759
|
// Always fill the visible viewport on init — totalElements may be stale from a
|
|
@@ -6737,6 +6766,7 @@ const MrdTable = class {
|
|
|
6737
6766
|
this.aggregationsTotal = null;
|
|
6738
6767
|
this.aggregationsPending = true;
|
|
6739
6768
|
this.minKnownTotal = 0;
|
|
6769
|
+
this.paginationActivated = true;
|
|
6740
6770
|
// Always request page 0 — totalElements may be unknown (0) on first load.
|
|
6741
6771
|
this.emitLoadPage(0);
|
|
6742
6772
|
this.requestedPages = new Set([0]);
|
|
@@ -6753,6 +6783,7 @@ const MrdTable = class {
|
|
|
6753
6783
|
* detection even when rows.length === pageSize (exact multiple of page size).
|
|
6754
6784
|
*/
|
|
6755
6785
|
async setPage(pageNumber, rows, hasNext) {
|
|
6786
|
+
this.paginationActivated = true;
|
|
6756
6787
|
const isLastPage = hasNext !== undefined ? !hasNext : rows.length < this.pageSize;
|
|
6757
6788
|
if (isLastPage) {
|
|
6758
6789
|
// lastRowIdx is -1 when the page is empty; clamp renderEnd to -1 so the
|
|
@@ -6769,6 +6800,13 @@ const MrdTable = class {
|
|
|
6769
6800
|
const next = new Map(this.loadedPages);
|
|
6770
6801
|
next.set(pageNumber, rows);
|
|
6771
6802
|
this.loadedPages = next;
|
|
6803
|
+
// Repair a window that renders nothing. renderEnd is only ever clamped *down* (here and
|
|
6804
|
+
// in totalElementsChanged), so a window computed while the total was still unknown stays
|
|
6805
|
+
// collapsed and the rows sit in loadedPages without ever reaching the screen until the
|
|
6806
|
+
// user scrolls. Stays collapsed when the data really is empty (minKnownTotal 0).
|
|
6807
|
+
if (this.renderEnd < this.renderStart) {
|
|
6808
|
+
this.renderEnd = Math.min(this.renderStart + this.visibleCount() - 1, this.minKnownTotal - 1);
|
|
6809
|
+
}
|
|
6772
6810
|
this.requestedAt.delete(pageNumber);
|
|
6773
6811
|
this.retryAttempts.delete(pageNumber);
|
|
6774
6812
|
if (this.failedPages.has(pageNumber)) {
|
|
@@ -6819,23 +6857,118 @@ const MrdTable = class {
|
|
|
6819
6857
|
// re-render *during* the render cycle if done synchronously here. Defer it to a
|
|
6820
6858
|
// writeTask so the state mutation happens outside the render pass (avoids the
|
|
6821
6859
|
// Stencil "state/prop changed during rendering" warning and potential loops).
|
|
6860
|
+
// NB: the freeze must not depend on the totalElements prop — hosts may omit it
|
|
6861
|
+
// and rely on minKnownTotal, in which case the widths would never be locked and
|
|
6862
|
+
// every incoming page would re-flow all columns.
|
|
6822
6863
|
if (this.colWidths.length === 0 &&
|
|
6823
6864
|
!this.colWidthMeasureScheduled &&
|
|
6824
|
-
this.loadedPages.size > 0
|
|
6825
|
-
this.totalElements > 0) {
|
|
6865
|
+
this.loadedPages.size > 0) {
|
|
6826
6866
|
this.colWidthMeasureScheduled = true;
|
|
6827
6867
|
writeTask(() => {
|
|
6828
6868
|
this.colWidthMeasureScheduled = false;
|
|
6829
6869
|
// Re-check: state may have changed (e.g. a reset) between scheduling and running.
|
|
6830
6870
|
if (this.colWidths.length !== 0)
|
|
6831
6871
|
return;
|
|
6832
|
-
const
|
|
6833
|
-
if (
|
|
6834
|
-
this.colWidths =
|
|
6835
|
-
}
|
|
6872
|
+
const measured = this.measureColWidths();
|
|
6873
|
+
if (measured)
|
|
6874
|
+
this.colWidths = measured;
|
|
6836
6875
|
});
|
|
6837
6876
|
}
|
|
6838
6877
|
}
|
|
6878
|
+
// ── Column resizing (drag the header border, Excel-style) ──────────────────
|
|
6879
|
+
/** Current rendered header widths, or null when they can't be trusted (header not laid out yet). */
|
|
6880
|
+
measureColWidths() {
|
|
6881
|
+
const ths = this.el.querySelectorAll('.mrd-table__header');
|
|
6882
|
+
if (ths.length === 0 || ths.length !== this.columns.length)
|
|
6883
|
+
return null;
|
|
6884
|
+
return Array.from(ths).map(th => Math.round(th.getBoundingClientRect().width));
|
|
6885
|
+
}
|
|
6886
|
+
/** Locks the columns at their current rendered widths if they aren't locked yet. */
|
|
6887
|
+
ensureColWidths() {
|
|
6888
|
+
if (this.colWidths.length === this.columns.length)
|
|
6889
|
+
return true;
|
|
6890
|
+
const measured = this.measureColWidths();
|
|
6891
|
+
if (!measured)
|
|
6892
|
+
return false;
|
|
6893
|
+
this.colWidths = measured;
|
|
6894
|
+
return true;
|
|
6895
|
+
}
|
|
6896
|
+
setColWidth(idx, width) {
|
|
6897
|
+
const next = [...this.colWidths];
|
|
6898
|
+
next[idx] = Math.max(MIN_COL_WIDTH, Math.round(width));
|
|
6899
|
+
this.colWidths = next;
|
|
6900
|
+
this.colWidthsUserSet = true;
|
|
6901
|
+
}
|
|
6902
|
+
handleResizeStart(e, idx) {
|
|
6903
|
+
var _a, _b;
|
|
6904
|
+
// Stop the header's own click/sort handling; the drag owns this gesture.
|
|
6905
|
+
e.preventDefault();
|
|
6906
|
+
e.stopPropagation();
|
|
6907
|
+
if (!this.ensureColWidths())
|
|
6908
|
+
return;
|
|
6909
|
+
this.resizeOrigin = { idx, startX: e.clientX, startWidth: this.colWidths[idx] };
|
|
6910
|
+
this.resizingCol = idx;
|
|
6911
|
+
// Pointer capture keeps move/up events on the handle even when the cursor runs
|
|
6912
|
+
// ahead of it — no document-level listeners to register and clean up.
|
|
6913
|
+
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
6914
|
+
}
|
|
6915
|
+
handleResizeMove(e) {
|
|
6916
|
+
if (!this.resizeOrigin)
|
|
6917
|
+
return;
|
|
6918
|
+
const { idx, startX, startWidth } = this.resizeOrigin;
|
|
6919
|
+
this.setColWidth(idx, startWidth + (e.clientX - startX));
|
|
6920
|
+
}
|
|
6921
|
+
handleResizeEnd(e) {
|
|
6922
|
+
var _a, _b;
|
|
6923
|
+
if (!this.resizeOrigin)
|
|
6924
|
+
return;
|
|
6925
|
+
this.resizeOrigin = null;
|
|
6926
|
+
this.resizingCol = null;
|
|
6927
|
+
(_b = (_a = e.currentTarget).releasePointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
6928
|
+
}
|
|
6929
|
+
/** Double-click on the handle: widen the column to fit its widest *rendered* cell.
|
|
6930
|
+
* Only rows currently in the virtual-scroll window are measured — off-screen pages
|
|
6931
|
+
* aren't in the DOM at all, so this is "fit what you can see", not "fit all data". */
|
|
6932
|
+
handleResizeAutoFit(e, idx) {
|
|
6933
|
+
e.preventDefault();
|
|
6934
|
+
e.stopPropagation();
|
|
6935
|
+
if (!this.ensureColWidths())
|
|
6936
|
+
return;
|
|
6937
|
+
// .mrd-table__cell only matches real data cells — the shimmer/retry rows render a single
|
|
6938
|
+
// colSpan cell (without that class) which would otherwise measure as the full table width.
|
|
6939
|
+
const cells = this.el.querySelectorAll(`.mrd-table__header:nth-child(${idx + 1}), .mrd-table__cell:nth-child(${idx + 1})`);
|
|
6940
|
+
let widest = 0;
|
|
6941
|
+
cells.forEach(cell => {
|
|
6942
|
+
// scrollWidth is the untruncated content width; cells clip with overflow: hidden.
|
|
6943
|
+
const style = getComputedStyle(cell);
|
|
6944
|
+
const padding = parseFloat(style.paddingLeft || '0') + parseFloat(style.paddingRight || '0');
|
|
6945
|
+
widest = Math.max(widest, cell.scrollWidth + padding);
|
|
6946
|
+
});
|
|
6947
|
+
if (widest > 0)
|
|
6948
|
+
this.setColWidth(idx, Math.min(widest, MAX_AUTOFIT_WIDTH));
|
|
6949
|
+
}
|
|
6950
|
+
/** Inline table style once the column widths are locked, undefined while still auto-layout.
|
|
6951
|
+
* Once locked the table gets an explicit pixel width (the sum of the columns) instead of
|
|
6952
|
+
* the stylesheet's `min-width: max-content`. max-content is re-derived from the cell
|
|
6953
|
+
* contents, so every page that scrolled in with a longer value widened the table and
|
|
6954
|
+
* re-proportioned all columns — the jitter this replaces.
|
|
6955
|
+
* `minWidth: 100%` keeps an auto-measured table stretched to its container, but is dropped
|
|
6956
|
+
* once the user resizes by hand: with it, the space freed by narrowing a column is
|
|
6957
|
+
* redistributed over all columns, so a drag would partly spring back. */
|
|
6958
|
+
lockedTableStyle() {
|
|
6959
|
+
if (this.colWidths.length === 0)
|
|
6960
|
+
return undefined;
|
|
6961
|
+
const total = this.colWidths.reduce((sum, w) => sum + (w || 0), 0);
|
|
6962
|
+
return Object.assign({ tableLayout: 'fixed', width: `${total}px` }, (this.colWidthsUserSet ? {} : { minWidth: '100%' }));
|
|
6963
|
+
}
|
|
6964
|
+
/** The resize handle rendered in the right edge of every header cell. */
|
|
6965
|
+
renderColResizer(idx) {
|
|
6966
|
+
const cls = 'mrd-table__col-resizer' + (this.resizingCol === idx ? ' mrd-table__col-resizer--active' : '');
|
|
6967
|
+
return (h("span", { class: cls, role: "separator", "aria-orientation": "vertical", title: t('column_resize', this.locale), "on-pointerdown": (e) => this.handleResizeStart(e, idx), "on-pointermove": (e) => this.handleResizeMove(e), "on-pointerup": (e) => this.handleResizeEnd(e), "on-pointercancel": (e) => this.handleResizeEnd(e), "on-dblclick": (e) => this.handleResizeAutoFit(e, idx),
|
|
6968
|
+
// The click that follows the drag targets this handle; swallow it so it never
|
|
6969
|
+
// bubbles to the header and triggers a sort or the filter popup.
|
|
6970
|
+
onClick: (e) => e.stopPropagation() }));
|
|
6971
|
+
}
|
|
6839
6972
|
// ── Paging / scroll helpers ────────────────────────────────────────────────
|
|
6840
6973
|
visibleCount() {
|
|
6841
6974
|
return visibleCount(this.tableHeight, this.rowHeight);
|
|
@@ -6919,6 +7052,17 @@ const MrdTable = class {
|
|
|
6919
7052
|
activeFilters: this.activeFilters.values(),
|
|
6920
7053
|
});
|
|
6921
7054
|
}
|
|
7055
|
+
/** True when the table is in paginated / virtual-scroll mode rather than driven by the
|
|
7056
|
+
* rows prop. Mirrors the branch taken in render().
|
|
7057
|
+
*
|
|
7058
|
+
* The filter handlers gate their reload on this. They used to test minKnownTotal, which is
|
|
7059
|
+
* 0 after a filter returned no rows at all — so clearing that filter reloaded nothing and
|
|
7060
|
+
* the table stayed empty. Hosts that omit totalElements have the same problem, hence the
|
|
7061
|
+
* sticky flag rather than loadedPages.size: resetPages() clears the loaded pages, and the
|
|
7062
|
+
* mode must not flip back to the rows prop (and its "no results") while page 0 is in flight. */
|
|
7063
|
+
get isPaginated() {
|
|
7064
|
+
return this.totalElements > 0 || this.paginationActivated;
|
|
7065
|
+
}
|
|
6922
7066
|
get columns() {
|
|
6923
7067
|
var _a, _b, _c;
|
|
6924
7068
|
return ((_c = (_b = (_a = this.allViews[this.activeViewIdx]) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.values) !== null && _c !== void 0 ? _c : []);
|
|
@@ -7000,8 +7144,13 @@ const MrdTable = class {
|
|
|
7000
7144
|
this.failedPages = new Set();
|
|
7001
7145
|
this.requestedAt.clear();
|
|
7002
7146
|
this.retryAttempts.clear();
|
|
7003
|
-
|
|
7004
|
-
|
|
7147
|
+
// A sort or filter change keeps the same columns, so hand-set widths survive it —
|
|
7148
|
+
// re-measuring would throw away what the user just dragged. Auto-measured widths are
|
|
7149
|
+
// dropped so they can be re-derived from the new first page.
|
|
7150
|
+
if (!this.colWidthsUserSet) {
|
|
7151
|
+
this.colWidths = [];
|
|
7152
|
+
this.colWidthMeasureScheduled = false;
|
|
7153
|
+
}
|
|
7005
7154
|
this.scrollTop = 0;
|
|
7006
7155
|
this.renderStart = 0;
|
|
7007
7156
|
this.minKnownTotal = 0;
|
|
@@ -7012,18 +7161,8 @@ const MrdTable = class {
|
|
|
7012
7161
|
if (scroller)
|
|
7013
7162
|
scroller.scrollTop = 0;
|
|
7014
7163
|
}
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
if (this.sortField === name) {
|
|
7018
|
-
this.sortDir = this.sortDir === 'asc' ? 'desc' : 'asc';
|
|
7019
|
-
}
|
|
7020
|
-
else {
|
|
7021
|
-
this.sortField = name;
|
|
7022
|
-
this.sortDir = 'asc';
|
|
7023
|
-
}
|
|
7024
|
-
this.resetPages();
|
|
7025
|
-
this.emitPagesForWindow(this.renderStart, this.renderEnd);
|
|
7026
|
-
}
|
|
7164
|
+
/** Sorting runs through the column popup's sort section (applySort); there is no
|
|
7165
|
+
* separate click-to-sort mode any more. */
|
|
7027
7166
|
applySort(col, dir) {
|
|
7028
7167
|
this.sortField = this.colName(col);
|
|
7029
7168
|
this.sortDir = dir;
|
|
@@ -7129,11 +7268,6 @@ const MrdTable = class {
|
|
|
7129
7268
|
this.requestedPages = requested;
|
|
7130
7269
|
}
|
|
7131
7270
|
// ── Filter helpers ─────────────────────────────────────────────────────────
|
|
7132
|
-
handleFilterToggle() {
|
|
7133
|
-
this.filterMode = !this.filterMode;
|
|
7134
|
-
if (!this.filterMode)
|
|
7135
|
-
this.closeFilterPopup();
|
|
7136
|
-
}
|
|
7137
7271
|
handleFilterOpen(col, e) {
|
|
7138
7272
|
e.stopPropagation();
|
|
7139
7273
|
const btn = e.currentTarget;
|
|
@@ -7240,7 +7374,7 @@ const MrdTable = class {
|
|
|
7240
7374
|
this.aggregations = null;
|
|
7241
7375
|
this.aggregationsTotal = null;
|
|
7242
7376
|
this.aggregationsPending = true;
|
|
7243
|
-
if (this.
|
|
7377
|
+
if (this.isPaginated) {
|
|
7244
7378
|
this.resetPages();
|
|
7245
7379
|
this.emitPagesForWindow(this.renderStart, this.renderEnd);
|
|
7246
7380
|
}
|
|
@@ -7255,7 +7389,7 @@ const MrdTable = class {
|
|
|
7255
7389
|
this.aggregations = null;
|
|
7256
7390
|
this.aggregationsTotal = null;
|
|
7257
7391
|
this.aggregationsPending = true;
|
|
7258
|
-
if (this.
|
|
7392
|
+
if (this.isPaginated) {
|
|
7259
7393
|
this.resetPages();
|
|
7260
7394
|
this.emitPagesForWindow(this.renderStart, this.renderEnd);
|
|
7261
7395
|
}
|
|
@@ -7265,7 +7399,7 @@ const MrdTable = class {
|
|
|
7265
7399
|
this.aggregations = null;
|
|
7266
7400
|
this.aggregationsTotal = null;
|
|
7267
7401
|
this.aggregationsPending = true;
|
|
7268
|
-
if (this.
|
|
7402
|
+
if (this.isPaginated) {
|
|
7269
7403
|
this.resetPages();
|
|
7270
7404
|
this.emitPagesForWindow(this.renderStart, this.renderEnd);
|
|
7271
7405
|
}
|
|
@@ -7301,8 +7435,7 @@ const MrdTable = class {
|
|
|
7301
7435
|
// ── Render: toolbar ────────────────────────────────────────────────────────
|
|
7302
7436
|
renderToolbar() {
|
|
7303
7437
|
var _a;
|
|
7304
|
-
return (h(Toolbar, { locale: this.locale,
|
|
7305
|
-
onFilterToggle: () => this.handleFilterToggle(),
|
|
7438
|
+
return (h(Toolbar, { locale: this.locale, filterCount: this.activeFilters.size, actions: this.tableActions, views: this.allViews, activeViewIdx: this.activeViewIdx, viewPopoverOpen: this.viewPopoverOpen, createPickerOpen: this.createPickerOpen, createTypes: (_a = this.item) === null || _a === void 0 ? void 0 : _a.createTypes, cb: {
|
|
7306
7439
|
onClearAllFilters: () => this.clearAllFilters(),
|
|
7307
7440
|
onViewSwitch: idx => this.handleViewSwitch(idx),
|
|
7308
7441
|
onToggleViewPopover: e => this.toggleViewPopover(e),
|
|
@@ -7335,7 +7468,7 @@ const MrdTable = class {
|
|
|
7335
7468
|
// ── Render: footer ────────────────────────────────────────────────────────
|
|
7336
7469
|
renderFooter(rowCount, effectiveTotal, isTotalKnown = true) {
|
|
7337
7470
|
// Non-paginated mode: totalElements=0 and no paginated data loaded yet
|
|
7338
|
-
if (this.
|
|
7471
|
+
if (!this.isPaginated) {
|
|
7339
7472
|
const count = rowCount !== null && rowCount !== void 0 ? rowCount : 0;
|
|
7340
7473
|
if (count === 0)
|
|
7341
7474
|
return null;
|
|
@@ -7369,17 +7502,18 @@ const MrdTable = class {
|
|
|
7369
7502
|
// ── Non-paginated mode ──────────────────────────────────────────────────
|
|
7370
7503
|
// Only enter non-paginated mode when totalElements is 0 AND no paginated data
|
|
7371
7504
|
// has been loaded yet — prevents the wrong branch when the host omits totalElements.
|
|
7372
|
-
if (this.
|
|
7373
|
-
return (h(Host, null, this.renderToolbar(), h("div", { class: "mrd-table" }, h("table", { class: "mrd-table__table" }, h("thead", null, h("tr", null, this.columns.map(col => {
|
|
7505
|
+
if (!this.isPaginated) {
|
|
7506
|
+
return (h(Host, { class: { 'mrd-table--resizing': this.resizingCol !== null } }, this.renderToolbar(), h("div", { class: "mrd-table" }, h("table", { class: "mrd-table__table", style: this.lockedTableStyle() }, h("thead", null, h("tr", null, this.columns.map((col, idx) => {
|
|
7374
7507
|
var _a;
|
|
7375
7508
|
const name = this.colName(col);
|
|
7376
7509
|
const isFiltered = this.activeFilters.has(name);
|
|
7510
|
+
const isInteractive = !NON_INTERACTIVE_TYPES.has(this.colDataType(col));
|
|
7377
7511
|
const cls = [
|
|
7378
7512
|
'mrd-table__header',
|
|
7379
7513
|
isFiltered ? 'mrd-table__header--filtered' : '',
|
|
7380
|
-
|
|
7514
|
+
isInteractive ? 'mrd-table__header--sortable' : '',
|
|
7381
7515
|
].filter(Boolean).join(' ');
|
|
7382
|
-
return (h("th", { class: cls,
|
|
7516
|
+
return (h("th", { class: cls, style: this.colWidths[idx] ? { width: `${this.colWidths[idx]}px` } : undefined, onClick: isInteractive ? (e) => this.handleFilterOpen(col, e) : undefined }, h("span", { class: "mrd-table__header-label" }, (_a = col.label) !== null && _a !== void 0 ? _a : ''), isFiltered && h(FilterIcon, null), this.renderColResizer(idx)));
|
|
7383
7517
|
}))), h("tbody", null, (_b = this.rows) === null || _b === void 0 ? void 0 : _b.map((row, i) => (h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit({ row }) }, this.columns.map(col => this.renderCell(col, row)))))), this.renderTotalsRow()), (!this.rows || this.rows.length === 0) && (h("p", { class: "mrd-table__empty" }, t('no_results', this.locale)))), this.renderFooter((_c = this.rows) === null || _c === void 0 ? void 0 : _c.length), this.renderFilterPopup(), this.renderTextblockModal(), this.renderJsonModal()));
|
|
7384
7518
|
}
|
|
7385
7519
|
// ── Paginated / virtual-scroll mode ────────────────────────────────────
|
|
@@ -7393,9 +7527,13 @@ const MrdTable = class {
|
|
|
7393
7527
|
const colCount = this.columns.length;
|
|
7394
7528
|
const topSpacerHeight = this.renderStart * this.rowHeight;
|
|
7395
7529
|
const bottomSpacerHeight = Math.max(0, (effectiveTotal - 1 - clampedEnd) * this.rowHeight);
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7530
|
+
// Once the widths are frozen the table gets an explicit pixel width (the sum of the
|
|
7531
|
+
// locked columns) instead of the stylesheet's `min-width: max-content`. max-content is
|
|
7532
|
+
// re-derived from the cell contents, so every page that scrolled in with a longer value
|
|
7533
|
+
// widened the table and re-proportioned all columns — the jitter this replaces.
|
|
7534
|
+
// `minWidth: 100%` keeps a narrow table stretched to the container (and still responsive
|
|
7535
|
+
// to container resizes) without ever consulting the content again.
|
|
7536
|
+
const tableStyle = this.lockedTableStyle();
|
|
7399
7537
|
const renderedRows = [];
|
|
7400
7538
|
for (let i = this.renderStart; i <= clampedEnd; i++) {
|
|
7401
7539
|
const row = this.getRow(i);
|
|
@@ -7420,7 +7558,7 @@ const MrdTable = class {
|
|
|
7420
7558
|
}) }, this.columns.map(col => this.renderCell(col, row))));
|
|
7421
7559
|
}
|
|
7422
7560
|
}
|
|
7423
|
-
return (h(Host, null, this.renderToolbar(), h("div", { class: "mrd-table__scroll", style: { height: `${this.tableHeight}px` }, onScroll: this.handleScroll }, h("table", { class: "mrd-table__table", style: tableStyle }, h("thead", null, h("tr", null, this.columns.map((col, idx) => {
|
|
7561
|
+
return (h(Host, { class: { 'mrd-table--resizing': this.resizingCol !== null } }, this.renderToolbar(), h("div", { class: "mrd-table__scroll", style: { height: `${this.tableHeight}px` }, onScroll: this.handleScroll }, h("table", { class: "mrd-table__table", style: tableStyle }, h("thead", null, h("tr", null, this.columns.map((col, idx) => {
|
|
7424
7562
|
var _a;
|
|
7425
7563
|
const name = this.colName(col);
|
|
7426
7564
|
const isActive = this.sortField === name;
|
|
@@ -7432,7 +7570,7 @@ const MrdTable = class {
|
|
|
7432
7570
|
isActive ? `mrd-table__header--sorted-${this.sortDir}` : '',
|
|
7433
7571
|
isFiltered ? 'mrd-table__header--filtered' : '',
|
|
7434
7572
|
].filter(Boolean).join(' ');
|
|
7435
|
-
return (h("th", { class: cls, style: this.colWidths[idx] ? { width: `${this.colWidths[idx]}px` } : undefined, onClick: isInteractive ? ((e) => this.
|
|
7573
|
+
return (h("th", { class: cls, style: this.colWidths[idx] ? { width: `${this.colWidths[idx]}px` } : undefined, onClick: isInteractive ? ((e) => this.handleFilterOpen(col, e)) : undefined }, h("span", { class: "mrd-table__header-label" }, (_a = col.label) !== null && _a !== void 0 ? _a : ''), isInteractive && isActive && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, this.sortDir === 'asc' ? '▲' : '▼')), isInteractive && !isActive && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, "\u21C5")), isInteractive && isFiltered && h(FilterIcon, null), this.renderColResizer(idx)));
|
|
7436
7574
|
}))), h("tbody", null, topSpacerHeight > 0 && (h("tr", { class: "mrd-table__spacer", style: { height: `${topSpacerHeight}px` } }, h("td", { colSpan: colCount }))), renderedRows, bottomSpacerHeight > 0 && (h("tr", { class: "mrd-table__spacer", style: { height: `${bottomSpacerHeight}px` } }, h("td", { colSpan: colCount })))), this.renderTotalsRow())), effectiveTotal === 0 && this.loadedPages.has(0) && (h("p", { class: "mrd-table__empty" }, t('no_results', this.locale))), effectiveTotal > 0 && this.renderFooter(undefined, effectiveTotal, this.isTotalKnown()), this.renderFilterPopup(), this.renderTextblockModal(), this.renderJsonModal()));
|
|
7437
7575
|
}
|
|
7438
7576
|
renderTextblockModal() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-CDiBvvJU.js';
|
|
2
2
|
import { a as ClientLayoutItemType } from './client-layout-Bc42CfJB.js';
|
|
3
|
-
import { t, C as CellRenderer, a as formatDate } from './cell-renderer-
|
|
3
|
+
import { t, C as CellRenderer, a as formatDate } from './cell-renderer-B8rJpnq8.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Whether a layout item can appear in the merge diff at all. m-n relations
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-renderer-B8u5BCK-.js","sources":["src/utils/cell-renderer.ts"],"sourcesContent":["import { formatNumber, formatPercentage, formatCurrency, formatDate, formatDateTime, formatTime } from './format';\nimport { ClientLayoutItem, ClientLayoutItemType } from '../types/client-layout';\n\n/** TableColumn is an alias for ClientLayoutItem — used for table column definitions. */\nexport type TableColumn = ClientLayoutItem;\n\n/** One entry in the alternativeViews array for mrd-table. */\nexport interface AlternativeView {\n /** Named view identifier, emitted in mrdSwitchView. */\n name: string;\n /** Display text; falls back to name when absent. */\n label?: string;\n /** Optional class override (TypeFQN); emitted in mrdSwitchView. */\n class?: string;\n}\n\n/** Defines a toolbar action button for mrd-table. */\nexport interface TableAction {\n /** Machine-readable identifier, e.g. 'create' | 'export'. Emitted in mrdAction event. */\n action: string;\n /** Tooltip text (and label fallback when no icon is provided). */\n label: string;\n /** SVG sprite href, e.g. \"assets/sprites.svg#icon-plus\". Optional. */\n icon?: string;\n /** Button style variant. Defaults to 'secondary'. */\n variant?: 'primary' | 'secondary' | 'danger';\n disabled?: boolean;\n basicType?: string;\n}\n\n/** Represents an active filter on a single column. */\nexport interface ColumnFilter {\n field: string;\n dataType: string;\n /** Text operator — only relevant for text-like data types. */\n operator?: 'contains' | 'startsWith' | 'equals' | 'isEmpty' | 'isNotEmpty';\n /** Single value (boolean, exact text/number/date). */\n value?: string | number | boolean | null;\n /** Range start (≥) — future API support. */\n from?: string | number | null;\n /** Range end (≤) — future API support. */\n to?: string | number | null;\n /** LIST: keys of selected items to include. */\n values?: string[];\n}\n\nexport class CellRenderer {\n static render(column: TableColumn, row: Record<string, any>, locale: string): string {\n if (column.type === ClientLayoutItemType.RELATION) {\n const name = column.name ?? '';\n const link = row?._links?.[name];\n if (!link) return '';\n if (Array.isArray(link)) return link.map((l: any) => l.name ?? '').filter(Boolean).join(', ');\n return link.name ?? '';\n }\n\n if (column.type !== ClientLayoutItemType.FIELD) return '';\n\n const name = column.name ?? '';\n const dataType = column.dataType;\n const listItems = column.listItems;\n let raw = row?.[name];\n // History-enabled fields are stored as { current, history: [...] } — render\n // the current value, same as mrd-layout-section's field rendering.\n if (column.historyEnabled && raw != null && typeof raw === 'object' && !Array.isArray(raw) && 'current' in raw) {\n raw = (raw as any).current;\n }\n if (raw == null || raw === '') return '';\n\n const values = Array.isArray(raw) ? raw : [raw];\n return values\n .map(v => CellRenderer.renderValue(dataType ?? 'TEXT', v, listItems ?? [], locale))\n .filter(s => s !== '')\n .join(', ');\n }\n\n static renderValue(\n dataType: string,\n value: any,\n listItems: Array<{ key: string; label: string }>,\n locale: string,\n ): string {\n switch (dataType) {\n case 'INTEGER':\n return formatNumber(Number(value), locale, { maximumFractionDigits: 0 });\n case 'DECIMAL':\n return formatNumber(Number(value), locale);\n case 'PERCENTAGE':\n return formatPercentage(Number(value), locale);\n case 'CURRENCY': {\n const { amount, currency } = typeof value === 'object' && value !== null\n ? value\n : { amount: value, currency: '' };\n return currency\n ? formatCurrency(Number(amount), currency, locale)\n : formatNumber(Number(amount), locale);\n }\n case 'DATE':\n return formatDate(value, locale);\n case 'DATETIME':\n return formatDateTime(value, locale);\n case 'TIME':\n return formatTime(value, locale);\n case 'BOOLEAN':\n return value ? '✓' : '';\n case 'FILE':\n case 'IMAGE':\n return typeof value === 'object' && value !== null ? (value.fileName ?? '') : '';\n case 'LIST': {\n const item = listItems.find(li => li.key === String(value));\n return item?.label ?? String(value);\n }\n case 'TEXTBLOCK': {\n const stripped = String(value).replace(/<[^>]*>/g, '');\n const txt = document.createElement('textarea');\n txt.innerHTML = stripped;\n return txt.value.trim();\n }\n case 'LONGTEXT':\n return String(value).replace(/[\\r\\n]+/g, ' ').trim();\n case 'JSON': {\n const str = typeof value === 'object' ? JSON.stringify(value) : String(value);\n return str.replace(/[\\r\\n]+/g, ' ').trim();\n }\n case 'SECRET':\n return value ? '••••••••' : '';\n default:\n return String(value);\n }\n }\n\n /**\n * Returns syntax-highlighted JSON as an HTML string with inline styles.\n * compact=true → single line (no indentation); compact=false → pretty-printed.\n */\n static formatJson(value: any, compact = false): string {\n try {\n const parsed = typeof value === 'string' ? JSON.parse(value) : value;\n const json = compact ? JSON.stringify(parsed) : JSON.stringify(parsed, null, 2);\n return json.replace(\n /(\"(\\\\u[a-zA-Z0-9]{4}|\\\\[^u]|[^\\\\\"])*\"(\\s*:)?|\\b(true|false|null)\\b|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)/g,\n match => {\n let style = 'color:#2aa198';\n if (/^\"/.test(match)) {\n style = /:$/.test(match) ? 'color:#881391' : 'color:#268bd2';\n } else if (/true|false/.test(match)) {\n style = 'color:#b58900';\n } else if (/null/.test(match)) {\n style = 'color:#dc322f';\n }\n return `<span style=\"${style}\">${match}</span>`;\n },\n );\n } catch {\n return String(value);\n }\n }\n}\n"],"names":[],"mappings":"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"}
|