@design.estate/dees-catalog 3.62.0 → 3.63.0

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.
@@ -163914,29 +163914,48 @@ var tableStyles = [
163914
163914
  border-bottom-width: 0px;
163915
163915
  }
163916
163916
 
163917
+ /* Default mode (Mode B, page sticky): horizontal scroll lives on
163918
+ .tableScroll (so wide tables don't get clipped by an ancestor
163919
+ overflow:hidden such as dees-tile). Vertical sticky is handled by
163920
+ a JS-managed floating header (.floatingHeader, position:fixed),
163921
+ which is unaffected by ancestor overflow. */
163917
163922
  .tableScroll {
163918
- /* enable horizontal scroll only when content exceeds width */
163923
+ position: relative;
163919
163924
  overflow-x: auto;
163920
- /* prevent vertical scroll inside the table container */
163921
- overflow-y: hidden;
163922
- /* avoid reserving extra space for classic scrollbars where possible */
163925
+ overflow-y: visible;
163926
+ scrollbar-gutter: stable;
163927
+ }
163928
+ /* Mode A, internal scroll: opt-in via fixed-height attribute.
163929
+ The table scrolls inside its own box and the header sticks via plain CSS sticky. */
163930
+ :host([fixed-height]) .tableScroll {
163931
+ max-height: var(--table-max-height, 360px);
163932
+ overflow: auto;
163923
163933
  scrollbar-gutter: stable both-edges;
163924
163934
  }
163925
- /* Hide horizontal scrollbar entirely when not using sticky header */
163926
- :host(:not([sticky-header])) .tableScroll {
163927
- -ms-overflow-style: none; /* IE/Edge */
163928
- scrollbar-width: none; /* Firefox (hides both axes) */
163935
+ :host([fixed-height]) .tableScroll::-webkit-scrollbar:horizontal {
163936
+ height: 0px;
163929
163937
  }
163930
- :host(:not([sticky-header])) .tableScroll::-webkit-scrollbar {
163931
- display: none; /* Chrome/Safari */
163938
+
163939
+ /* Floating header overlay (Mode B). Position is managed by JS so it
163940
+ escapes any ancestor overflow:hidden (position:fixed is not clipped
163941
+ by overflow ancestors). */
163942
+ .floatingHeader {
163943
+ position: fixed;
163944
+ top: 0;
163945
+ left: 0;
163946
+ z-index: 100;
163947
+ visibility: hidden;
163948
+ overflow: hidden;
163949
+ pointer-events: none;
163932
163950
  }
163933
- /* In sticky-header mode, hide only the horizontal scrollbar in WebKit/Blink */
163934
- :host([sticky-header]) .tableScroll::-webkit-scrollbar:horizontal {
163935
- height: 0px;
163951
+ .floatingHeader.active {
163952
+ visibility: visible;
163936
163953
  }
163937
- :host([sticky-header]) .tableScroll {
163938
- max-height: var(--table-max-height, 360px);
163939
- overflow: auto;
163954
+ .floatingHeader table {
163955
+ margin: 0;
163956
+ }
163957
+ .floatingHeader th {
163958
+ pointer-events: auto;
163940
163959
  }
163941
163960
 
163942
163961
  table {
@@ -163959,11 +163978,20 @@ var tableStyles = [
163959
163978
  background: ${cssManager.bdTheme("hsl(210 40% 96.1%)", "hsl(0 0% 9%)")};
163960
163979
  border-bottom: 1px solid var(--dees-color-border-strong);
163961
163980
  }
163962
- :host([sticky-header]) thead th {
163981
+ /* th needs its own background so sticky cells paint over scrolled rows
163982
+ (browsers don't paint the <thead> box behind a sticky <th>). */
163983
+ th {
163984
+ background: ${cssManager.bdTheme("hsl(210 40% 96.1%)", "hsl(0 0% 9%)")};
163985
+ }
163986
+ /* Mode A — internal scroll sticky */
163987
+ :host([fixed-height]) thead th {
163963
163988
  position: sticky;
163964
163989
  top: 0;
163965
163990
  z-index: 2;
163966
163991
  }
163992
+ :host([fixed-height]) thead tr.filtersRow th {
163993
+ top: 36px; /* matches th { height: 36px } below */
163994
+ }
163967
163995
 
163968
163996
  tbody tr {
163969
163997
  transition: background-color 0.15s ease;
@@ -164521,7 +164549,7 @@ __name(compileLucenePredicate, "compileLucenePredicate");
164521
164549
  init_dist_ts30();
164522
164550
  init_dist_ts29();
164523
164551
  init_theme();
164524
- var _selectedIds_dec, _selectionMode_dec, _searchMode_dec, _stickyHeader_dec, _showColumnFilters_dec, _columnFilters_dec, _filterText_dec, _sortBy_dec, _showGrid_dec, _showHorizontalLines_dec, _showVerticalLines_dec, _editableFields_dec, _selectedDataRow_dec, _reverseDisplayFunction_dec, _displayFunction_dec, _augmentFromDisplayFunction_dec, _rowKey_dec, _columns_dec, _dataActions_dec, _searchable_dec, _dataName_dec, _required_dec3, _disabled_dec3, _label_dec3, _key_dec2, _data_dec, _heading2_dec, _heading1_dec, _a42, _DeesTable_decorators, _init39, _heading1, _heading22, _data, _key2, _label3, _disabled3, _required3, _dataName, _searchable, _dataActions, _columns, _rowKey, _augmentFromDisplayFunction, _displayFunction, _reverseDisplayFunction, _selectedDataRow, _editableFields, _showVerticalLines, _showHorizontalLines, _showGrid, _sortBy, _filterText, _columnFilters, _showColumnFilters, _stickyHeader, _searchMode, _selectionMode, _selectedIds;
164552
+ var _selectedIds_dec, _selectionMode_dec, _searchMode_dec, _fixedHeight_dec, _showColumnFilters_dec, _columnFilters_dec, _filterText_dec, _sortBy_dec, _showGrid_dec, _showHorizontalLines_dec, _showVerticalLines_dec, _editableFields_dec, _selectedDataRow_dec, _reverseDisplayFunction_dec, _displayFunction_dec, _augmentFromDisplayFunction_dec, _rowKey_dec, _columns_dec, _dataActions_dec, _searchable_dec, _dataName_dec, _required_dec3, _disabled_dec3, _label_dec3, _key_dec2, _data_dec, _heading2_dec, _heading1_dec, _a42, _DeesTable_decorators, _init39, _heading1, _heading22, _data, _key2, _label3, _disabled3, _required3, _dataName, _searchable, _dataActions, _columns, _rowKey, _augmentFromDisplayFunction, _displayFunction, _reverseDisplayFunction, _selectedDataRow, _editableFields, _showVerticalLines, _showHorizontalLines, _showGrid, _sortBy, _filterText, _columnFilters, _showColumnFilters, _fixedHeight, _searchMode, _selectionMode, _selectedIds;
164525
164553
  function ordinalLabel(n12) {
164526
164554
  const s10 = ["th", "st", "nd", "rd"];
164527
164555
  const v5 = n12 % 100;
@@ -164570,7 +164598,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164570
164598
  type: Boolean,
164571
164599
  reflect: true,
164572
164600
  attribute: "show-grid"
164573
- })], _sortBy_dec = [n5({ attribute: false })], _filterText_dec = [n5({ type: String })], _columnFilters_dec = [n5({ attribute: false })], _showColumnFilters_dec = [n5({ type: Boolean, attribute: "show-column-filters" })], _stickyHeader_dec = [n5({ type: Boolean, reflect: true, attribute: "sticky-header" })], _searchMode_dec = [n5({ type: String })], _selectionMode_dec = [n5({ type: String })], _selectedIds_dec = [n5({ attribute: false })], _a42) {
164601
+ })], _sortBy_dec = [n5({ attribute: false })], _filterText_dec = [n5({ type: String })], _columnFilters_dec = [n5({ attribute: false })], _showColumnFilters_dec = [n5({ type: Boolean, attribute: "show-column-filters" })], _fixedHeight_dec = [n5({ type: Boolean, reflect: true, attribute: "fixed-height" })], _searchMode_dec = [n5({ type: String })], _selectionMode_dec = [n5({ type: String })], _selectedIds_dec = [n5({ attribute: false })], _a42) {
164574
164602
  constructor() {
164575
164603
  super();
164576
164604
  __privateAdd(this, _heading1, __runInitializers(_init39, 8, this, "heading 1")), __runInitializers(_init39, 11, this);
@@ -164601,7 +164629,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164601
164629
  __privateAdd(this, _filterText, __runInitializers(_init39, 92, this, "")), __runInitializers(_init39, 95, this);
164602
164630
  __privateAdd(this, _columnFilters, __runInitializers(_init39, 96, this, {})), __runInitializers(_init39, 99, this);
164603
164631
  __privateAdd(this, _showColumnFilters, __runInitializers(_init39, 100, this, false)), __runInitializers(_init39, 103, this);
164604
- __privateAdd(this, _stickyHeader, __runInitializers(_init39, 104, this, false)), __runInitializers(_init39, 107, this);
164632
+ __privateAdd(this, _fixedHeight, __runInitializers(_init39, 104, this, false)), __runInitializers(_init39, 107, this);
164605
164633
  __privateAdd(this, _searchMode, __runInitializers(_init39, 108, this, "table")), __runInitializers(_init39, 111, this);
164606
164634
  __publicField(this, "__searchTextSub");
164607
164635
  __publicField(this, "__searchModeSub");
@@ -164609,6 +164637,11 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164609
164637
  __privateAdd(this, _selectedIds, __runInitializers(_init39, 116, this, /* @__PURE__ */ new Set())), __runInitializers(_init39, 119, this);
164610
164638
  __publicField(this, "_rowIdMap", /* @__PURE__ */ new WeakMap());
164611
164639
  __publicField(this, "_rowIdCounter", 0);
164640
+ // ─── Floating header (page-sticky) lifecycle ─────────────────────────
164641
+ __publicField(this, "__floatingResizeObserver");
164642
+ __publicField(this, "__floatingScrollHandler");
164643
+ __publicField(this, "__floatingActive", false);
164644
+ __publicField(this, "__scrollAncestors", []);
164612
164645
  __publicField(this, "__debounceTimer");
164613
164646
  }
164614
164647
  get value() {
@@ -164699,58 +164732,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164699
164732
  <div class="tableScroll">
164700
164733
  <table>
164701
164734
  <thead>
164702
- <tr>
164703
- ${this.selectionMode !== "none" ? b2`
164704
- <th style="width:42px; text-align:center;">
164705
- ${this.selectionMode === "multi" ? b2`
164706
- <dees-input-checkbox
164707
- .value=${this.areAllVisibleSelected()}
164708
- .indeterminate=${this.isVisibleSelectionIndeterminate()}
164709
- @newValue=${(e11) => {
164710
- e11.stopPropagation();
164711
- this.setSelectVisible(e11.detail === true);
164712
- }}
164713
- ></dees-input-checkbox>
164714
- ` : b2``}
164715
- </th>
164716
- ` : b2``}
164717
- ${effectiveColumns.filter((c11) => !c11.hidden).map((col) => {
164718
- const isSortable = !!col.sortable;
164719
- const ariaSort = this.getAriaSort(col);
164720
- return b2`
164721
- <th
164722
- role="columnheader"
164723
- aria-sort=${ariaSort}
164724
- style="${isSortable ? "cursor: pointer;" : ""}"
164725
- @click=${(eventArg) => isSortable ? this.handleHeaderClick(eventArg, col, effectiveColumns) : null}
164726
- @contextmenu=${(eventArg) => isSortable ? this.openHeaderContextMenu(eventArg, col, effectiveColumns) : null}
164727
- >
164728
- ${col.header ?? col.key}
164729
- ${this.renderSortIndicator(col)}
164730
- </th>`;
164731
- })}
164732
- ${(() => {
164733
- if (this.dataActions && this.dataActions.length > 0) {
164734
- return b2` <th class="actionsCol">Actions</th> `;
164735
- }
164736
- })()}
164737
- </tr>
164738
- ${this.showColumnFilters ? b2`<tr class="filtersRow">
164739
- ${this.selectionMode !== "none" ? b2`<th style="width:42px;"></th>` : b2``}
164740
- ${effectiveColumns.filter((c11) => !c11.hidden).map((col) => {
164741
- const key2 = String(col.key);
164742
- if (col.filterable === false) return b2`<th></th>`;
164743
- return b2`<th>
164744
- <input type="text" placeholder="Filter..." .value=${this.columnFilters[key2] || ""}
164745
- @input=${(e11) => this.setColumnFilter(key2, e11.target.value)} />
164746
- </th>`;
164747
- })}
164748
- ${(() => {
164749
- if (this.dataActions && this.dataActions.length > 0) {
164750
- return b2` <th></th> `;
164751
- }
164752
- })()}
164753
- </tr>` : b2``}
164735
+ ${this.renderHeaderRows(effectiveColumns)}
164754
164736
  </thead>
164755
164737
  <tbody>
164756
164738
  ${viewData.map((itemArg, rowIndex) => {
@@ -164884,6 +164866,13 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164884
164866
  </tbody>
164885
164867
  </table>
164886
164868
  </div>
164869
+ <div class="floatingHeader" aria-hidden="true">
164870
+ <table>
164871
+ <thead>
164872
+ ${this.renderHeaderRows(effectiveColumns)}
164873
+ </thead>
164874
+ </table>
164875
+ </div>
164887
164876
  ` : b2` <div class="noDataSet">No data set!</div> `}
164888
164877
  <div slot="footer" class="footer">
164889
164878
  <div class="tableStatistics">
@@ -164918,11 +164907,226 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164918
164907
  </dees-tile>
164919
164908
  `;
164920
164909
  }
164910
+ /**
164911
+ * Renders the header rows. Used twice per render: once inside the real
164912
+ * `<thead>` and once inside the floating-header clone, so sort indicators
164913
+ * and filter inputs stay in sync automatically.
164914
+ */
164915
+ renderHeaderRows(effectiveColumns) {
164916
+ return b2`
164917
+ <tr>
164918
+ ${this.selectionMode !== "none" ? b2`
164919
+ <th style="width:42px; text-align:center;">
164920
+ ${this.selectionMode === "multi" ? b2`
164921
+ <dees-input-checkbox
164922
+ .value=${this.areAllVisibleSelected()}
164923
+ .indeterminate=${this.isVisibleSelectionIndeterminate()}
164924
+ @newValue=${(e11) => {
164925
+ e11.stopPropagation();
164926
+ this.setSelectVisible(e11.detail === true);
164927
+ }}
164928
+ ></dees-input-checkbox>
164929
+ ` : b2``}
164930
+ </th>
164931
+ ` : b2``}
164932
+ ${effectiveColumns.filter((c11) => !c11.hidden).map((col) => {
164933
+ const isSortable = !!col.sortable;
164934
+ const ariaSort = this.getAriaSort(col);
164935
+ return b2`
164936
+ <th
164937
+ role="columnheader"
164938
+ aria-sort=${ariaSort}
164939
+ style="${isSortable ? "cursor: pointer;" : ""}"
164940
+ @click=${(eventArg) => isSortable ? this.handleHeaderClick(eventArg, col, effectiveColumns) : null}
164941
+ @contextmenu=${(eventArg) => isSortable ? this.openHeaderContextMenu(eventArg, col, effectiveColumns) : null}
164942
+ >
164943
+ ${col.header ?? col.key}
164944
+ ${this.renderSortIndicator(col)}
164945
+ </th>`;
164946
+ })}
164947
+ ${this.dataActions && this.dataActions.length > 0 ? b2`<th class="actionsCol">Actions</th>` : b2``}
164948
+ </tr>
164949
+ ${this.showColumnFilters ? b2`<tr class="filtersRow">
164950
+ ${this.selectionMode !== "none" ? b2`<th style="width:42px;"></th>` : b2``}
164951
+ ${effectiveColumns.filter((c11) => !c11.hidden).map((col) => {
164952
+ const key2 = String(col.key);
164953
+ if (col.filterable === false) return b2`<th></th>`;
164954
+ return b2`<th>
164955
+ <input type="text" placeholder="Filter..." .value=${this.columnFilters[key2] || ""}
164956
+ @input=${(e11) => this.setColumnFilter(key2, e11.target.value)} />
164957
+ </th>`;
164958
+ })}
164959
+ ${this.dataActions && this.dataActions.length > 0 ? b2`<th></th>` : b2``}
164960
+ </tr>` : b2``}
164961
+ `;
164962
+ }
164963
+ get __floatingHeaderEl() {
164964
+ return this.shadowRoot?.querySelector(".floatingHeader") ?? null;
164965
+ }
164966
+ get __realTableEl() {
164967
+ return this.shadowRoot?.querySelector(".tableScroll > table") ?? null;
164968
+ }
164969
+ get __floatingTableEl() {
164970
+ return this.shadowRoot?.querySelector(".floatingHeader > table") ?? null;
164971
+ }
164972
+ /**
164973
+ * Walks up the DOM (and through shadow roots) collecting every ancestor
164974
+ * element whose computed `overflow-y` makes it a scroll container, plus
164975
+ * `window` at the end. We listen for scroll on all of them so the floating
164976
+ * header reacts whether the user scrolls the page or any nested container.
164977
+ */
164978
+ __collectScrollAncestors() {
164979
+ const result = [];
164980
+ let node2 = this;
164981
+ const scrollish = /* @__PURE__ */ __name((v5) => v5 === "auto" || v5 === "scroll" || v5 === "overlay", "scrollish");
164982
+ while (node2) {
164983
+ if (node2 instanceof Element) {
164984
+ const style2 = getComputedStyle(node2);
164985
+ const sy = scrollish(style2.overflowY);
164986
+ const sx = scrollish(style2.overflowX);
164987
+ if (sy || sx) {
164988
+ result.push({ target: node2, scrollsY: sy, scrollsX: sx });
164989
+ }
164990
+ }
164991
+ const parent = node2.assignedSlot ? node2.assignedSlot : node2.parentNode;
164992
+ if (parent) {
164993
+ node2 = parent;
164994
+ } else if (node2.host) {
164995
+ node2 = node2.host;
164996
+ } else {
164997
+ node2 = null;
164998
+ }
164999
+ }
165000
+ result.push({ target: window, scrollsY: true, scrollsX: true });
165001
+ return result;
165002
+ }
165003
+ /**
165004
+ * Returns the "stick line" — the y-coordinate (in viewport space) at which
165005
+ * the floating header should appear. Defaults to 0 (page top), but if the
165006
+ * table is inside a scroll container we use that container's content-box
165007
+ * top so the header sits inside the container's border/padding instead of
165008
+ * floating over it.
165009
+ */
165010
+ __getStickContext() {
165011
+ let top = 0;
165012
+ let left = 0;
165013
+ let right = window.innerWidth;
165014
+ for (const a5 of this.__scrollAncestors) {
165015
+ if (a5.target === window) continue;
165016
+ const el = a5.target;
165017
+ const r11 = el.getBoundingClientRect();
165018
+ const cs = getComputedStyle(el);
165019
+ if (a5.scrollsY) {
165020
+ const bt = parseFloat(cs.borderTopWidth) || 0;
165021
+ top = Math.max(top, r11.top + bt);
165022
+ }
165023
+ if (a5.scrollsX) {
165024
+ const bl = parseFloat(cs.borderLeftWidth) || 0;
165025
+ const br = parseFloat(cs.borderRightWidth) || 0;
165026
+ left = Math.max(left, r11.left + bl);
165027
+ right = Math.min(right, r11.right - br);
165028
+ }
165029
+ }
165030
+ return { top, left, right };
165031
+ }
165032
+ setupFloatingHeader() {
165033
+ this.teardownFloatingHeader();
165034
+ if (this.fixedHeight) return;
165035
+ const realTable = this.__realTableEl;
165036
+ if (!realTable) return;
165037
+ this.__scrollAncestors = this.__collectScrollAncestors();
165038
+ const tableScrollEl = this.shadowRoot?.querySelector(".tableScroll");
165039
+ if (tableScrollEl) {
165040
+ this.__scrollAncestors.unshift({ target: tableScrollEl, scrollsY: false, scrollsX: true });
165041
+ }
165042
+ this.__floatingResizeObserver = new ResizeObserver(() => {
165043
+ this.__syncFloatingHeader();
165044
+ });
165045
+ this.__floatingResizeObserver.observe(realTable);
165046
+ this.__floatingScrollHandler = () => this.__syncFloatingHeader();
165047
+ for (const a5 of this.__scrollAncestors) {
165048
+ a5.target.addEventListener("scroll", this.__floatingScrollHandler, { passive: true });
165049
+ }
165050
+ window.addEventListener("resize", this.__floatingScrollHandler, { passive: true });
165051
+ this.__syncFloatingHeader();
165052
+ }
165053
+ teardownFloatingHeader() {
165054
+ this.__floatingResizeObserver?.disconnect();
165055
+ this.__floatingResizeObserver = void 0;
165056
+ if (this.__floatingScrollHandler) {
165057
+ for (const a5 of this.__scrollAncestors) {
165058
+ a5.target.removeEventListener("scroll", this.__floatingScrollHandler);
165059
+ }
165060
+ window.removeEventListener("resize", this.__floatingScrollHandler);
165061
+ this.__floatingScrollHandler = void 0;
165062
+ }
165063
+ this.__scrollAncestors = [];
165064
+ this.__floatingActive = false;
165065
+ const fh = this.__floatingHeaderEl;
165066
+ if (fh) fh.classList.remove("active");
165067
+ }
165068
+ /**
165069
+ * Single function that drives both activation and geometry of the floating
165070
+ * header. Called on scroll, resize, table-resize, and after each render.
165071
+ */
165072
+ __syncFloatingHeader() {
165073
+ const fh = this.__floatingHeaderEl;
165074
+ const realTable = this.__realTableEl;
165075
+ const floatTable = this.__floatingTableEl;
165076
+ if (!fh || !realTable || !floatTable) return;
165077
+ const tableRect = realTable.getBoundingClientRect();
165078
+ const stick = this.__getStickContext();
165079
+ floatTable.style.tableLayout = realTable.style.tableLayout || "auto";
165080
+ const realHeadRows = realTable.tHead?.rows;
165081
+ const floatHeadRows = floatTable.tHead?.rows;
165082
+ let headerHeight = 0;
165083
+ if (realHeadRows && floatHeadRows) {
165084
+ for (let r11 = 0; r11 < realHeadRows.length && r11 < floatHeadRows.length; r11++) {
165085
+ headerHeight += realHeadRows[r11].getBoundingClientRect().height;
165086
+ const realCells = realHeadRows[r11].cells;
165087
+ const floatCells = floatHeadRows[r11].cells;
165088
+ for (let c11 = 0; c11 < realCells.length && c11 < floatCells.length; c11++) {
165089
+ const w4 = realCells[c11].getBoundingClientRect().width;
165090
+ floatCells[c11].style.width = `${w4}px`;
165091
+ floatCells[c11].style.minWidth = `${w4}px`;
165092
+ floatCells[c11].style.maxWidth = `${w4}px`;
165093
+ }
165094
+ }
165095
+ }
165096
+ const shouldBeActive = tableRect.top < stick.top && tableRect.bottom > stick.top + Math.min(headerHeight, 1);
165097
+ if (shouldBeActive !== this.__floatingActive) {
165098
+ this.__floatingActive = shouldBeActive;
165099
+ fh.classList.toggle("active", shouldBeActive);
165100
+ }
165101
+ if (!shouldBeActive) return;
165102
+ const clipLeft = Math.max(tableRect.left, stick.left);
165103
+ const clipRight = Math.min(tableRect.right, stick.right);
165104
+ const clipWidth = Math.max(0, clipRight - clipLeft);
165105
+ fh.style.top = `${stick.top}px`;
165106
+ fh.style.left = `${clipLeft}px`;
165107
+ fh.style.width = `${clipWidth}px`;
165108
+ floatTable.style.width = `${tableRect.width}px`;
165109
+ floatTable.style.marginLeft = `${tableRect.left - clipLeft}px`;
165110
+ }
165111
+ async disconnectedCallback() {
165112
+ super.disconnectedCallback();
165113
+ this.teardownFloatingHeader();
165114
+ }
164921
165115
  async firstUpdated() {
164922
165116
  }
164923
165117
  async updated(changedProperties) {
164924
165118
  super.updated(changedProperties);
164925
165119
  this.determineColumnWidths();
165120
+ if (changedProperties.has("fixedHeight") || changedProperties.has("data") || changedProperties.has("columns") || !this.__floatingScrollHandler) {
165121
+ if (!this.fixedHeight && this.data.length > 0) {
165122
+ this.setupFloatingHeader();
165123
+ } else {
165124
+ this.teardownFloatingHeader();
165125
+ }
165126
+ }
165127
+ if (!this.fixedHeight && this.data.length > 0) {
165128
+ this.__syncFloatingHeader();
165129
+ }
164926
165130
  if (this.searchable) {
164927
165131
  const existing = this.dataActions.find((actionArg) => actionArg.type?.includes("header") && actionArg.name === "Search");
164928
165132
  if (!existing) {
@@ -165483,7 +165687,7 @@ _sortBy = new WeakMap();
165483
165687
  _filterText = new WeakMap();
165484
165688
  _columnFilters = new WeakMap();
165485
165689
  _showColumnFilters = new WeakMap();
165486
- _stickyHeader = new WeakMap();
165690
+ _fixedHeight = new WeakMap();
165487
165691
  _searchMode = new WeakMap();
165488
165692
  _selectionMode = new WeakMap();
165489
165693
  _selectedIds = new WeakMap();
@@ -165511,7 +165715,7 @@ __decorateElement(_init39, 4, "sortBy", _sortBy_dec, _DeesTable, _sortBy);
165511
165715
  __decorateElement(_init39, 4, "filterText", _filterText_dec, _DeesTable, _filterText);
165512
165716
  __decorateElement(_init39, 4, "columnFilters", _columnFilters_dec, _DeesTable, _columnFilters);
165513
165717
  __decorateElement(_init39, 4, "showColumnFilters", _showColumnFilters_dec, _DeesTable, _showColumnFilters);
165514
- __decorateElement(_init39, 4, "stickyHeader", _stickyHeader_dec, _DeesTable, _stickyHeader);
165718
+ __decorateElement(_init39, 4, "fixedHeight", _fixedHeight_dec, _DeesTable, _fixedHeight);
165515
165719
  __decorateElement(_init39, 4, "searchMode", _searchMode_dec, _DeesTable, _searchMode);
165516
165720
  __decorateElement(_init39, 4, "selectionMode", _selectionMode_dec, _DeesTable, _selectionMode);
165517
165721
  __decorateElement(_init39, 4, "selectedIds", _selectedIds_dec, _DeesTable, _selectedIds);
@@ -199361,7 +199565,7 @@ init_group_runtime();
199361
199565
  // ts_web/00_commitinfo_data.ts
199362
199566
  var commitinfo = {
199363
199567
  name: "@design.estate/dees-catalog",
199364
- version: "3.62.0",
199568
+ version: "3.63.0",
199365
199569
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
199366
199570
  };
199367
199571
  export {
@@ -201334,4 +201538,4 @@ ibantools/jsnext/ibantools.js:
201334
201538
  * @preferred
201335
201539
  *)
201336
201540
  */
201337
- //# sourceMappingURL=bundle-1775564414196.js.map
201541
+ //# sourceMappingURL=bundle-1775570157836.js.map
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '3.62.0',
6
+ version: '3.63.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHNfd2ViLzAwX2NvbW1pdGluZm9fZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4QixJQUFJLEVBQUUsNkJBQTZCO0lBQ25DLE9BQU8sRUFBRSxRQUFRO0lBQ2pCLFdBQVcsRUFBRSxzSkFBc0o7Q0FDcEssQ0FBQSJ9
@@ -56,7 +56,16 @@ export declare class DeesTable<T> extends DeesElement {
56
56
  accessor filterText: string;
57
57
  accessor columnFilters: Record<string, string>;
58
58
  accessor showColumnFilters: boolean;
59
- accessor stickyHeader: boolean;
59
+ /**
60
+ * When set, the table renders inside a fixed-height scroll container
61
+ * (`max-height: var(--table-max-height, 360px)`) and the header sticks
62
+ * within that box via plain CSS sticky.
63
+ *
64
+ * When unset (the default), the table flows naturally and a JS-managed
65
+ * floating header keeps the column headers visible while the table is
66
+ * scrolled past in any ancestor scroll container (page or otherwise).
67
+ */
68
+ accessor fixedHeight: boolean;
60
69
  accessor searchMode: 'table' | 'data' | 'server';
61
70
  private __searchTextSub?;
62
71
  private __searchModeSub?;
@@ -67,6 +76,42 @@ export declare class DeesTable<T> extends DeesElement {
67
76
  constructor();
68
77
  static styles: import("@design.estate/dees-element").CSSResult[];
69
78
  render(): TemplateResult;
79
+ /**
80
+ * Renders the header rows. Used twice per render: once inside the real
81
+ * `<thead>` and once inside the floating-header clone, so sort indicators
82
+ * and filter inputs stay in sync automatically.
83
+ */
84
+ private renderHeaderRows;
85
+ private __floatingResizeObserver?;
86
+ private __floatingScrollHandler?;
87
+ private __floatingActive;
88
+ private __scrollAncestors;
89
+ private get __floatingHeaderEl();
90
+ private get __realTableEl();
91
+ private get __floatingTableEl();
92
+ /**
93
+ * Walks up the DOM (and through shadow roots) collecting every ancestor
94
+ * element whose computed `overflow-y` makes it a scroll container, plus
95
+ * `window` at the end. We listen for scroll on all of them so the floating
96
+ * header reacts whether the user scrolls the page or any nested container.
97
+ */
98
+ private __collectScrollAncestors;
99
+ /**
100
+ * Returns the "stick line" — the y-coordinate (in viewport space) at which
101
+ * the floating header should appear. Defaults to 0 (page top), but if the
102
+ * table is inside a scroll container we use that container's content-box
103
+ * top so the header sits inside the container's border/padding instead of
104
+ * floating over it.
105
+ */
106
+ private __getStickContext;
107
+ private setupFloatingHeader;
108
+ private teardownFloatingHeader;
109
+ /**
110
+ * Single function that drives both activation and geometry of the floating
111
+ * header. Called on scroll, resize, table-resize, and after each render.
112
+ */
113
+ private __syncFloatingHeader;
114
+ disconnectedCallback(): Promise<void>;
70
115
  firstUpdated(): Promise<void>;
71
116
  updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
72
117
  private __debounceTimer?;