@mesgflow/ui-kit 0.10.0 → 0.11.1

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.
@@ -1227,18 +1227,24 @@ class Table {
1227
1227
  scroller = viewChild.required('scroller', /* @ts-ignore */
1228
1228
  ...(ngDevMode ? [{ debugName: "scroller" }] : /* istanbul ignore next */ []));
1229
1229
  idPrefix = `mf-table-${++tableIdSeq}`;
1230
- pageState = signal({
1231
- pageNumber: 1,
1232
- pageSize: DEFAULT_PAGE_SIZE,
1233
- }, /* @ts-ignore */
1234
- ...(ngDevMode ? [{ debugName: "pageState" }] : /* istanbul ignore next */ []));
1235
- sortState = signal([], /* @ts-ignore */
1236
- ...(ngDevMode ? [{ debugName: "sortState" }] : /* istanbul ignore next */ []));
1237
- searchTerm = signal('', /* @ts-ignore */
1238
- ...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
1239
- appliedFilters = signal([], /* @ts-ignore */
1240
- ...(ngDevMode ? [{ debugName: "appliedFilters" }] : /* istanbul ignore next */ []));
1241
- filterLogic = signal(FilterLogic.And, /* @ts-ignore */
1230
+ /*
1231
+ * Sorgu durumu — beşi de `model()`: verilmezse tablo durumunu kendisi tutar
1232
+ * (eski davranış); `[(page)]`/`[(sort)]`/`[(search)]`/`[(filters)]`/
1233
+ * `[(filterLogic)]` ile bağlanırsa dıştan (ör. URL query param'larından)
1234
+ * yazılabilir ve arayüz (footer sayfası, sıralama okları, filtre chip'leri,
1235
+ * arama kutusu) senkron olur. Dıştan yazma `queryChange` YAYMAZ (döngü
1236
+ * olmasın — dışarıdaki zaten yeni durumu biliyor, yüklemeyi kendisi başlatır);
1237
+ * kullanıcı etkileşimi modelleri günceller VE `queryChange`'i bir kez yayar.
1238
+ */
1239
+ page = model({ pageNumber: 1, pageSize: DEFAULT_PAGE_SIZE }, /* @ts-ignore */
1240
+ ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
1241
+ sort = model([], /* @ts-ignore */
1242
+ ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
1243
+ search = model('', /* @ts-ignore */
1244
+ ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
1245
+ filters = model([], /* @ts-ignore */
1246
+ ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
1247
+ filterLogic = model(FilterLogic.And, /* @ts-ignore */
1242
1248
  ...(ngDevMode ? [{ debugName: "filterLogic" }] : /* istanbul ignore next */ []));
1243
1249
  selectedRows = signal(new Map(), /* @ts-ignore */
1244
1250
  ...(ngDevMode ? [{ debugName: "selectedRows" }] : /* istanbul ignore next */ []));
@@ -1299,9 +1305,9 @@ class Table {
1299
1305
  ...(ngDevMode ? [{ debugName: "layoutTick" }] : /* istanbul ignore next */ []));
1300
1306
  hasFilterableColumns = computed(() => this.columns().some((c) => c.filter), /* @ts-ignore */
1301
1307
  ...(ngDevMode ? [{ debugName: "hasFilterableColumns" }] : /* istanbul ignore next */ []));
1302
- activeFilterCount = computed(() => this.appliedFilters().length, /* @ts-ignore */
1308
+ activeFilterCount = computed(() => this.filters().length, /* @ts-ignore */
1303
1309
  ...(ngDevMode ? [{ debugName: "activeFilterCount" }] : /* istanbul ignore next */ []));
1304
- isFiltered = computed(() => !!this.searchTerm().trim() || this.appliedFilters().length > 0, /* @ts-ignore */
1310
+ isFiltered = computed(() => !!this.search().trim() || this.filters().length > 0, /* @ts-ignore */
1305
1311
  ...(ngDevMode ? [{ debugName: "isFiltered" }] : /* istanbul ignore next */ []));
1306
1312
  hasRowActions = computed(() => !!(this.rowActions().edit || this.rowActions().delete), /* @ts-ignore */
1307
1313
  ...(ngDevMode ? [{ debugName: "hasRowActions" }] : /* istanbul ignore next */ []));
@@ -1316,10 +1322,10 @@ class Table {
1316
1322
  const filtered = this.isFiltered()
1317
1323
  ? rows.filter((row) => matchesFilterGroup(row, this.buildFilter()))
1318
1324
  : [...rows];
1319
- const sorted = sortRows(filtered, this.sortState());
1325
+ const sorted = sortRows(filtered, this.sort());
1320
1326
  if (this.virtual())
1321
1327
  return { items: sorted, total: filtered.length };
1322
- const { pageNumber, pageSize } = this.pageState();
1328
+ const { pageNumber, pageSize } = this.page();
1323
1329
  const start = (pageNumber - 1) * pageSize;
1324
1330
  return { items: sorted.slice(start, start + pageSize), total: filtered.length };
1325
1331
  }, /* @ts-ignore */
@@ -1345,7 +1351,7 @@ class Table {
1345
1351
  ...(ngDevMode ? [{ debugName: "rowIndexOffset" }] : /* istanbul ignore next */ []));
1346
1352
  isStickyHeader = computed(() => this.stickyHeader() || this.virtual(), /* @ts-ignore */
1347
1353
  ...(ngDevMode ? [{ debugName: "isStickyHeader" }] : /* istanbul ignore next */ []));
1348
- skeletonIndexes = computed(() => Array.from({ length: Math.min(this.pageState().pageSize, 8) }, (_, i) => i), /* @ts-ignore */
1354
+ skeletonIndexes = computed(() => Array.from({ length: Math.min(this.page().pageSize, 8) }, (_, i) => i), /* @ts-ignore */
1349
1355
  ...(ngDevMode ? [{ debugName: "skeletonIndexes" }] : /* istanbul ignore next */ []));
1350
1356
  /** `overflow-x-auto` HER ZAMAN gerekli (dar viewport'ta yatay kaydırma olmadan tablo taşıp sağdaki satır aksiyonlarını görünmez kılıyordu). `stickyHeader` ek olarak dikey kaydırma+sabit başlık ekliyor. */
1351
1357
  scrollWrapperClasses = computed(() => cn('overflow-x-auto', this.virtual() && 'overflow-y-auto overscroll-contain', this.stickyHeader() && !this.virtual() && 'max-h-[28rem] overflow-y-auto'), /* @ts-ignore */
@@ -1614,8 +1620,8 @@ class Table {
1614
1620
  }
1615
1621
  /** `SearchInput` kendi debounce'unu zaten uyguladı — burada gelen değer commit edilmiş (nihai). */
1616
1622
  onSearchCommit(value) {
1617
- this.searchTerm.set(value);
1618
- this.pageState.update((p) => ({ ...p, pageNumber: 1 }));
1623
+ this.search.set(value);
1624
+ this.page.update((p) => ({ ...p, pageNumber: 1 }));
1619
1625
  this.emitQuery();
1620
1626
  }
1621
1627
  /**
@@ -1628,34 +1634,34 @@ class Table {
1628
1634
  onSortClick(column, event) {
1629
1635
  if (!column.sortable)
1630
1636
  return;
1631
- const current = this.sortState();
1637
+ const current = this.sort();
1632
1638
  const index = current.findIndex((s) => s.field === column.field);
1633
1639
  if (!event?.shiftKey) {
1634
1640
  if (current.length === 1 && index === 0) {
1635
1641
  const next = current[0].direction === SortDirection.Ascending
1636
1642
  ? [{ field: column.field, direction: SortDirection.Descending }]
1637
1643
  : [];
1638
- this.sortState.set(next);
1644
+ this.sort.set(next);
1639
1645
  }
1640
1646
  else {
1641
- this.sortState.set([{ field: column.field, direction: SortDirection.Ascending }]);
1647
+ this.sort.set([{ field: column.field, direction: SortDirection.Ascending }]);
1642
1648
  }
1643
1649
  }
1644
1650
  else if (index === -1) {
1645
1651
  if (current.length >= 3)
1646
1652
  return;
1647
- this.sortState.set([...current, { field: column.field, direction: SortDirection.Ascending }]);
1653
+ this.sort.set([...current, { field: column.field, direction: SortDirection.Ascending }]);
1648
1654
  }
1649
1655
  else {
1650
1656
  const entry = current[index];
1651
- this.sortState.set(entry.direction === SortDirection.Ascending
1657
+ this.sort.set(entry.direction === SortDirection.Ascending
1652
1658
  ? current.map((s, i) => (i === index ? { ...s, direction: SortDirection.Descending } : s))
1653
1659
  : current.filter((_, i) => i !== index));
1654
1660
  }
1655
1661
  this.emitQuery();
1656
1662
  }
1657
1663
  sortDirectionFor(field) {
1658
- return this.sortState().find((s) => s.field === field)?.direction ?? null;
1664
+ return this.sort().find((s) => s.field === field)?.direction ?? null;
1659
1665
  }
1660
1666
  /** WAI-ARIA `aria-sort` — ekran okuyucu sütunun sıralama yönünü duyurur (yalnızca sıralanabilir sütunlarda). */
1661
1667
  ariaSortFor(field) {
@@ -1664,33 +1670,33 @@ class Table {
1664
1670
  }
1665
1671
  /** 1 tabanlı sıra konumu — yalnızca 2+ alan aktifken gösterilir (tekil sıralamada numara gürültü olurdu). */
1666
1672
  sortOrderFor(field) {
1667
- if (this.sortState().length < 2)
1673
+ if (this.sort().length < 2)
1668
1674
  return null;
1669
- const index = this.sortState().findIndex((s) => s.field === field);
1675
+ const index = this.sort().findIndex((s) => s.field === field);
1670
1676
  return index === -1 ? null : index + 1;
1671
1677
  }
1672
1678
  onFiltersChange(filters) {
1673
- this.appliedFilters.set(filters);
1674
- this.pageState.update((p) => ({ ...p, pageNumber: 1 }));
1679
+ this.filters.set(filters);
1680
+ this.page.update((p) => ({ ...p, pageNumber: 1 }));
1675
1681
  this.emitQuery();
1676
1682
  }
1677
1683
  onFilterLogicChange(logic) {
1678
1684
  this.filterLogic.set(logic);
1679
- if (this.appliedFilters().length > 1)
1685
+ if (this.filters().length > 1)
1680
1686
  this.emitQuery();
1681
1687
  }
1682
1688
  clearAllFilters() {
1683
- this.searchTerm.set('');
1684
- this.appliedFilters.set([]);
1685
- this.pageState.update((p) => ({ ...p, pageNumber: 1 }));
1689
+ this.search.set('');
1690
+ this.filters.set([]);
1691
+ this.page.update((p) => ({ ...p, pageNumber: 1 }));
1686
1692
  this.emitQuery();
1687
1693
  }
1688
1694
  onPageChange(page) {
1689
- this.pageState.update((p) => ({ ...p, pageNumber: page }));
1695
+ this.page.update((p) => ({ ...p, pageNumber: page }));
1690
1696
  this.emitQuery();
1691
1697
  }
1692
1698
  onPageSizeChange(size) {
1693
- this.pageState.set({ pageNumber: 1, pageSize: size });
1699
+ this.page.set({ pageNumber: 1, pageSize: size });
1694
1700
  this.emitQuery();
1695
1701
  }
1696
1702
  toggleDensity() {
@@ -1728,9 +1734,9 @@ class Table {
1728
1734
  this.selectionChange.emit([]);
1729
1735
  }
1730
1736
  buildFilter() {
1731
- const term = this.searchTerm().trim();
1737
+ const term = this.search().trim();
1732
1738
  const searchGroup = term ? this.searchGroupFor(term) : undefined;
1733
- const chipGroup = buildFilterGroup(this.appliedFilters(), this.filterLogic());
1739
+ const chipGroup = buildFilterGroup(this.filters(), this.filterLogic());
1734
1740
  if (searchGroup && chipGroup)
1735
1741
  return { logic: FilterLogic.And, groups: [searchGroup, chipGroup] };
1736
1742
  return searchGroup ?? chipGroup;
@@ -1754,13 +1760,13 @@ class Table {
1754
1760
  if (this.clientSide())
1755
1761
  return;
1756
1762
  this.queryChange.emit(canonicalPagedRequest({
1757
- page: this.pageState(),
1758
- sort: this.sortState(),
1763
+ page: this.page(),
1764
+ sort: this.sort(),
1759
1765
  filter: this.buildFilter(),
1760
1766
  }));
1761
1767
  }
1762
1768
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component });
1763
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Table, isStandalone: true, selector: "mf-table", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, clientSide: { classPropertyName: "clientSide", publicName: "clientSide", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, expandedRowTemplate: { classPropertyName: "expandedRowTemplate", publicName: "expandedRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, virtual: { classPropertyName: "virtual", publicName: "virtual", isSignal: true, isRequired: false, transformFunction: null }, virtualHeight: { classPropertyName: "virtualHeight", publicName: "virtualHeight", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { density: "densityChange", columnWidths: "columnWidthsChange", queryChange: "queryChange", selectionChange: "selectionChange", edit: "edit", delete: "delete", rowDblClick: "rowDblClick", rowExpandedChange: "rowExpandedChange" }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }], exportAs: ["mfTable"], ngImport: i0, template: "<div class=\"relative overflow-hidden rounded-lg border border-hairline bg-surface\">\r\n @if (showStaleOverlay()) {\r\n <div\r\n class=\"pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary-tint\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"h-full w-1/4 animate-progress-slide bg-accent-fill\"></div>\r\n </div>\r\n }\r\n\r\n <!--\r\n Sat\u0131r 1 \u2014 toolbar. Se\u00E7im modunda da AYNI kal\u0131r: eskiden bir sat\u0131r\r\n se\u00E7ilince ba\u015Fl\u0131k+arama+filtre tamamen kaybolup yerine \"N se\u00E7ildi\"\r\n geliyordu (ger\u00E7ek bug, kullan\u0131c\u0131 arama/filtre ba\u011Flam\u0131n\u0131 kaybediyordu).\r\n Art\u0131k sadece Sat\u0131r 2 (a\u015Fa\u011F\u0131da) se\u00E7im aksiyonlar\u0131na devrediliyor.\r\n -->\r\n <div class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3\">\r\n <div class=\"flex min-w-0 items-center gap-2.5\">\r\n @if (title()) {\r\n <h3 class=\"truncate font-display text-title text-fg\">{{ title() }}</h3>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-1 flex-wrap items-center justify-end gap-2\">\r\n @if (searchable()) {\r\n <mf-search-input\r\n [collapsible]=\"false\"\r\n [value]=\"searchTerm()\"\r\n [placeholder]=\"effectiveLabels().searchPlaceholder\"\r\n [ariaLabel]=\"effectiveLabels().searchPlaceholder\"\r\n [loading]=\"loading()\"\r\n (valueChange)=\"onSearchCommit($event)\"\r\n />\r\n }\r\n\r\n <!-- Kolonlar + Yo\u011Funluk: B\u0130LEREK hayalet (text/icon) kal\u0131yor \u2014 g\u00F6z [tableActions]'daki ger\u00E7ek CTA'ya gitsin diye (bkz. table.ts s\u0131n\u0131f yorumu, toolbar hiyerar\u015Fisi bulgusu). -->\r\n <div class=\"flex items-center gap-0.5\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n cdkOverlayOrigin\r\n #columnsOrigin=\"cdkOverlayOrigin\"\r\n [mfTooltip]=\"effectiveLabels().columns\"\r\n [attr.aria-label]=\"effectiveLabels().columns\"\r\n (click)=\"columnsMenuOpen.set(!columnsMenuOpen())\"\r\n >\r\n <span mfIcon [size]=\"18\">view_column</span>\r\n </button>\r\n <mf-table-columns-menu\r\n [columns]=\"columns()\"\r\n [hidden]=\"hiddenColumns()\"\r\n [origin]=\"columnsOrigin\"\r\n [open]=\"columnsMenuOpen()\"\r\n [label]=\"effectiveLabels().columns\"\r\n (hiddenChange)=\"onHiddenColumnsChange($event)\"\r\n (closed)=\"columnsMenuOpen.set(false)\"\r\n />\r\n\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [mfTooltip]=\"densityToggleTooltip()\"\r\n [attr.aria-label]=\"densityToggleTooltip()\"\r\n (click)=\"toggleDensity()\"\r\n >\r\n <span mfIcon [size]=\"18\">{{\r\n density() === 'comfortable' ? 'density_medium' : 'density_small'\r\n }}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[tableActions]\" />\r\n </div>\r\n </div>\r\n\r\n <!-- Sat\u0131r 2 \u2014 ya filtre \u00E7ubu\u011Fu ya se\u00E7im \u00E7ubu\u011Fu, ASLA ikisi birden. -->\r\n @if (selectedCount() > 0) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-surface-sunken px-4 py-2\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clearSelection\"\r\n (click)=\"clearSelection()\"\r\n >\r\n <span mfIcon [size]=\"18\">close</span>\r\n </button>\r\n <span class=\"text-sm font-medium text-fg-muted tabular-nums\"\r\n >{{ selectedCount() }} {{ effectiveLabels().selectedCount }}</span\r\n >\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-content select=\"[tableBulkActions]\" />\r\n @if (activeFilterCount() > 0) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-full bg-surface-alt px-2 py-0.5 text-xs text-fg-subtle\"\r\n >\r\n <span mfIcon [size]=\"12\">filter_list</span>\r\n {{ activeFilterCount() }} {{ effectiveLabels().filterCount }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n } @else if (hasFilterableColumns()) {\r\n <mf-table-filter-bar\r\n [columns]=\"columns()\"\r\n [filters]=\"appliedFilters()\"\r\n [logic]=\"filterLogic()\"\r\n [labels]=\"effectiveLabels().filter\"\r\n (filtersChange)=\"onFiltersChange($event)\"\r\n (logicChange)=\"onFilterLogicChange($event)\"\r\n />\r\n }\r\n\r\n <div\r\n #scroller\r\n [class]=\"scrollWrapperClasses()\"\r\n [style.max-height]=\"virtual() ? virtualHeight() : null\"\r\n (scroll)=\"onScroll($event)\"\r\n >\r\n <table\r\n [class]=\"cn('border-collapse text-sm', fixedLayout() ? 'min-w-full table-fixed' : 'w-full')\"\r\n [style.width.px]=\"tableWidth()\"\r\n [attr.aria-rowcount]=\"virtual() ? rows().length + 1 : null\"\r\n >\r\n <thead\r\n [class]=\"\r\n cn(\r\n 'bg-surface-sunken',\r\n isStickyHeader() ? 'sticky top-0 z-10 border-b border-border-strong' : ''\r\n )\r\n \"\r\n >\r\n <tr class=\"border-b border-hairline\" [attr.aria-rowindex]=\"virtual() ? 1 : null\">\r\n @if (selectable()) {\r\n <th\r\n data-pin=\"__select\"\r\n [class]=\"cn('w-10 px-4', headerCellPad(), pinHeadClasses('__select'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"allChecked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [attr.aria-label]=\"effectiveLabels().selectAllAriaLabel\"\r\n (change)=\"onCheckAll($any($event.target).checked)\"\r\n />\r\n </th>\r\n }\r\n @if (expandable()) {\r\n <th\r\n data-pin=\"__expand\"\r\n [class]=\"cn('w-10 px-1.5', headerCellPad(), pinHeadClasses('__expand'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <span class=\"sr-only\">{{ effectiveLabels().expandRow }}</span>\r\n </th>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <th\r\n [attr.data-col]=\"col.field\"\r\n [attr.aria-sort]=\"col.sortable ? ariaSortFor(col.field) : null\"\r\n [attr.data-pin]=\"col.pinned === 'left' ? col.field : null\"\r\n [class]=\"\r\n cn(\r\n 'group/th relative truncate px-4 text-eyebrow text-fg-subtle',\r\n headerCellPad(),\r\n alignClass(resolvedAlign(col)),\r\n pinHeadClasses(col.field)\r\n )\r\n \"\r\n [style.width]=\"widthStyle(col)\"\r\n [style.min-width.px]=\"col.minWidth ?? null\"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n >\r\n @if (col.sortable) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-1 rounded-xs border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n (click)=\"onSortClick(col, $event)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (sortOrderFor(col.field); as order) {\r\n <span class=\"text-caption font-bold text-accent tabular-nums\">{{ order }}</span>\r\n }\r\n <span\r\n mfIcon\r\n [size]=\"14\"\r\n [class]=\"\r\n sortDirectionFor(col.field) !== null\r\n ? 'text-accent'\r\n : 'text-fg-subtle opacity-0 transition-opacity duration-fast group-hover/th:opacity-100'\r\n \"\r\n >\r\n @switch (sortDirectionFor(col.field)) {\r\n @case (0) {\r\n arrow_upward\r\n }\r\n @case (1) {\r\n arrow_downward\r\n }\r\n @default {\r\n unfold_more\r\n }\r\n }\r\n </span>\r\n </button>\r\n } @else {\r\n <span>{{ col.header }}</span>\r\n }\r\n @if (isResizable(col)) {\r\n <span\r\n mfTableResizeHandle\r\n [label]=\"resizeAriaLabel(col)\"\r\n [width]=\"currentWidth(col)\"\r\n [min]=\"col.minWidth ?? 80\"\r\n (resizeStart)=\"freezeWidths()\"\r\n (widthChange)=\"onColumnResize(col, $event)\"\r\n (autofit)=\"autofitColumn(col)\"\r\n ></span>\r\n }\r\n </th>\r\n }\r\n @if (hasRowActions()) {\r\n <th [class]=\"cn('sticky end-0 z-[1] w-20 bg-surface-sunken px-4', headerCellPad())\">\r\n <span class=\"sr-only\">{{ effectiveLabels().actionsColumnLabel }}</span>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (showSkeleton()) {\r\n @for (i of skeletonIndexes(); track i) {\r\n <tr class=\"border-b border-hairline\">\r\n @if (selectable()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"><div mfSkeleton class=\"h-4 w-4\"></div></td>\r\n }\r\n @if (expandable()) {\r\n <td [class]=\"cn('px-1.5', bodyCellPad())\"></td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\">\r\n <div mfSkeleton class=\"h-4 w-full max-w-[10rem]\"></div>\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"></td>\r\n }\r\n </tr>\r\n }\r\n } @else if (rows().length === 0) {\r\n <tr>\r\n <td [attr.colspan]=\"columnSpan()\" class=\"px-4 py-6\">\r\n <mf-empty-state\r\n class=\"block\"\r\n [title]=\"\r\n isFiltered() ? effectiveLabels().noResultsTitle : effectiveLabels().emptyTitle\r\n \"\r\n [description]=\"\r\n isFiltered()\r\n ? effectiveLabels().noResultsDescription\r\n : effectiveLabels().emptyDescription\r\n \"\r\n >\r\n <span icon mfIcon [size]=\"28\">{{ isFiltered() ? 'search_off' : 'inbox' }}</span>\r\n @if (isFiltered()) {\r\n <button\r\n action\r\n mfButton\r\n appearance=\"text\"\r\n tone=\"primary\"\r\n type=\"button\"\r\n (click)=\"clearAllFilters()\"\r\n >\r\n {{ effectiveLabels().clearFilters }}\r\n </button>\r\n }\r\n </mf-empty-state>\r\n </td>\r\n </tr>\r\n } @else {\r\n @if (virtualRange(); as range) {\r\n @if (range.top > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.top\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n @for (row of displayRows(); track trackByRow($index, row)) {\r\n <tr\r\n data-row\r\n [class]=\"rowClasses(row)\"\r\n [attr.aria-rowindex]=\"virtual() ? rowIndexOffset() + $index + 2 : null\"\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n >\r\n @if (selectable()) {\r\n <td\r\n [class]=\"cn('px-4', bodyCellPad(), pinBodyClasses('__select', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"isChecked(row)\"\r\n [attr.aria-label]=\"rowSelectAriaLabel(row)\"\r\n (change)=\"onCheckRow(row, $any($event.target).checked)\"\r\n />\r\n </td>\r\n }\r\n @if (expandable()) {\r\n <td\r\n [class]=\"cn('px-1.5', bodyCellPad(), pinBodyClasses('__expand', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex size-7 appearance-none items-center justify-center rounded-md border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-state-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n [attr.aria-expanded]=\"isExpanded(row)\"\r\n [attr.aria-controls]=\"isExpanded(row) ? expandedRowId($index) : null\"\r\n [attr.aria-label]=\"expandAriaLabel(row)\"\r\n (click)=\"toggleExpanded(row)\"\r\n >\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"transition-transform duration-base ease-emphasis rtl:-scale-x-100\"\r\n [class.rotate-90]=\"isExpanded(row)\"\r\n [class.rtl:-rotate-90]=\"isExpanded(row)\"\r\n >chevron_right</span\r\n >\r\n </button>\r\n </td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td\r\n [attr.data-col]=\"col.field\"\r\n [class]=\"\r\n cn(\r\n 'max-w-0 px-4',\r\n bodyCellPad(),\r\n cellClasses(col),\r\n alignClass(resolvedAlign(col)),\r\n pinBodyClasses(col.field, row)\r\n )\r\n \"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n [title]=\"!col.cellTemplate ? cellText(row, col) : null\"\r\n >\r\n @if (col.cellTemplate) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.cellTemplate; context: { $implicit: row }\"\r\n />\r\n } @else {\r\n <span>{{ row[col.field] }}</span>\r\n }\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"stickyActionClasses(row)\">\r\n <div\r\n class=\"flex items-center justify-end gap-1 opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/row:opacity-100 group-focus-within/row:opacity-100\"\r\n >\r\n @if (rowActions().edit) {\r\n <!--\r\n `tone=\"info\"` (mavi) B\u0130LEREK `neutral` DE\u011E\u0130L \u2014 sat\u0131r\r\n hover'\u0131 zaten `bg-surface-alt` boyuyor (bkz. rowBg()),\r\n `neutral`'\u0131n kendi `hover:bg-state-hover`'\u0131 AYNI renk\r\n oldu\u011Fundan buton \u00FCzerine gelince g\u00F6rsel hi\u00E7bir \u015Fey\r\n de\u011Fi\u015Fmiyordu (ger\u00E7ek kullan\u0131c\u0131 bulgusu). Delete'in\r\n `danger` (k\u0131rm\u0131z\u0131 ton) hover'\u0131 bu sorunu ya\u015Fam\u0131yordu \u2014\r\n ayn\u0131 mant\u0131k: Edit'e de arka planla \u00E7ak\u0131\u015Fmayan kendi\r\n renk tonu (mavi `info/5`) verildi.\r\n -->\r\n <button\r\n mfButton\r\n tone=\"info\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().edit\"\r\n [mfTooltip]=\"effectiveLabels().edit\"\r\n (click)=\"edit.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">edit</span>\r\n </button>\r\n }\r\n @if (rowActions().delete) {\r\n <button\r\n mfButton\r\n tone=\"danger\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().delete\"\r\n [mfTooltip]=\"effectiveLabels().delete\"\r\n (click)=\"delete.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">delete</span>\r\n </button>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (expandable() && isExpanded(row)) {\r\n <tr [id]=\"expandedRowId($index)\" class=\"border-b border-b-hairline bg-surface-sunken\">\r\n <td [attr.colspan]=\"columnSpan()\" class=\"p-0\">\r\n <!-- Yatay kayd\u0131rmada ayr\u0131nt\u0131 g\u00F6r\u00FCn\u00FCr alanda sabit kal\u0131r (tablo geni\u015Fli\u011Fiyle kaymaz). -->\r\n <div\r\n class=\"sticky start-0 box-border px-4 py-3\"\r\n [style.width.px]=\"viewportWidth() || null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"expandedRowTemplate()!; context: { $implicit: row }\"\r\n />\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @if (virtualRange(); as range) {\r\n @if (range.bottom > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.bottom\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div class=\"border-t border-border bg-surface-sunken\">\r\n @if (virtual()) {\r\n <p class=\"px-4 py-2.5 text-sm text-fg-muted tabular-nums\">\r\n {{ rowsTotal() }} {{ effectiveLabels().pagination.records }}\r\n </p>\r\n } @else {\r\n <mf-table-pagination\r\n [page]=\"pageState().pageNumber\"\r\n [pageSize]=\"pageState().pageSize\"\r\n [total]=\"rowsTotal()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n [labels]=\"effectiveLabels().pagination\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"\r\n />\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: Checkbox, selector: "input[type=checkbox][mfCheckbox]", inputs: ["size", "indeterminate"] }, { kind: "component", type: Skeleton, selector: "[mfSkeleton]", inputs: ["variant", "lines"] }, { kind: "component", type: EmptyState, selector: "mf-empty-state", inputs: ["title", "description"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: TableFilterBar, selector: "mf-table-filter-bar", inputs: ["columns", "filters", "logic", "labels"], outputs: ["filtersChange", "logicChange"] }, { kind: "component", type: TableColumnsMenu, selector: "mf-table-columns-menu", inputs: ["columns", "hidden", "origin", "open", "label"], outputs: ["hiddenChange", "closed"] }, { kind: "component", type: TablePagination, selector: "mf-table-pagination", inputs: ["page", "pageSize", "total", "pageSizeOptions", "labels"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: TableResizeHandle, selector: "[mfTableResizeHandle]", inputs: ["label", "width", "min", "max"], outputs: ["resizeStart", "widthChange", "autofit"] }, { kind: "component", type: SearchInput, selector: "mf-search-input", inputs: ["value", "placeholder", "inputId", "ariaLabel", "tooltipLabel", "loading", "debounceMs", "collapsible", "fullWidth"], outputs: ["valueChange"], exportAs: ["mfSearchInput"] }, { kind: "directive", type: Tooltip, selector: "[mfTooltip], [mfTooltipContent]", inputs: ["mfTooltip", "mfTooltipContent", "tooltipPosition"], exportAs: ["mfTooltip"] }] });
1769
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Table, isStandalone: true, selector: "mf-table", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, clientSide: { classPropertyName: "clientSide", publicName: "clientSide", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, expandedRowTemplate: { classPropertyName: "expandedRowTemplate", publicName: "expandedRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, virtual: { classPropertyName: "virtual", publicName: "virtual", isSignal: true, isRequired: false, transformFunction: null }, virtualHeight: { classPropertyName: "virtualHeight", publicName: "virtualHeight", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, filterLogic: { classPropertyName: "filterLogic", publicName: "filterLogic", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { density: "densityChange", columnWidths: "columnWidthsChange", queryChange: "queryChange", selectionChange: "selectionChange", edit: "edit", delete: "delete", rowDblClick: "rowDblClick", rowExpandedChange: "rowExpandedChange", page: "pageChange", sort: "sortChange", search: "searchChange", filters: "filtersChange", filterLogic: "filterLogicChange" }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }], exportAs: ["mfTable"], ngImport: i0, template: "<div class=\"relative overflow-hidden rounded-lg border border-hairline bg-surface\">\r\n @if (showStaleOverlay()) {\r\n <div\r\n class=\"pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary-tint\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"h-full w-1/4 animate-progress-slide bg-accent-fill\"></div>\r\n </div>\r\n }\r\n\r\n <!--\r\n Sat\u0131r 1 \u2014 toolbar. Se\u00E7im modunda da AYNI kal\u0131r: eskiden bir sat\u0131r\r\n se\u00E7ilince ba\u015Fl\u0131k+arama+filtre tamamen kaybolup yerine \"N se\u00E7ildi\"\r\n geliyordu (ger\u00E7ek bug, kullan\u0131c\u0131 arama/filtre ba\u011Flam\u0131n\u0131 kaybediyordu).\r\n Art\u0131k sadece Sat\u0131r 2 (a\u015Fa\u011F\u0131da) se\u00E7im aksiyonlar\u0131na devrediliyor.\r\n -->\r\n <div class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3\">\r\n <div class=\"flex min-w-0 items-center gap-2.5\">\r\n @if (title()) {\r\n <h3 class=\"truncate font-display text-title text-fg\">{{ title() }}</h3>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-1 flex-wrap items-center justify-end gap-2\">\r\n @if (searchable()) {\r\n <mf-search-input\r\n [collapsible]=\"false\"\r\n [value]=\"search()\"\r\n [placeholder]=\"effectiveLabels().searchPlaceholder\"\r\n [ariaLabel]=\"effectiveLabels().searchPlaceholder\"\r\n [loading]=\"loading()\"\r\n (valueChange)=\"onSearchCommit($event)\"\r\n />\r\n }\r\n\r\n <!-- Kolonlar + Yo\u011Funluk: B\u0130LEREK hayalet (text/icon) kal\u0131yor \u2014 g\u00F6z [tableActions]'daki ger\u00E7ek CTA'ya gitsin diye (bkz. table.ts s\u0131n\u0131f yorumu, toolbar hiyerar\u015Fisi bulgusu). -->\r\n <div class=\"flex items-center gap-0.5\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n cdkOverlayOrigin\r\n #columnsOrigin=\"cdkOverlayOrigin\"\r\n [mfTooltip]=\"effectiveLabels().columns\"\r\n [attr.aria-label]=\"effectiveLabels().columns\"\r\n (click)=\"columnsMenuOpen.set(!columnsMenuOpen())\"\r\n >\r\n <span mfIcon [size]=\"18\">view_column</span>\r\n </button>\r\n <mf-table-columns-menu\r\n [columns]=\"columns()\"\r\n [hidden]=\"hiddenColumns()\"\r\n [origin]=\"columnsOrigin\"\r\n [open]=\"columnsMenuOpen()\"\r\n [label]=\"effectiveLabels().columns\"\r\n (hiddenChange)=\"onHiddenColumnsChange($event)\"\r\n (closed)=\"columnsMenuOpen.set(false)\"\r\n />\r\n\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [mfTooltip]=\"densityToggleTooltip()\"\r\n [attr.aria-label]=\"densityToggleTooltip()\"\r\n (click)=\"toggleDensity()\"\r\n >\r\n <span mfIcon [size]=\"18\">{{\r\n density() === 'comfortable' ? 'density_medium' : 'density_small'\r\n }}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[tableActions]\" />\r\n </div>\r\n </div>\r\n\r\n <!-- Sat\u0131r 2 \u2014 ya filtre \u00E7ubu\u011Fu ya se\u00E7im \u00E7ubu\u011Fu, ASLA ikisi birden. -->\r\n @if (selectedCount() > 0) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-surface-sunken px-4 py-2\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clearSelection\"\r\n (click)=\"clearSelection()\"\r\n >\r\n <span mfIcon [size]=\"18\">close</span>\r\n </button>\r\n <span class=\"text-sm font-medium text-fg-muted tabular-nums\"\r\n >{{ selectedCount() }} {{ effectiveLabels().selectedCount }}</span\r\n >\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-content select=\"[tableBulkActions]\" />\r\n @if (activeFilterCount() > 0) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-full bg-surface-alt px-2 py-0.5 text-xs text-fg-subtle\"\r\n >\r\n <span mfIcon [size]=\"12\">filter_list</span>\r\n {{ activeFilterCount() }} {{ effectiveLabels().filterCount }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n } @else if (hasFilterableColumns()) {\r\n <mf-table-filter-bar\r\n [columns]=\"columns()\"\r\n [filters]=\"filters()\"\r\n [logic]=\"filterLogic()\"\r\n [labels]=\"effectiveLabels().filter\"\r\n (filtersChange)=\"onFiltersChange($event)\"\r\n (logicChange)=\"onFilterLogicChange($event)\"\r\n />\r\n }\r\n\r\n <div\r\n #scroller\r\n [class]=\"scrollWrapperClasses()\"\r\n [style.max-height]=\"virtual() ? virtualHeight() : null\"\r\n (scroll)=\"onScroll($event)\"\r\n >\r\n <table\r\n [class]=\"cn('border-collapse text-sm', fixedLayout() ? 'min-w-full table-fixed' : 'w-full')\"\r\n [style.width.px]=\"tableWidth()\"\r\n [attr.aria-rowcount]=\"virtual() ? rows().length + 1 : null\"\r\n >\r\n <thead\r\n [class]=\"\r\n cn(\r\n 'bg-surface-sunken',\r\n isStickyHeader() ? 'sticky top-0 z-10 border-b border-border-strong' : ''\r\n )\r\n \"\r\n >\r\n <tr class=\"border-b border-hairline\" [attr.aria-rowindex]=\"virtual() ? 1 : null\">\r\n @if (selectable()) {\r\n <th\r\n data-pin=\"__select\"\r\n [class]=\"cn('w-10 px-4', headerCellPad(), pinHeadClasses('__select'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"allChecked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [attr.aria-label]=\"effectiveLabels().selectAllAriaLabel\"\r\n (change)=\"onCheckAll($any($event.target).checked)\"\r\n />\r\n </th>\r\n }\r\n @if (expandable()) {\r\n <th\r\n data-pin=\"__expand\"\r\n [class]=\"cn('w-10 px-1.5', headerCellPad(), pinHeadClasses('__expand'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <span class=\"sr-only\">{{ effectiveLabels().expandRow }}</span>\r\n </th>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <th\r\n [attr.data-col]=\"col.field\"\r\n [attr.aria-sort]=\"col.sortable ? ariaSortFor(col.field) : null\"\r\n [attr.data-pin]=\"col.pinned === 'left' ? col.field : null\"\r\n [class]=\"\r\n cn(\r\n 'group/th relative truncate px-4 text-eyebrow text-fg-subtle',\r\n headerCellPad(),\r\n alignClass(resolvedAlign(col)),\r\n pinHeadClasses(col.field)\r\n )\r\n \"\r\n [style.width]=\"widthStyle(col)\"\r\n [style.min-width.px]=\"col.minWidth ?? null\"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n >\r\n @if (col.sortable) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-1 rounded-xs border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n (click)=\"onSortClick(col, $event)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (sortOrderFor(col.field); as order) {\r\n <span class=\"text-caption font-bold text-accent tabular-nums\">{{ order }}</span>\r\n }\r\n <span\r\n mfIcon\r\n [size]=\"14\"\r\n [class]=\"\r\n sortDirectionFor(col.field) !== null\r\n ? 'text-accent'\r\n : 'text-fg-subtle opacity-0 transition-opacity duration-fast group-hover/th:opacity-100'\r\n \"\r\n >\r\n @switch (sortDirectionFor(col.field)) {\r\n @case (0) {\r\n arrow_upward\r\n }\r\n @case (1) {\r\n arrow_downward\r\n }\r\n @default {\r\n unfold_more\r\n }\r\n }\r\n </span>\r\n </button>\r\n } @else {\r\n <span>{{ col.header }}</span>\r\n }\r\n @if (isResizable(col)) {\r\n <span\r\n mfTableResizeHandle\r\n [label]=\"resizeAriaLabel(col)\"\r\n [width]=\"currentWidth(col)\"\r\n [min]=\"col.minWidth ?? 80\"\r\n (resizeStart)=\"freezeWidths()\"\r\n (widthChange)=\"onColumnResize(col, $event)\"\r\n (autofit)=\"autofitColumn(col)\"\r\n ></span>\r\n }\r\n </th>\r\n }\r\n @if (hasRowActions()) {\r\n <th [class]=\"cn('sticky end-0 z-[1] w-20 bg-surface-sunken px-4', headerCellPad())\">\r\n <span class=\"sr-only\">{{ effectiveLabels().actionsColumnLabel }}</span>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (showSkeleton()) {\r\n @for (i of skeletonIndexes(); track i) {\r\n <tr class=\"border-b border-hairline\">\r\n @if (selectable()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"><div mfSkeleton class=\"h-4 w-4\"></div></td>\r\n }\r\n @if (expandable()) {\r\n <td [class]=\"cn('px-1.5', bodyCellPad())\"></td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\">\r\n <div mfSkeleton class=\"h-4 w-full max-w-[10rem]\"></div>\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"></td>\r\n }\r\n </tr>\r\n }\r\n } @else if (rows().length === 0) {\r\n <tr>\r\n <td [attr.colspan]=\"columnSpan()\" class=\"px-4 py-6\">\r\n <mf-empty-state\r\n class=\"block\"\r\n [title]=\"\r\n isFiltered() ? effectiveLabels().noResultsTitle : effectiveLabels().emptyTitle\r\n \"\r\n [description]=\"\r\n isFiltered()\r\n ? effectiveLabels().noResultsDescription\r\n : effectiveLabels().emptyDescription\r\n \"\r\n >\r\n <span icon mfIcon [size]=\"28\">{{ isFiltered() ? 'search_off' : 'inbox' }}</span>\r\n @if (isFiltered()) {\r\n <button\r\n action\r\n mfButton\r\n appearance=\"text\"\r\n tone=\"primary\"\r\n type=\"button\"\r\n (click)=\"clearAllFilters()\"\r\n >\r\n {{ effectiveLabels().clearFilters }}\r\n </button>\r\n }\r\n </mf-empty-state>\r\n </td>\r\n </tr>\r\n } @else {\r\n @if (virtualRange(); as range) {\r\n @if (range.top > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.top\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n @for (row of displayRows(); track trackByRow($index, row)) {\r\n <tr\r\n data-row\r\n [class]=\"rowClasses(row)\"\r\n [attr.aria-rowindex]=\"virtual() ? rowIndexOffset() + $index + 2 : null\"\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n >\r\n @if (selectable()) {\r\n <td\r\n [class]=\"cn('px-4', bodyCellPad(), pinBodyClasses('__select', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"isChecked(row)\"\r\n [attr.aria-label]=\"rowSelectAriaLabel(row)\"\r\n (change)=\"onCheckRow(row, $any($event.target).checked)\"\r\n />\r\n </td>\r\n }\r\n @if (expandable()) {\r\n <td\r\n [class]=\"cn('px-1.5', bodyCellPad(), pinBodyClasses('__expand', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex size-7 appearance-none items-center justify-center rounded-md border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-state-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n [attr.aria-expanded]=\"isExpanded(row)\"\r\n [attr.aria-controls]=\"isExpanded(row) ? expandedRowId($index) : null\"\r\n [attr.aria-label]=\"expandAriaLabel(row)\"\r\n (click)=\"toggleExpanded(row)\"\r\n >\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"transition-transform duration-base ease-emphasis rtl:-scale-x-100\"\r\n [class.rotate-90]=\"isExpanded(row)\"\r\n [class.rtl:-rotate-90]=\"isExpanded(row)\"\r\n >chevron_right</span\r\n >\r\n </button>\r\n </td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td\r\n [attr.data-col]=\"col.field\"\r\n [class]=\"\r\n cn(\r\n 'max-w-0 px-4',\r\n bodyCellPad(),\r\n cellClasses(col),\r\n alignClass(resolvedAlign(col)),\r\n pinBodyClasses(col.field, row)\r\n )\r\n \"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n [title]=\"!col.cellTemplate ? cellText(row, col) : null\"\r\n >\r\n @if (col.cellTemplate) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.cellTemplate; context: { $implicit: row }\"\r\n />\r\n } @else {\r\n <span>{{ row[col.field] }}</span>\r\n }\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"stickyActionClasses(row)\">\r\n <div\r\n class=\"flex items-center justify-end gap-1 opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/row:opacity-100 group-focus-within/row:opacity-100\"\r\n >\r\n @if (rowActions().edit) {\r\n <!--\r\n `tone=\"info\"` (mavi) B\u0130LEREK `neutral` DE\u011E\u0130L \u2014 sat\u0131r\r\n hover'\u0131 zaten `bg-surface-alt` boyuyor (bkz. rowBg()),\r\n `neutral`'\u0131n kendi `hover:bg-state-hover`'\u0131 AYNI renk\r\n oldu\u011Fundan buton \u00FCzerine gelince g\u00F6rsel hi\u00E7bir \u015Fey\r\n de\u011Fi\u015Fmiyordu (ger\u00E7ek kullan\u0131c\u0131 bulgusu). Delete'in\r\n `danger` (k\u0131rm\u0131z\u0131 ton) hover'\u0131 bu sorunu ya\u015Fam\u0131yordu \u2014\r\n ayn\u0131 mant\u0131k: Edit'e de arka planla \u00E7ak\u0131\u015Fmayan kendi\r\n renk tonu (mavi `info/5`) verildi.\r\n -->\r\n <button\r\n mfButton\r\n tone=\"info\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().edit\"\r\n [mfTooltip]=\"effectiveLabels().edit\"\r\n (click)=\"edit.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">edit</span>\r\n </button>\r\n }\r\n @if (rowActions().delete) {\r\n <button\r\n mfButton\r\n tone=\"danger\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().delete\"\r\n [mfTooltip]=\"effectiveLabels().delete\"\r\n (click)=\"delete.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">delete</span>\r\n </button>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (expandable() && isExpanded(row)) {\r\n <tr [id]=\"expandedRowId($index)\" class=\"border-b border-b-hairline bg-surface-sunken\">\r\n <td [attr.colspan]=\"columnSpan()\" class=\"p-0\">\r\n <!-- Yatay kayd\u0131rmada ayr\u0131nt\u0131 g\u00F6r\u00FCn\u00FCr alanda sabit kal\u0131r (tablo geni\u015Fli\u011Fiyle kaymaz). -->\r\n <div\r\n class=\"sticky start-0 box-border px-4 py-3\"\r\n [style.width.px]=\"viewportWidth() || null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"expandedRowTemplate()!; context: { $implicit: row }\"\r\n />\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @if (virtualRange(); as range) {\r\n @if (range.bottom > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.bottom\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div class=\"border-t border-border bg-surface-sunken\">\r\n @if (virtual()) {\r\n <p class=\"px-4 py-2.5 text-sm text-fg-muted tabular-nums\">\r\n {{ rowsTotal() }} {{ effectiveLabels().pagination.records }}\r\n </p>\r\n } @else {\r\n <mf-table-pagination\r\n [page]=\"page().pageNumber\"\r\n [pageSize]=\"page().pageSize\"\r\n [total]=\"rowsTotal()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n [labels]=\"effectiveLabels().pagination\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"\r\n />\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }, { kind: "directive", type: Checkbox, selector: "input[type=checkbox][mfCheckbox]", inputs: ["size", "indeterminate"] }, { kind: "component", type: Skeleton, selector: "[mfSkeleton]", inputs: ["variant", "lines"] }, { kind: "component", type: EmptyState, selector: "mf-empty-state", inputs: ["title", "description"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: TableFilterBar, selector: "mf-table-filter-bar", inputs: ["columns", "filters", "logic", "labels"], outputs: ["filtersChange", "logicChange"] }, { kind: "component", type: TableColumnsMenu, selector: "mf-table-columns-menu", inputs: ["columns", "hidden", "origin", "open", "label"], outputs: ["hiddenChange", "closed"] }, { kind: "component", type: TablePagination, selector: "mf-table-pagination", inputs: ["page", "pageSize", "total", "pageSizeOptions", "labels"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: TableResizeHandle, selector: "[mfTableResizeHandle]", inputs: ["label", "width", "min", "max"], outputs: ["resizeStart", "widthChange", "autofit"] }, { kind: "component", type: SearchInput, selector: "mf-search-input", inputs: ["value", "placeholder", "inputId", "ariaLabel", "tooltipLabel", "loading", "debounceMs", "collapsible", "fullWidth"], outputs: ["valueChange"], exportAs: ["mfSearchInput"] }, { kind: "directive", type: Tooltip, selector: "[mfTooltip], [mfTooltipContent]", inputs: ["mfTooltip", "mfTooltipContent", "tooltipPosition"], exportAs: ["mfTooltip"] }] });
1764
1770
  }
1765
1771
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Table, decorators: [{
1766
1772
  type: Component,
@@ -1778,8 +1784,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
1778
1784
  TableResizeHandle,
1779
1785
  SearchInput,
1780
1786
  Tooltip,
1781
- ], host: { class: 'block' }, template: "<div class=\"relative overflow-hidden rounded-lg border border-hairline bg-surface\">\r\n @if (showStaleOverlay()) {\r\n <div\r\n class=\"pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary-tint\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"h-full w-1/4 animate-progress-slide bg-accent-fill\"></div>\r\n </div>\r\n }\r\n\r\n <!--\r\n Sat\u0131r 1 \u2014 toolbar. Se\u00E7im modunda da AYNI kal\u0131r: eskiden bir sat\u0131r\r\n se\u00E7ilince ba\u015Fl\u0131k+arama+filtre tamamen kaybolup yerine \"N se\u00E7ildi\"\r\n geliyordu (ger\u00E7ek bug, kullan\u0131c\u0131 arama/filtre ba\u011Flam\u0131n\u0131 kaybediyordu).\r\n Art\u0131k sadece Sat\u0131r 2 (a\u015Fa\u011F\u0131da) se\u00E7im aksiyonlar\u0131na devrediliyor.\r\n -->\r\n <div class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3\">\r\n <div class=\"flex min-w-0 items-center gap-2.5\">\r\n @if (title()) {\r\n <h3 class=\"truncate font-display text-title text-fg\">{{ title() }}</h3>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-1 flex-wrap items-center justify-end gap-2\">\r\n @if (searchable()) {\r\n <mf-search-input\r\n [collapsible]=\"false\"\r\n [value]=\"searchTerm()\"\r\n [placeholder]=\"effectiveLabels().searchPlaceholder\"\r\n [ariaLabel]=\"effectiveLabels().searchPlaceholder\"\r\n [loading]=\"loading()\"\r\n (valueChange)=\"onSearchCommit($event)\"\r\n />\r\n }\r\n\r\n <!-- Kolonlar + Yo\u011Funluk: B\u0130LEREK hayalet (text/icon) kal\u0131yor \u2014 g\u00F6z [tableActions]'daki ger\u00E7ek CTA'ya gitsin diye (bkz. table.ts s\u0131n\u0131f yorumu, toolbar hiyerar\u015Fisi bulgusu). -->\r\n <div class=\"flex items-center gap-0.5\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n cdkOverlayOrigin\r\n #columnsOrigin=\"cdkOverlayOrigin\"\r\n [mfTooltip]=\"effectiveLabels().columns\"\r\n [attr.aria-label]=\"effectiveLabels().columns\"\r\n (click)=\"columnsMenuOpen.set(!columnsMenuOpen())\"\r\n >\r\n <span mfIcon [size]=\"18\">view_column</span>\r\n </button>\r\n <mf-table-columns-menu\r\n [columns]=\"columns()\"\r\n [hidden]=\"hiddenColumns()\"\r\n [origin]=\"columnsOrigin\"\r\n [open]=\"columnsMenuOpen()\"\r\n [label]=\"effectiveLabels().columns\"\r\n (hiddenChange)=\"onHiddenColumnsChange($event)\"\r\n (closed)=\"columnsMenuOpen.set(false)\"\r\n />\r\n\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [mfTooltip]=\"densityToggleTooltip()\"\r\n [attr.aria-label]=\"densityToggleTooltip()\"\r\n (click)=\"toggleDensity()\"\r\n >\r\n <span mfIcon [size]=\"18\">{{\r\n density() === 'comfortable' ? 'density_medium' : 'density_small'\r\n }}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[tableActions]\" />\r\n </div>\r\n </div>\r\n\r\n <!-- Sat\u0131r 2 \u2014 ya filtre \u00E7ubu\u011Fu ya se\u00E7im \u00E7ubu\u011Fu, ASLA ikisi birden. -->\r\n @if (selectedCount() > 0) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-surface-sunken px-4 py-2\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clearSelection\"\r\n (click)=\"clearSelection()\"\r\n >\r\n <span mfIcon [size]=\"18\">close</span>\r\n </button>\r\n <span class=\"text-sm font-medium text-fg-muted tabular-nums\"\r\n >{{ selectedCount() }} {{ effectiveLabels().selectedCount }}</span\r\n >\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-content select=\"[tableBulkActions]\" />\r\n @if (activeFilterCount() > 0) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-full bg-surface-alt px-2 py-0.5 text-xs text-fg-subtle\"\r\n >\r\n <span mfIcon [size]=\"12\">filter_list</span>\r\n {{ activeFilterCount() }} {{ effectiveLabels().filterCount }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n } @else if (hasFilterableColumns()) {\r\n <mf-table-filter-bar\r\n [columns]=\"columns()\"\r\n [filters]=\"appliedFilters()\"\r\n [logic]=\"filterLogic()\"\r\n [labels]=\"effectiveLabels().filter\"\r\n (filtersChange)=\"onFiltersChange($event)\"\r\n (logicChange)=\"onFilterLogicChange($event)\"\r\n />\r\n }\r\n\r\n <div\r\n #scroller\r\n [class]=\"scrollWrapperClasses()\"\r\n [style.max-height]=\"virtual() ? virtualHeight() : null\"\r\n (scroll)=\"onScroll($event)\"\r\n >\r\n <table\r\n [class]=\"cn('border-collapse text-sm', fixedLayout() ? 'min-w-full table-fixed' : 'w-full')\"\r\n [style.width.px]=\"tableWidth()\"\r\n [attr.aria-rowcount]=\"virtual() ? rows().length + 1 : null\"\r\n >\r\n <thead\r\n [class]=\"\r\n cn(\r\n 'bg-surface-sunken',\r\n isStickyHeader() ? 'sticky top-0 z-10 border-b border-border-strong' : ''\r\n )\r\n \"\r\n >\r\n <tr class=\"border-b border-hairline\" [attr.aria-rowindex]=\"virtual() ? 1 : null\">\r\n @if (selectable()) {\r\n <th\r\n data-pin=\"__select\"\r\n [class]=\"cn('w-10 px-4', headerCellPad(), pinHeadClasses('__select'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"allChecked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [attr.aria-label]=\"effectiveLabels().selectAllAriaLabel\"\r\n (change)=\"onCheckAll($any($event.target).checked)\"\r\n />\r\n </th>\r\n }\r\n @if (expandable()) {\r\n <th\r\n data-pin=\"__expand\"\r\n [class]=\"cn('w-10 px-1.5', headerCellPad(), pinHeadClasses('__expand'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <span class=\"sr-only\">{{ effectiveLabels().expandRow }}</span>\r\n </th>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <th\r\n [attr.data-col]=\"col.field\"\r\n [attr.aria-sort]=\"col.sortable ? ariaSortFor(col.field) : null\"\r\n [attr.data-pin]=\"col.pinned === 'left' ? col.field : null\"\r\n [class]=\"\r\n cn(\r\n 'group/th relative truncate px-4 text-eyebrow text-fg-subtle',\r\n headerCellPad(),\r\n alignClass(resolvedAlign(col)),\r\n pinHeadClasses(col.field)\r\n )\r\n \"\r\n [style.width]=\"widthStyle(col)\"\r\n [style.min-width.px]=\"col.minWidth ?? null\"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n >\r\n @if (col.sortable) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-1 rounded-xs border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n (click)=\"onSortClick(col, $event)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (sortOrderFor(col.field); as order) {\r\n <span class=\"text-caption font-bold text-accent tabular-nums\">{{ order }}</span>\r\n }\r\n <span\r\n mfIcon\r\n [size]=\"14\"\r\n [class]=\"\r\n sortDirectionFor(col.field) !== null\r\n ? 'text-accent'\r\n : 'text-fg-subtle opacity-0 transition-opacity duration-fast group-hover/th:opacity-100'\r\n \"\r\n >\r\n @switch (sortDirectionFor(col.field)) {\r\n @case (0) {\r\n arrow_upward\r\n }\r\n @case (1) {\r\n arrow_downward\r\n }\r\n @default {\r\n unfold_more\r\n }\r\n }\r\n </span>\r\n </button>\r\n } @else {\r\n <span>{{ col.header }}</span>\r\n }\r\n @if (isResizable(col)) {\r\n <span\r\n mfTableResizeHandle\r\n [label]=\"resizeAriaLabel(col)\"\r\n [width]=\"currentWidth(col)\"\r\n [min]=\"col.minWidth ?? 80\"\r\n (resizeStart)=\"freezeWidths()\"\r\n (widthChange)=\"onColumnResize(col, $event)\"\r\n (autofit)=\"autofitColumn(col)\"\r\n ></span>\r\n }\r\n </th>\r\n }\r\n @if (hasRowActions()) {\r\n <th [class]=\"cn('sticky end-0 z-[1] w-20 bg-surface-sunken px-4', headerCellPad())\">\r\n <span class=\"sr-only\">{{ effectiveLabels().actionsColumnLabel }}</span>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (showSkeleton()) {\r\n @for (i of skeletonIndexes(); track i) {\r\n <tr class=\"border-b border-hairline\">\r\n @if (selectable()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"><div mfSkeleton class=\"h-4 w-4\"></div></td>\r\n }\r\n @if (expandable()) {\r\n <td [class]=\"cn('px-1.5', bodyCellPad())\"></td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\">\r\n <div mfSkeleton class=\"h-4 w-full max-w-[10rem]\"></div>\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"></td>\r\n }\r\n </tr>\r\n }\r\n } @else if (rows().length === 0) {\r\n <tr>\r\n <td [attr.colspan]=\"columnSpan()\" class=\"px-4 py-6\">\r\n <mf-empty-state\r\n class=\"block\"\r\n [title]=\"\r\n isFiltered() ? effectiveLabels().noResultsTitle : effectiveLabels().emptyTitle\r\n \"\r\n [description]=\"\r\n isFiltered()\r\n ? effectiveLabels().noResultsDescription\r\n : effectiveLabels().emptyDescription\r\n \"\r\n >\r\n <span icon mfIcon [size]=\"28\">{{ isFiltered() ? 'search_off' : 'inbox' }}</span>\r\n @if (isFiltered()) {\r\n <button\r\n action\r\n mfButton\r\n appearance=\"text\"\r\n tone=\"primary\"\r\n type=\"button\"\r\n (click)=\"clearAllFilters()\"\r\n >\r\n {{ effectiveLabels().clearFilters }}\r\n </button>\r\n }\r\n </mf-empty-state>\r\n </td>\r\n </tr>\r\n } @else {\r\n @if (virtualRange(); as range) {\r\n @if (range.top > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.top\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n @for (row of displayRows(); track trackByRow($index, row)) {\r\n <tr\r\n data-row\r\n [class]=\"rowClasses(row)\"\r\n [attr.aria-rowindex]=\"virtual() ? rowIndexOffset() + $index + 2 : null\"\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n >\r\n @if (selectable()) {\r\n <td\r\n [class]=\"cn('px-4', bodyCellPad(), pinBodyClasses('__select', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"isChecked(row)\"\r\n [attr.aria-label]=\"rowSelectAriaLabel(row)\"\r\n (change)=\"onCheckRow(row, $any($event.target).checked)\"\r\n />\r\n </td>\r\n }\r\n @if (expandable()) {\r\n <td\r\n [class]=\"cn('px-1.5', bodyCellPad(), pinBodyClasses('__expand', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex size-7 appearance-none items-center justify-center rounded-md border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-state-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n [attr.aria-expanded]=\"isExpanded(row)\"\r\n [attr.aria-controls]=\"isExpanded(row) ? expandedRowId($index) : null\"\r\n [attr.aria-label]=\"expandAriaLabel(row)\"\r\n (click)=\"toggleExpanded(row)\"\r\n >\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"transition-transform duration-base ease-emphasis rtl:-scale-x-100\"\r\n [class.rotate-90]=\"isExpanded(row)\"\r\n [class.rtl:-rotate-90]=\"isExpanded(row)\"\r\n >chevron_right</span\r\n >\r\n </button>\r\n </td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td\r\n [attr.data-col]=\"col.field\"\r\n [class]=\"\r\n cn(\r\n 'max-w-0 px-4',\r\n bodyCellPad(),\r\n cellClasses(col),\r\n alignClass(resolvedAlign(col)),\r\n pinBodyClasses(col.field, row)\r\n )\r\n \"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n [title]=\"!col.cellTemplate ? cellText(row, col) : null\"\r\n >\r\n @if (col.cellTemplate) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.cellTemplate; context: { $implicit: row }\"\r\n />\r\n } @else {\r\n <span>{{ row[col.field] }}</span>\r\n }\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"stickyActionClasses(row)\">\r\n <div\r\n class=\"flex items-center justify-end gap-1 opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/row:opacity-100 group-focus-within/row:opacity-100\"\r\n >\r\n @if (rowActions().edit) {\r\n <!--\r\n `tone=\"info\"` (mavi) B\u0130LEREK `neutral` DE\u011E\u0130L \u2014 sat\u0131r\r\n hover'\u0131 zaten `bg-surface-alt` boyuyor (bkz. rowBg()),\r\n `neutral`'\u0131n kendi `hover:bg-state-hover`'\u0131 AYNI renk\r\n oldu\u011Fundan buton \u00FCzerine gelince g\u00F6rsel hi\u00E7bir \u015Fey\r\n de\u011Fi\u015Fmiyordu (ger\u00E7ek kullan\u0131c\u0131 bulgusu). Delete'in\r\n `danger` (k\u0131rm\u0131z\u0131 ton) hover'\u0131 bu sorunu ya\u015Fam\u0131yordu \u2014\r\n ayn\u0131 mant\u0131k: Edit'e de arka planla \u00E7ak\u0131\u015Fmayan kendi\r\n renk tonu (mavi `info/5`) verildi.\r\n -->\r\n <button\r\n mfButton\r\n tone=\"info\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().edit\"\r\n [mfTooltip]=\"effectiveLabels().edit\"\r\n (click)=\"edit.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">edit</span>\r\n </button>\r\n }\r\n @if (rowActions().delete) {\r\n <button\r\n mfButton\r\n tone=\"danger\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().delete\"\r\n [mfTooltip]=\"effectiveLabels().delete\"\r\n (click)=\"delete.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">delete</span>\r\n </button>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (expandable() && isExpanded(row)) {\r\n <tr [id]=\"expandedRowId($index)\" class=\"border-b border-b-hairline bg-surface-sunken\">\r\n <td [attr.colspan]=\"columnSpan()\" class=\"p-0\">\r\n <!-- Yatay kayd\u0131rmada ayr\u0131nt\u0131 g\u00F6r\u00FCn\u00FCr alanda sabit kal\u0131r (tablo geni\u015Fli\u011Fiyle kaymaz). -->\r\n <div\r\n class=\"sticky start-0 box-border px-4 py-3\"\r\n [style.width.px]=\"viewportWidth() || null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"expandedRowTemplate()!; context: { $implicit: row }\"\r\n />\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @if (virtualRange(); as range) {\r\n @if (range.bottom > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.bottom\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div class=\"border-t border-border bg-surface-sunken\">\r\n @if (virtual()) {\r\n <p class=\"px-4 py-2.5 text-sm text-fg-muted tabular-nums\">\r\n {{ rowsTotal() }} {{ effectiveLabels().pagination.records }}\r\n </p>\r\n } @else {\r\n <mf-table-pagination\r\n [page]=\"pageState().pageNumber\"\r\n [pageSize]=\"pageState().pageSize\"\r\n [total]=\"rowsTotal()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n [labels]=\"effectiveLabels().pagination\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"\r\n />\r\n }\r\n </div>\r\n</div>\r\n" }]
1782
- }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }, { type: i0.Output, args: ["densityChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], clientSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "clientSide", required: false }] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], expandedRowTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRowTemplate", required: false }] }], virtual: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtual", required: false }] }], virtualHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualHeight", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], rowDblClick: [{ type: i0.Output, args: ["rowDblClick"] }], rowExpandedChange: [{ type: i0.Output, args: ["rowExpandedChange"] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }] } });
1787
+ ], host: { class: 'block' }, template: "<div class=\"relative overflow-hidden rounded-lg border border-hairline bg-surface\">\r\n @if (showStaleOverlay()) {\r\n <div\r\n class=\"pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary-tint\"\r\n aria-hidden=\"true\"\r\n >\r\n <div class=\"h-full w-1/4 animate-progress-slide bg-accent-fill\"></div>\r\n </div>\r\n }\r\n\r\n <!--\r\n Sat\u0131r 1 \u2014 toolbar. Se\u00E7im modunda da AYNI kal\u0131r: eskiden bir sat\u0131r\r\n se\u00E7ilince ba\u015Fl\u0131k+arama+filtre tamamen kaybolup yerine \"N se\u00E7ildi\"\r\n geliyordu (ger\u00E7ek bug, kullan\u0131c\u0131 arama/filtre ba\u011Flam\u0131n\u0131 kaybediyordu).\r\n Art\u0131k sadece Sat\u0131r 2 (a\u015Fa\u011F\u0131da) se\u00E7im aksiyonlar\u0131na devrediliyor.\r\n -->\r\n <div class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3\">\r\n <div class=\"flex min-w-0 items-center gap-2.5\">\r\n @if (title()) {\r\n <h3 class=\"truncate font-display text-title text-fg\">{{ title() }}</h3>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-1 flex-wrap items-center justify-end gap-2\">\r\n @if (searchable()) {\r\n <mf-search-input\r\n [collapsible]=\"false\"\r\n [value]=\"search()\"\r\n [placeholder]=\"effectiveLabels().searchPlaceholder\"\r\n [ariaLabel]=\"effectiveLabels().searchPlaceholder\"\r\n [loading]=\"loading()\"\r\n (valueChange)=\"onSearchCommit($event)\"\r\n />\r\n }\r\n\r\n <!-- Kolonlar + Yo\u011Funluk: B\u0130LEREK hayalet (text/icon) kal\u0131yor \u2014 g\u00F6z [tableActions]'daki ger\u00E7ek CTA'ya gitsin diye (bkz. table.ts s\u0131n\u0131f yorumu, toolbar hiyerar\u015Fisi bulgusu). -->\r\n <div class=\"flex items-center gap-0.5\">\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n cdkOverlayOrigin\r\n #columnsOrigin=\"cdkOverlayOrigin\"\r\n [mfTooltip]=\"effectiveLabels().columns\"\r\n [attr.aria-label]=\"effectiveLabels().columns\"\r\n (click)=\"columnsMenuOpen.set(!columnsMenuOpen())\"\r\n >\r\n <span mfIcon [size]=\"18\">view_column</span>\r\n </button>\r\n <mf-table-columns-menu\r\n [columns]=\"columns()\"\r\n [hidden]=\"hiddenColumns()\"\r\n [origin]=\"columnsOrigin\"\r\n [open]=\"columnsMenuOpen()\"\r\n [label]=\"effectiveLabels().columns\"\r\n (hiddenChange)=\"onHiddenColumnsChange($event)\"\r\n (closed)=\"columnsMenuOpen.set(false)\"\r\n />\r\n\r\n <button\r\n mfButton\r\n tone=\"neutral\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [mfTooltip]=\"densityToggleTooltip()\"\r\n [attr.aria-label]=\"densityToggleTooltip()\"\r\n (click)=\"toggleDensity()\"\r\n >\r\n <span mfIcon [size]=\"18\">{{\r\n density() === 'comfortable' ? 'density_medium' : 'density_small'\r\n }}</span>\r\n </button>\r\n </div>\r\n\r\n <ng-content select=\"[tableActions]\" />\r\n </div>\r\n </div>\r\n\r\n <!-- Sat\u0131r 2 \u2014 ya filtre \u00E7ubu\u011Fu ya se\u00E7im \u00E7ubu\u011Fu, ASLA ikisi birden. -->\r\n @if (selectedCount() > 0) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-surface-sunken px-4 py-2\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex items-center justify-center appearance-none border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:text-fg\"\r\n [attr.aria-label]=\"effectiveLabels().clearSelection\"\r\n (click)=\"clearSelection()\"\r\n >\r\n <span mfIcon [size]=\"18\">close</span>\r\n </button>\r\n <span class=\"text-sm font-medium text-fg-muted tabular-nums\"\r\n >{{ selectedCount() }} {{ effectiveLabels().selectedCount }}</span\r\n >\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-content select=\"[tableBulkActions]\" />\r\n @if (activeFilterCount() > 0) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-full bg-surface-alt px-2 py-0.5 text-xs text-fg-subtle\"\r\n >\r\n <span mfIcon [size]=\"12\">filter_list</span>\r\n {{ activeFilterCount() }} {{ effectiveLabels().filterCount }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n } @else if (hasFilterableColumns()) {\r\n <mf-table-filter-bar\r\n [columns]=\"columns()\"\r\n [filters]=\"filters()\"\r\n [logic]=\"filterLogic()\"\r\n [labels]=\"effectiveLabels().filter\"\r\n (filtersChange)=\"onFiltersChange($event)\"\r\n (logicChange)=\"onFilterLogicChange($event)\"\r\n />\r\n }\r\n\r\n <div\r\n #scroller\r\n [class]=\"scrollWrapperClasses()\"\r\n [style.max-height]=\"virtual() ? virtualHeight() : null\"\r\n (scroll)=\"onScroll($event)\"\r\n >\r\n <table\r\n [class]=\"cn('border-collapse text-sm', fixedLayout() ? 'min-w-full table-fixed' : 'w-full')\"\r\n [style.width.px]=\"tableWidth()\"\r\n [attr.aria-rowcount]=\"virtual() ? rows().length + 1 : null\"\r\n >\r\n <thead\r\n [class]=\"\r\n cn(\r\n 'bg-surface-sunken',\r\n isStickyHeader() ? 'sticky top-0 z-10 border-b border-border-strong' : ''\r\n )\r\n \"\r\n >\r\n <tr class=\"border-b border-hairline\" [attr.aria-rowindex]=\"virtual() ? 1 : null\">\r\n @if (selectable()) {\r\n <th\r\n data-pin=\"__select\"\r\n [class]=\"cn('w-10 px-4', headerCellPad(), pinHeadClasses('__select'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"allChecked()\"\r\n [indeterminate]=\"indeterminate()\"\r\n [attr.aria-label]=\"effectiveLabels().selectAllAriaLabel\"\r\n (change)=\"onCheckAll($any($event.target).checked)\"\r\n />\r\n </th>\r\n }\r\n @if (expandable()) {\r\n <th\r\n data-pin=\"__expand\"\r\n [class]=\"cn('w-10 px-1.5', headerCellPad(), pinHeadClasses('__expand'))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <span class=\"sr-only\">{{ effectiveLabels().expandRow }}</span>\r\n </th>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <th\r\n [attr.data-col]=\"col.field\"\r\n [attr.aria-sort]=\"col.sortable ? ariaSortFor(col.field) : null\"\r\n [attr.data-pin]=\"col.pinned === 'left' ? col.field : null\"\r\n [class]=\"\r\n cn(\r\n 'group/th relative truncate px-4 text-eyebrow text-fg-subtle',\r\n headerCellPad(),\r\n alignClass(resolvedAlign(col)),\r\n pinHeadClasses(col.field)\r\n )\r\n \"\r\n [style.width]=\"widthStyle(col)\"\r\n [style.min-width.px]=\"col.minWidth ?? null\"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n >\r\n @if (col.sortable) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex appearance-none items-center gap-1 rounded-xs border-0 bg-transparent p-0 transition-colors duration-fast ease-emphasis hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n (click)=\"onSortClick(col, $event)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (sortOrderFor(col.field); as order) {\r\n <span class=\"text-caption font-bold text-accent tabular-nums\">{{ order }}</span>\r\n }\r\n <span\r\n mfIcon\r\n [size]=\"14\"\r\n [class]=\"\r\n sortDirectionFor(col.field) !== null\r\n ? 'text-accent'\r\n : 'text-fg-subtle opacity-0 transition-opacity duration-fast group-hover/th:opacity-100'\r\n \"\r\n >\r\n @switch (sortDirectionFor(col.field)) {\r\n @case (0) {\r\n arrow_upward\r\n }\r\n @case (1) {\r\n arrow_downward\r\n }\r\n @default {\r\n unfold_more\r\n }\r\n }\r\n </span>\r\n </button>\r\n } @else {\r\n <span>{{ col.header }}</span>\r\n }\r\n @if (isResizable(col)) {\r\n <span\r\n mfTableResizeHandle\r\n [label]=\"resizeAriaLabel(col)\"\r\n [width]=\"currentWidth(col)\"\r\n [min]=\"col.minWidth ?? 80\"\r\n (resizeStart)=\"freezeWidths()\"\r\n (widthChange)=\"onColumnResize(col, $event)\"\r\n (autofit)=\"autofitColumn(col)\"\r\n ></span>\r\n }\r\n </th>\r\n }\r\n @if (hasRowActions()) {\r\n <th [class]=\"cn('sticky end-0 z-[1] w-20 bg-surface-sunken px-4', headerCellPad())\">\r\n <span class=\"sr-only\">{{ effectiveLabels().actionsColumnLabel }}</span>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (showSkeleton()) {\r\n @for (i of skeletonIndexes(); track i) {\r\n <tr class=\"border-b border-hairline\">\r\n @if (selectable()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"><div mfSkeleton class=\"h-4 w-4\"></div></td>\r\n }\r\n @if (expandable()) {\r\n <td [class]=\"cn('px-1.5', bodyCellPad())\"></td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\">\r\n <div mfSkeleton class=\"h-4 w-full max-w-[10rem]\"></div>\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"cn('px-4', bodyCellPad())\"></td>\r\n }\r\n </tr>\r\n }\r\n } @else if (rows().length === 0) {\r\n <tr>\r\n <td [attr.colspan]=\"columnSpan()\" class=\"px-4 py-6\">\r\n <mf-empty-state\r\n class=\"block\"\r\n [title]=\"\r\n isFiltered() ? effectiveLabels().noResultsTitle : effectiveLabels().emptyTitle\r\n \"\r\n [description]=\"\r\n isFiltered()\r\n ? effectiveLabels().noResultsDescription\r\n : effectiveLabels().emptyDescription\r\n \"\r\n >\r\n <span icon mfIcon [size]=\"28\">{{ isFiltered() ? 'search_off' : 'inbox' }}</span>\r\n @if (isFiltered()) {\r\n <button\r\n action\r\n mfButton\r\n appearance=\"text\"\r\n tone=\"primary\"\r\n type=\"button\"\r\n (click)=\"clearAllFilters()\"\r\n >\r\n {{ effectiveLabels().clearFilters }}\r\n </button>\r\n }\r\n </mf-empty-state>\r\n </td>\r\n </tr>\r\n } @else {\r\n @if (virtualRange(); as range) {\r\n @if (range.top > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.top\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n @for (row of displayRows(); track trackByRow($index, row)) {\r\n <tr\r\n data-row\r\n [class]=\"rowClasses(row)\"\r\n [attr.aria-rowindex]=\"virtual() ? rowIndexOffset() + $index + 2 : null\"\r\n (dblclick)=\"rowDblClick.emit(row)\"\r\n >\r\n @if (selectable()) {\r\n <td\r\n [class]=\"cn('px-4', bodyCellPad(), pinBodyClasses('__select', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__select')\"\r\n >\r\n <input\r\n type=\"checkbox\"\r\n mfCheckbox\r\n [checked]=\"isChecked(row)\"\r\n [attr.aria-label]=\"rowSelectAriaLabel(row)\"\r\n (change)=\"onCheckRow(row, $any($event.target).checked)\"\r\n />\r\n </td>\r\n }\r\n @if (expandable()) {\r\n <td\r\n [class]=\"cn('px-1.5', bodyCellPad(), pinBodyClasses('__expand', row))\"\r\n [style.inset-inline-start.px]=\"pinStart('__expand')\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex size-7 appearance-none items-center justify-center rounded-md border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-fast ease-emphasis hover:bg-state-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring\"\r\n [attr.aria-expanded]=\"isExpanded(row)\"\r\n [attr.aria-controls]=\"isExpanded(row) ? expandedRowId($index) : null\"\r\n [attr.aria-label]=\"expandAriaLabel(row)\"\r\n (click)=\"toggleExpanded(row)\"\r\n >\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"transition-transform duration-base ease-emphasis rtl:-scale-x-100\"\r\n [class.rotate-90]=\"isExpanded(row)\"\r\n [class.rtl:-rotate-90]=\"isExpanded(row)\"\r\n >chevron_right</span\r\n >\r\n </button>\r\n </td>\r\n }\r\n @for (col of visibleColumns(); track col.field) {\r\n <td\r\n [attr.data-col]=\"col.field\"\r\n [class]=\"\r\n cn(\r\n 'max-w-0 px-4',\r\n bodyCellPad(),\r\n cellClasses(col),\r\n alignClass(resolvedAlign(col)),\r\n pinBodyClasses(col.field, row)\r\n )\r\n \"\r\n [style.inset-inline-start.px]=\"pinStart(col.field)\"\r\n [title]=\"!col.cellTemplate ? cellText(row, col) : null\"\r\n >\r\n @if (col.cellTemplate) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.cellTemplate; context: { $implicit: row }\"\r\n />\r\n } @else {\r\n <span>{{ row[col.field] }}</span>\r\n }\r\n </td>\r\n }\r\n @if (hasRowActions()) {\r\n <td [class]=\"stickyActionClasses(row)\">\r\n <div\r\n class=\"flex items-center justify-end gap-1 opacity-100 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/row:opacity-100 group-focus-within/row:opacity-100\"\r\n >\r\n @if (rowActions().edit) {\r\n <!--\r\n `tone=\"info\"` (mavi) B\u0130LEREK `neutral` DE\u011E\u0130L \u2014 sat\u0131r\r\n hover'\u0131 zaten `bg-surface-alt` boyuyor (bkz. rowBg()),\r\n `neutral`'\u0131n kendi `hover:bg-state-hover`'\u0131 AYNI renk\r\n oldu\u011Fundan buton \u00FCzerine gelince g\u00F6rsel hi\u00E7bir \u015Fey\r\n de\u011Fi\u015Fmiyordu (ger\u00E7ek kullan\u0131c\u0131 bulgusu). Delete'in\r\n `danger` (k\u0131rm\u0131z\u0131 ton) hover'\u0131 bu sorunu ya\u015Fam\u0131yordu \u2014\r\n ayn\u0131 mant\u0131k: Edit'e de arka planla \u00E7ak\u0131\u015Fmayan kendi\r\n renk tonu (mavi `info/5`) verildi.\r\n -->\r\n <button\r\n mfButton\r\n tone=\"info\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().edit\"\r\n [mfTooltip]=\"effectiveLabels().edit\"\r\n (click)=\"edit.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">edit</span>\r\n </button>\r\n }\r\n @if (rowActions().delete) {\r\n <button\r\n mfButton\r\n tone=\"danger\"\r\n appearance=\"text\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n [attr.aria-label]=\"effectiveLabels().delete\"\r\n [mfTooltip]=\"effectiveLabels().delete\"\r\n (click)=\"delete.emit(row)\"\r\n >\r\n <span mfIcon [size]=\"18\">delete</span>\r\n </button>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (expandable() && isExpanded(row)) {\r\n <tr [id]=\"expandedRowId($index)\" class=\"border-b border-b-hairline bg-surface-sunken\">\r\n <td [attr.colspan]=\"columnSpan()\" class=\"p-0\">\r\n <!-- Yatay kayd\u0131rmada ayr\u0131nt\u0131 g\u00F6r\u00FCn\u00FCr alanda sabit kal\u0131r (tablo geni\u015Fli\u011Fiyle kaymaz). -->\r\n <div\r\n class=\"sticky start-0 box-border px-4 py-3\"\r\n [style.width.px]=\"viewportWidth() || null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"expandedRowTemplate()!; context: { $implicit: row }\"\r\n />\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @if (virtualRange(); as range) {\r\n @if (range.bottom > 0) {\r\n <tr aria-hidden=\"true\">\r\n <td\r\n class=\"border-0 p-0\"\r\n [attr.colspan]=\"columnSpan()\"\r\n [style.height.px]=\"range.bottom\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div class=\"border-t border-border bg-surface-sunken\">\r\n @if (virtual()) {\r\n <p class=\"px-4 py-2.5 text-sm text-fg-muted tabular-nums\">\r\n {{ rowsTotal() }} {{ effectiveLabels().pagination.records }}\r\n </p>\r\n } @else {\r\n <mf-table-pagination\r\n [page]=\"page().pageNumber\"\r\n [pageSize]=\"page().pageSize\"\r\n [total]=\"rowsTotal()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n [labels]=\"effectiveLabels().pagination\"\r\n (pageChange)=\"onPageChange($event)\"\r\n (pageSizeChange)=\"onPageSizeChange($event)\"\r\n />\r\n }\r\n </div>\r\n</div>\r\n" }]
1788
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }, { type: i0.Output, args: ["densityChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], clientSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "clientSide", required: false }] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], expandedRowTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRowTemplate", required: false }] }], virtual: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtual", required: false }] }], virtualHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualHeight", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], rowDblClick: [{ type: i0.Output, args: ["rowDblClick"] }], rowExpandedChange: [{ type: i0.Output, args: ["rowExpandedChange"] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }, { type: i0.Output, args: ["filtersChange"] }], filterLogic: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLogic", required: false }] }, { type: i0.Output, args: ["filterLogicChange"] }] } });
1783
1789
 
1784
1790
  /**
1785
1791
  * Generated bundle index. Do not edit.