@design.estate/dees-catalog 3.69.1 → 3.70.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.
@@ -140045,9 +140045,7 @@ __publicField(_DeesModal, "styles", [
140045
140045
  }
140046
140046
 
140047
140047
  .heading .header-button dees-icon {
140048
- width: 14px;
140049
- height: 14px;
140050
- display: block;
140048
+ font-size: 14px;
140051
140049
  }
140052
140050
 
140053
140051
  .content {
@@ -163904,6 +163902,69 @@ var demoFunc29 = /* @__PURE__ */ __name(() => b2`
163904
163902
  ]}
163905
163903
  ></dees-table>
163906
163904
  </div>
163905
+
163906
+ <dees-demowrapper .runAfterRender=${async (elementArg) => {
163907
+ const tableEl = elementArg.querySelector("#demoLiveFlash");
163908
+ if (!tableEl) return;
163909
+ if (tableEl.__liveFlashTimerId) {
163910
+ window.clearInterval(tableEl.__liveFlashTimerId);
163911
+ }
163912
+ const tick = /* @__PURE__ */ __name(() => {
163913
+ if (!Array.isArray(tableEl.data) || tableEl.data.length === 0) return;
163914
+ const next2 = tableEl.data.map((r11) => ({ ...r11 }));
163915
+ const count2 = 1 + Math.floor(Math.random() * 3);
163916
+ for (let i11 = 0; i11 < count2; i11++) {
163917
+ const idx = Math.floor(Math.random() * next2.length);
163918
+ const delta = +((Math.random() * 2 - 1) * 3).toFixed(2);
163919
+ const newPrice = Math.max(1, +(next2[idx].price + delta).toFixed(2));
163920
+ next2[idx] = {
163921
+ ...next2[idx],
163922
+ price: newPrice,
163923
+ change: delta,
163924
+ updatedAt: (/* @__PURE__ */ new Date()).toLocaleTimeString()
163925
+ };
163926
+ }
163927
+ tableEl.data = next2;
163928
+ }, "tick");
163929
+ tableEl.__liveFlashTimerId = window.setInterval(tick, 1500);
163930
+ }}>
163931
+ <div class="demo-section">
163932
+ <h2 class="demo-title">Live Updates with Flash Highlighting</h2>
163933
+ <p class="demo-description">
163934
+ Opt-in cell-flash via <code>highlight-updates="flash"</code>. The ticker below mutates
163935
+ random rows every 1.5s and reassigns <code>.data</code>. Updated cells briefly flash
163936
+ amber and fade out. Requires <code>rowKey</code> (here <code>"symbol"</code>). Honors
163937
+ <code>prefers-reduced-motion</code>. Row selection persists across updates — click a
163938
+ row, then watch it stay selected as the data churns.
163939
+ </p>
163940
+ <dees-table
163941
+ id="demoLiveFlash"
163942
+ .rowKey=${"symbol"}
163943
+ highlight-updates="flash"
163944
+ .selectionMode=${"multi"}
163945
+ heading1="Live Market Feed"
163946
+ heading2="Flashing cells indicate updated values"
163947
+ .columns=${[
163948
+ { key: "symbol", header: "Symbol", sortable: true },
163949
+ { key: "price", header: "Price", sortable: true },
163950
+ { key: "change", header: "\u0394", sortable: true },
163951
+ { key: "updatedAt", header: "Updated" }
163952
+ ]}
163953
+ .data=${[
163954
+ { symbol: "AAPL", price: 182.52, change: 0, updatedAt: "\u2014" },
163955
+ { symbol: "MSFT", price: 414.18, change: 0, updatedAt: "\u2014" },
163956
+ { symbol: "GOOG", price: 168.74, change: 0, updatedAt: "\u2014" },
163957
+ { symbol: "AMZN", price: 186.13, change: 0, updatedAt: "\u2014" },
163958
+ { symbol: "TSLA", price: 248.5, change: 0, updatedAt: "\u2014" },
163959
+ { symbol: "NVDA", price: 877.35, change: 0, updatedAt: "\u2014" },
163960
+ { symbol: "META", price: 492.96, change: 0, updatedAt: "\u2014" },
163961
+ { symbol: "NFLX", price: 605.88, change: 0, updatedAt: "\u2014" },
163962
+ { symbol: "AMD", price: 165.24, change: 0, updatedAt: "\u2014" },
163963
+ { symbol: "INTC", price: 42.15, change: 0, updatedAt: "\u2014" }
163964
+ ]}
163965
+ ></dees-table>
163966
+ </div>
163967
+ </dees-demowrapper>
163907
163968
  </div>
163908
163969
  </div>
163909
163970
  `, "demoFunc");
@@ -164282,6 +164343,72 @@ var tableStyles = [
164282
164343
  line-height: 24px;
164283
164344
  }
164284
164345
 
164346
+ /* ---- Cell flash highlighting (opt-in via highlight-updates="flash") ----
164347
+ Bloomberg/TradingView-style: the text itself briefly takes an accent
164348
+ color then fades back to the default. No background tint, no layout
164349
+ shift, no weight change. Readable, modern, subtle.
164350
+ Consumers can override per instance:
164351
+ dees-table#myTable { --dees-table-flash-color: hsl(142 76% 40%); }
164352
+ */
164353
+ :host {
164354
+ --dees-table-flash-color: ${cssManager.bdTheme(
164355
+ "hsl(32 95% 44%)",
164356
+ "hsl(45 93% 62%)"
164357
+ )};
164358
+ --dees-table-flash-easing: cubic-bezier(0.22, 0.61, 0.36, 1);
164359
+ }
164360
+
164361
+ .innerCellContainer.flashing {
164362
+ animation: dees-table-cell-flash
164363
+ var(--dees-table-flash-duration, 900ms)
164364
+ var(--dees-table-flash-easing);
164365
+ }
164366
+
164367
+ /* Hold the accent color briefly, then fade back to the theme's default
164368
+ text color. Inherits to child text and to SVG icons that use
164369
+ currentColor. Cells with explicit color overrides in renderers are
164370
+ intentionally unaffected. */
164371
+ @keyframes dees-table-cell-flash {
164372
+ 0%,
164373
+ 35% { color: var(--dees-table-flash-color); }
164374
+ 100% { color: var(--dees-color-text-primary); }
164375
+ }
164376
+
164377
+ @media (prefers-reduced-motion: reduce) {
164378
+ .innerCellContainer.flashing {
164379
+ animation: none;
164380
+ color: var(--dees-table-flash-color);
164381
+ }
164382
+ }
164383
+
164384
+ /* Dev-time warning banner shown when highlight-updates="flash" but
164385
+ rowKey is missing. Consumers should never ship this to production. */
164386
+ .flashConfigWarning {
164387
+ display: flex;
164388
+ align-items: center;
164389
+ gap: 8px;
164390
+ margin: 8px 16px 0;
164391
+ padding: 8px 12px;
164392
+ border-left: 3px solid ${cssManager.bdTheme("hsl(38 92% 50%)", "hsl(48 96% 63%)")};
164393
+ background: ${cssManager.bdTheme("hsl(48 96% 89% / 0.6)", "hsl(48 96% 30% / 0.15)")};
164394
+ color: ${cssManager.bdTheme("hsl(32 81% 29%)", "hsl(48 96% 80%)")};
164395
+ font-size: 12px;
164396
+ line-height: 1.4;
164397
+ border-radius: 4px;
164398
+ }
164399
+ .flashConfigWarning dees-icon {
164400
+ width: 14px;
164401
+ height: 14px;
164402
+ flex: 0 0 auto;
164403
+ }
164404
+ .flashConfigWarning code {
164405
+ padding: 1px 4px;
164406
+ border-radius: 3px;
164407
+ background: ${cssManager.bdTheme("hsl(0 0% 100% / 0.6)", "hsl(0 0% 0% / 0.3)")};
164408
+ font-family: ${cssGeistFontFamily};
164409
+ font-size: 11px;
164410
+ }
164411
+
164285
164412
  /* Editable cell affordances */
164286
164413
  td.editable {
164287
164414
  cursor: text;
@@ -164664,7 +164791,7 @@ __name(compileLucenePredicate, "compileLucenePredicate");
164664
164791
  init_dist_ts30();
164665
164792
  init_dist_ts29();
164666
164793
  init_theme();
164667
- var ___virtualRange_dec, ___floatingActive_dec, ___editingCell_dec, ___focusedCell_dec, _selectedIds_dec, _selectionMode_dec, _searchMode_dec, _fixedHeight_dec, _virtualOverscan_dec, _virtualized_dec, _showSelectionCheckbox_dec, _showColumnFilters_dec, _columnFilters_dec, _filterText_dec, _sortBy_dec, _showGrid_dec, _showHorizontalLines_dec, _showVerticalLines_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, _showVerticalLines, _showHorizontalLines, _showGrid, _sortBy, _filterText, _columnFilters, _showColumnFilters, _showSelectionCheckbox, _virtualized, _virtualOverscan, _fixedHeight, _searchMode, _selectionMode, _selectedIds, ___focusedCell, ___editingCell, ___floatingActive, ___virtualRange;
164794
+ var ___virtualRange_dec, ___flashingCells_dec, ___floatingActive_dec, ___editingCell_dec, ___focusedCell_dec, _selectedIds_dec, _selectionMode_dec, _searchMode_dec, _fixedHeight_dec, _highlightDuration_dec, _highlightUpdates_dec, _virtualOverscan_dec, _virtualized_dec, _showSelectionCheckbox_dec, _showColumnFilters_dec, _columnFilters_dec, _filterText_dec, _sortBy_dec, _showGrid_dec, _showHorizontalLines_dec, _showVerticalLines_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, _showVerticalLines, _showHorizontalLines, _showGrid, _sortBy, _filterText, _columnFilters, _showColumnFilters, _showSelectionCheckbox, _virtualized, _virtualOverscan, _highlightUpdates, _highlightDuration, _fixedHeight, _searchMode, _selectionMode, _selectedIds, ___focusedCell, ___editingCell, ___floatingActive, ___flashingCells, ___virtualRange;
164668
164795
  function ordinalLabel(n12) {
164669
164796
  const s10 = ["th", "st", "nd", "rd"];
164670
164797
  const v5 = n12 % 100;
@@ -164711,7 +164838,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164711
164838
  type: Boolean,
164712
164839
  reflect: true,
164713
164840
  attribute: "show-grid"
164714
- })], _sortBy_dec = [n5({ attribute: false })], _filterText_dec = [n5({ type: String })], _columnFilters_dec = [n5({ attribute: false })], _showColumnFilters_dec = [n5({ type: Boolean, attribute: "show-column-filters" })], _showSelectionCheckbox_dec = [n5({ type: Boolean, reflect: true, attribute: "show-selection-checkbox" })], _virtualized_dec = [n5({ type: Boolean, reflect: true, attribute: "virtualized" })], _virtualOverscan_dec = [n5({ type: Number, attribute: "virtual-overscan" })], _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 })], ___focusedCell_dec = [r5()], ___editingCell_dec = [r5()], ___floatingActive_dec = [r5()], ___virtualRange_dec = [r5()], _a42) {
164841
+ })], _sortBy_dec = [n5({ attribute: false })], _filterText_dec = [n5({ type: String })], _columnFilters_dec = [n5({ attribute: false })], _showColumnFilters_dec = [n5({ type: Boolean, attribute: "show-column-filters" })], _showSelectionCheckbox_dec = [n5({ type: Boolean, reflect: true, attribute: "show-selection-checkbox" })], _virtualized_dec = [n5({ type: Boolean, reflect: true, attribute: "virtualized" })], _virtualOverscan_dec = [n5({ type: Number, attribute: "virtual-overscan" })], _highlightUpdates_dec = [n5({ type: String, attribute: "highlight-updates" })], _highlightDuration_dec = [n5({ type: Number, attribute: "highlight-duration" })], _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 })], ___focusedCell_dec = [r5()], ___editingCell_dec = [r5()], ___floatingActive_dec = [r5()], ___flashingCells_dec = [r5()], ___virtualRange_dec = [r5()], _a42) {
164715
164842
  constructor() {
164716
164843
  super();
164717
164844
  __privateAdd(this, _heading1, __runInitializers(_init39, 8, this, "heading 1")), __runInitializers(_init39, 11, this);
@@ -164744,12 +164871,14 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164744
164871
  __privateAdd(this, _showSelectionCheckbox, __runInitializers(_init39, 100, this, false)), __runInitializers(_init39, 103, this);
164745
164872
  __privateAdd(this, _virtualized, __runInitializers(_init39, 104, this, false)), __runInitializers(_init39, 107, this);
164746
164873
  __privateAdd(this, _virtualOverscan, __runInitializers(_init39, 108, this, 8)), __runInitializers(_init39, 111, this);
164747
- __privateAdd(this, _fixedHeight, __runInitializers(_init39, 112, this, false)), __runInitializers(_init39, 115, this);
164748
- __privateAdd(this, _searchMode, __runInitializers(_init39, 116, this, "table")), __runInitializers(_init39, 119, this);
164874
+ __privateAdd(this, _highlightUpdates, __runInitializers(_init39, 112, this, "none")), __runInitializers(_init39, 115, this);
164875
+ __privateAdd(this, _highlightDuration, __runInitializers(_init39, 116, this, 900)), __runInitializers(_init39, 119, this);
164876
+ __privateAdd(this, _fixedHeight, __runInitializers(_init39, 120, this, false)), __runInitializers(_init39, 123, this);
164877
+ __privateAdd(this, _searchMode, __runInitializers(_init39, 124, this, "table")), __runInitializers(_init39, 127, this);
164749
164878
  __publicField(this, "__searchTextSub");
164750
164879
  __publicField(this, "__searchModeSub");
164751
- __privateAdd(this, _selectionMode, __runInitializers(_init39, 120, this, "none")), __runInitializers(_init39, 123, this);
164752
- __privateAdd(this, _selectedIds, __runInitializers(_init39, 124, this, /* @__PURE__ */ new Set())), __runInitializers(_init39, 127, this);
164880
+ __privateAdd(this, _selectionMode, __runInitializers(_init39, 128, this, "none")), __runInitializers(_init39, 131, this);
164881
+ __privateAdd(this, _selectedIds, __runInitializers(_init39, 132, this, /* @__PURE__ */ new Set())), __runInitializers(_init39, 135, this);
164753
164882
  __publicField(this, "_rowIdMap", /* @__PURE__ */ new WeakMap());
164754
164883
  __publicField(this, "_rowIdCounter", 0);
164755
164884
  /**
@@ -164758,9 +164887,18 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164758
164887
  * can compute a contiguous range from this anchor.
164759
164888
  */
164760
164889
  __publicField(this, "__selectionAnchorId");
164761
- __privateAdd(this, ___focusedCell, __runInitializers(_init39, 128, this)), __runInitializers(_init39, 131, this);
164762
- __privateAdd(this, ___editingCell, __runInitializers(_init39, 132, this)), __runInitializers(_init39, 135, this);
164763
- __privateAdd(this, ___floatingActive, __runInitializers(_init39, 136, this, false)), __runInitializers(_init39, 139, this);
164890
+ __privateAdd(this, ___focusedCell, __runInitializers(_init39, 136, this)), __runInitializers(_init39, 139, this);
164891
+ __privateAdd(this, ___editingCell, __runInitializers(_init39, 140, this)), __runInitializers(_init39, 143, this);
164892
+ __privateAdd(this, ___floatingActive, __runInitializers(_init39, 144, this, false)), __runInitializers(_init39, 147, this);
164893
+ __privateAdd(this, ___flashingCells, __runInitializers(_init39, 148, this, /* @__PURE__ */ new Map())), __runInitializers(_init39, 151, this);
164894
+ /** rowId → (colKey → last-seen resolved cell value). Populated per diff pass. */
164895
+ __publicField(this, "__prevSnapshot");
164896
+ /** Single shared timer that clears __flashingCells after highlightDuration ms. */
164897
+ __publicField(this, "__flashClearTimer");
164898
+ /** Monotonic counter bumped each flash batch so directives.keyed recreates the cell node and restarts the animation. */
164899
+ __publicField(this, "__flashTick", 0);
164900
+ /** One-shot console.warn gate for missing rowKey in flash mode. */
164901
+ __publicField(this, "__flashWarnedNoRowKey", false);
164764
164902
  // ─── Render memoization ──────────────────────────────────────────────
164765
164903
  // These caches let render() short-circuit when the relevant inputs
164766
164904
  // (by reference) haven't changed. They are NOT @state — mutating them
@@ -164774,7 +164912,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
164774
164912
  __publicField(this, "__rowHeight", 36);
164775
164913
  /** True once we've measured `__rowHeight` from a real DOM row. */
164776
164914
  __publicField(this, "__rowHeightMeasured", false);
164777
- __privateAdd(this, ___virtualRange, __runInitializers(_init39, 140, this, { start: 0, end: 0 })), __runInitializers(_init39, 143, this);
164915
+ __privateAdd(this, ___virtualRange, __runInitializers(_init39, 152, this, { start: 0, end: 0 })), __runInitializers(_init39, 155, this);
164778
164916
  /**
164779
164917
  * Ctrl/Cmd+C copies the currently selected rows as a JSON array. Falls
164780
164918
  * back to copying the focused-row (`selectedDataRow`) if no multi
@@ -165099,6 +165237,13 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165099
165237
  </div>
165100
165238
  </div>
165101
165239
  <div class="headingSeparation"></div>
165240
+ ${this.highlightUpdates === "flash" && !this.rowKey ? b2`<div class="flashConfigWarning" role="alert">
165241
+ <dees-icon .icon=${"lucide:triangleAlert"}></dees-icon>
165242
+ <span>
165243
+ <code>highlight-updates="flash"</code> requires
165244
+ <code>rowKey</code> to be set. Flash is disabled.
165245
+ </span>
165246
+ </div>` : b2``}
165102
165247
  <div class="searchGrid hidden">
165103
165248
  <dees-input-text
165104
165249
  .label=${"lucene syntax search"}
@@ -165145,10 +165290,14 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165145
165290
  @drop=${this.__onTbodyDrop}
165146
165291
  >
165147
165292
  ${useVirtual && topSpacerHeight > 0 ? b2`<tr aria-hidden="true" style="height:${topSpacerHeight}px"><td></td></tr>` : b2``}
165148
- ${renderRows.map((itemArg, sliceIdx) => {
165149
- const rowIndex = renderStart + sliceIdx;
165150
- const rowId = this.getRowId(itemArg);
165151
- return b2`
165293
+ ${directives_exports.repeat(
165294
+ renderRows,
165295
+ (itemArg, sliceIdx) => `${this.getRowId(itemArg)}::${renderStart + sliceIdx}`,
165296
+ (itemArg, sliceIdx) => {
165297
+ const rowIndex = renderStart + sliceIdx;
165298
+ const rowId = this.getRowId(itemArg);
165299
+ const flashSet = this.__flashingCells.get(rowId);
165300
+ return b2`
165152
165301
  <tr
165153
165302
  data-row-idx=${rowIndex}
165154
165303
  class="${itemArg === this.selectedDataRow || this.isRowSelected(itemArg) ? "selected" : ""}"
@@ -165157,59 +165306,67 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165157
165306
  <dees-input-checkbox
165158
165307
  .value=${this.isRowSelected(itemArg)}
165159
165308
  @newValue=${(e11) => {
165160
- e11.stopPropagation();
165161
- this.setRowSelected(itemArg, e11.detail === true);
165162
- }}
165309
+ e11.stopPropagation();
165310
+ this.setRowSelected(itemArg, e11.detail === true);
165311
+ }}
165163
165312
  ></dees-input-checkbox>
165164
165313
  </td>` : b2``}
165165
165314
  ${effectiveColumns.filter((c11) => !c11.hidden).map((col, colIndex) => {
165166
- const value2 = getCellValue(itemArg, col, this.displayFunction);
165167
- const content3 = col.renderer ? col.renderer(value2, itemArg, { rowIndex, colIndex, column: col }) : value2;
165168
- const editKey = String(col.key);
165169
- const isEditable = !!(col.editable || col.editor);
165170
- const isFocused = this.__focusedCell?.rowId === rowId && this.__focusedCell?.colKey === editKey;
165171
- const isEditing = this.__editingCell?.rowId === rowId && this.__editingCell?.colKey === editKey;
165172
- const cellClasses = [
165173
- isEditable ? "editable" : "",
165174
- isFocused && !isEditing ? "focused" : "",
165175
- isEditing ? "editingCell" : ""
165176
- ].filter(Boolean).join(" ");
165177
- return b2`
165315
+ const value2 = getCellValue(itemArg, col, this.displayFunction);
165316
+ const content3 = col.renderer ? col.renderer(value2, itemArg, { rowIndex, colIndex, column: col }) : value2;
165317
+ const editKey = String(col.key);
165318
+ const isEditable = !!(col.editable || col.editor);
165319
+ const isFocused = this.__focusedCell?.rowId === rowId && this.__focusedCell?.colKey === editKey;
165320
+ const isEditing = this.__editingCell?.rowId === rowId && this.__editingCell?.colKey === editKey;
165321
+ const isFlashing = !!flashSet?.has(editKey);
165322
+ const cellClasses = [
165323
+ isEditable ? "editable" : "",
165324
+ isFocused && !isEditing ? "focused" : "",
165325
+ isEditing ? "editingCell" : ""
165326
+ ].filter(Boolean).join(" ");
165327
+ const innerHtml = b2`<div
165328
+ class=${isFlashing ? "innerCellContainer flashing" : "innerCellContainer"}
165329
+ >
165330
+ ${isEditing ? this.renderCellEditor(itemArg, col) : content3}
165331
+ </div>`;
165332
+ return b2`
165178
165333
  <td
165179
165334
  class=${cellClasses}
165180
165335
  data-col-key=${editKey}
165181
165336
  >
165182
- <div class="innerCellContainer">
165183
- ${isEditing ? this.renderCellEditor(itemArg, col) : content3}
165184
- </div>
165337
+ ${isFlashing ? directives_exports.keyed(
165338
+ `${rowId}:${editKey}:${this.__flashTick}`,
165339
+ innerHtml
165340
+ ) : innerHtml}
165185
165341
  </td>
165186
165342
  `;
165187
- })}
165343
+ })}
165188
165344
  ${(() => {
165189
- if (this.dataActions && this.dataActions.length > 0) {
165190
- return b2`
165345
+ if (this.dataActions && this.dataActions.length > 0) {
165346
+ return b2`
165191
165347
  <td class="actionsCol">
165192
165348
  <div class="actionsContainer">
165193
165349
  ${this.getActionsForType("inRow").map(
165194
- (actionArg) => b2`
165350
+ (actionArg) => b2`
165195
165351
  <div
165196
165352
  class="action"
165197
165353
  @click=${() => actionArg.actionFunc({
165198
- item: itemArg,
165199
- table: this
165200
- })}
165354
+ item: itemArg,
165355
+ table: this
165356
+ })}
165201
165357
  >
165202
165358
  ${actionArg.iconName ? b2` <dees-icon .icon=${actionArg.iconName}></dees-icon> ` : actionArg.name}
165203
165359
  </div>
165204
165360
  `
165205
- )}
165361
+ )}
165206
165362
  </div>
165207
165363
  </td>
165208
165364
  `;
165209
- }
165210
- })()}
165365
+ }
165366
+ })()}
165211
165367
  </tr>`;
165212
- })}
165368
+ }
165369
+ )}
165213
165370
  ${useVirtual && bottomSpacerHeight > 0 ? b2`<tr aria-hidden="true" style="height:${bottomSpacerHeight}px"><td></td></tr>` : b2``}
165214
165371
  </tbody>
165215
165372
  </table>
@@ -165300,7 +165457,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165300
165457
  const key2 = String(col.key);
165301
165458
  if (col.filterable === false) return b2`<th></th>`;
165302
165459
  return b2`<th>
165303
- <input type="text" placeholder="Filter..." .value=${this.columnFilters[key2] || ""}
165460
+ <input type="text" placeholder="Filter..." data-col-key=${key2} .value=${this.columnFilters[key2] || ""}
165304
165461
  @input=${(e11) => this.setColumnFilter(key2, e11.target.value)} />
165305
165462
  </th>`;
165306
165463
  })}
@@ -165422,6 +165579,79 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165422
165579
  const fh = this.__floatingHeaderEl;
165423
165580
  if (fh) fh.classList.remove("active");
165424
165581
  }
165582
+ /**
165583
+ * If a filter `<input>` inside the floating-header clone currently has
165584
+ * focus, copy its value, caret, and selection range onto the matching
165585
+ * input in the real header, then focus that real input. This lets the
165586
+ * user keep typing uninterrupted when filter input causes the table to
165587
+ * shrink below the viewport stick line and the floating header has to
165588
+ * unmount.
165589
+ *
165590
+ * Safe to call at any time — it is a no-op unless an input inside the
165591
+ * floating header is focused and has a `data-col-key` attribute that
165592
+ * matches a real-header input.
165593
+ */
165594
+ __transferFocusToRealHeader() {
165595
+ const fh = this.__floatingHeaderEl;
165596
+ if (!fh) return;
165597
+ const active = this.shadowRoot?.activeElement;
165598
+ if (!active || !fh.contains(active)) return;
165599
+ const colKey = active.getAttribute("data-col-key");
165600
+ if (!colKey) return;
165601
+ const fromInput = active;
165602
+ const real = this.shadowRoot?.querySelector(
165603
+ `.tableScroll > table > thead input[data-col-key="${CSS.escape(colKey)}"]`
165604
+ );
165605
+ if (!real || real === fromInput) return;
165606
+ const selStart = fromInput.selectionStart;
165607
+ const selEnd = fromInput.selectionEnd;
165608
+ const selDir = fromInput.selectionDirection;
165609
+ real.focus({ preventScroll: true });
165610
+ try {
165611
+ if (selStart != null && selEnd != null) {
165612
+ real.setSelectionRange(selStart, selEnd, selDir || void 0);
165613
+ }
165614
+ } catch {
165615
+ }
165616
+ }
165617
+ /**
165618
+ * Symmetric counterpart to `__transferFocusToRealHeader`. When the
165619
+ * floating header has just activated and a real-header filter input
165620
+ * was focused (and is now scrolled off-screen behind the floating
165621
+ * clone), move focus to the clone's matching input so the user keeps
165622
+ * typing in the visible one.
165623
+ *
165624
+ * Called from `__syncFloatingHeader` inside the post-activation
165625
+ * `updateComplete` callback — by then the clone subtree exists in the
165626
+ * DOM and can receive focus.
165627
+ */
165628
+ __transferFocusToFloatingHeader() {
165629
+ const fh = this.__floatingHeaderEl;
165630
+ if (!fh || !this.__floatingActive) return;
165631
+ const active = this.shadowRoot?.activeElement;
165632
+ if (!active) return;
165633
+ const realThead = this.shadowRoot?.querySelector(
165634
+ ".tableScroll > table > thead"
165635
+ );
165636
+ if (!realThead || !realThead.contains(active)) return;
165637
+ const colKey = active.getAttribute("data-col-key");
165638
+ if (!colKey) return;
165639
+ const fromInput = active;
165640
+ const clone = fh.querySelector(
165641
+ `input[data-col-key="${CSS.escape(colKey)}"]`
165642
+ );
165643
+ if (!clone || clone === fromInput) return;
165644
+ const selStart = fromInput.selectionStart;
165645
+ const selEnd = fromInput.selectionEnd;
165646
+ const selDir = fromInput.selectionDirection;
165647
+ clone.focus({ preventScroll: true });
165648
+ try {
165649
+ if (selStart != null && selEnd != null) {
165650
+ clone.setSelectionRange(selStart, selEnd, selDir || void 0);
165651
+ }
165652
+ } catch {
165653
+ }
165654
+ }
165425
165655
  // ─── Virtualization ─────────────────────────────────────────────────
165426
165656
  /**
165427
165657
  * Computes the visible row range based on the table's position in its
@@ -165509,6 +165739,9 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165509
165739
  const distance = tableRect.bottom - stick.top;
165510
165740
  const shouldBeActive = tableRect.top < stick.top && distance > 0;
165511
165741
  if (shouldBeActive !== this.__floatingActive) {
165742
+ if (!shouldBeActive) {
165743
+ this.__transferFocusToRealHeader();
165744
+ }
165512
165745
  this.__floatingActive = shouldBeActive;
165513
165746
  fh.classList.toggle("active", shouldBeActive);
165514
165747
  if (!shouldBeActive) {
@@ -165517,7 +165750,10 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165517
165750
  if (ft) ft.style.transform = "";
165518
165751
  }
165519
165752
  if (shouldBeActive) {
165520
- this.updateComplete.then(() => this.__syncFloatingHeader());
165753
+ this.updateComplete.then(() => {
165754
+ this.__syncFloatingHeader();
165755
+ this.__transferFocusToFloatingHeader();
165756
+ });
165521
165757
  return;
165522
165758
  }
165523
165759
  }
@@ -165554,11 +165790,121 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
165554
165790
  async disconnectedCallback() {
165555
165791
  super.disconnectedCallback();
165556
165792
  this.teardownFloatingHeader();
165793
+ if (this.__flashClearTimer) {
165794
+ clearTimeout(this.__flashClearTimer);
165795
+ this.__flashClearTimer = void 0;
165796
+ }
165557
165797
  }
165558
165798
  async firstUpdated() {
165559
165799
  }
165800
+ /**
165801
+ * Runs before each render. Drives two independent concerns:
165802
+ *
165803
+ * 1. **Selection rebind** — when `data` is reassigned to a fresh array
165804
+ * (typical live-data pattern), `selectedDataRow` still points at the
165805
+ * stale row object from the old array. We re-resolve it by rowKey so
165806
+ * consumers of `selectedDataRow` (footer indicator, header/footer
165807
+ * actions, copy fallback) see the live reference. `selectedIds`,
165808
+ * `__focusedCell`, `__editingCell`, `__selectionAnchorId` are all
165809
+ * keyed by string rowId and persist automatically — no change needed.
165810
+ * This runs regardless of `highlightUpdates` — it is a baseline
165811
+ * correctness fix for live data.
165812
+ *
165813
+ * 2. **Flash diff** — when `highlightUpdates === 'flash'`, diff the new
165814
+ * data against `__prevSnapshot` and populate `__flashingCells` with
165815
+ * the (rowId, colKey) pairs whose resolved cell value changed. A
165816
+ * single shared timer clears `__flashingCells` after
165817
+ * `highlightDuration` ms. Skipped if `rowKey` is missing (with a
165818
+ * one-shot console.warn; the render surface also shows a warning
165819
+ * banner).
165820
+ */
165821
+ willUpdate(changedProperties) {
165822
+ if (changedProperties.has("data") && this.selectedDataRow && this.rowKey) {
165823
+ const prevId = this.getRowId(this.selectedDataRow);
165824
+ let found2;
165825
+ for (const row of this.data) {
165826
+ if (this.getRowId(row) === prevId) {
165827
+ found2 = row;
165828
+ break;
165829
+ }
165830
+ }
165831
+ if (found2) {
165832
+ if (found2 !== this.selectedDataRow) this.selectedDataRow = found2;
165833
+ } else {
165834
+ this.selectedDataRow = void 0;
165835
+ }
165836
+ }
165837
+ if (this.highlightUpdates !== "flash") {
165838
+ if (this.__prevSnapshot || this.__flashingCells.size > 0) {
165839
+ this.__prevSnapshot = void 0;
165840
+ if (this.__flashingCells.size > 0) this.__flashingCells = /* @__PURE__ */ new Map();
165841
+ if (this.__flashClearTimer) {
165842
+ clearTimeout(this.__flashClearTimer);
165843
+ this.__flashClearTimer = void 0;
165844
+ }
165845
+ }
165846
+ return;
165847
+ }
165848
+ if (!this.rowKey) {
165849
+ if (!this.__flashWarnedNoRowKey) {
165850
+ this.__flashWarnedNoRowKey = true;
165851
+ console.warn(
165852
+ '[dees-table] highlightUpdates="flash" requires `rowKey` to be set. Flash is disabled. Set the rowKey property/attribute to a stable identifier on your row data (e.g. `rowKey="id"`).'
165853
+ );
165854
+ }
165855
+ return;
165856
+ }
165857
+ if (!changedProperties.has("data")) return;
165858
+ const effectiveColumns = this.__getEffectiveColumns();
165859
+ const visibleCols = effectiveColumns.filter((c11) => !c11.hidden);
165860
+ const nextSnapshot = /* @__PURE__ */ new Map();
165861
+ const newlyFlashing = /* @__PURE__ */ new Map();
165862
+ for (const row of this.data) {
165863
+ const rowId = this.getRowId(row);
165864
+ const cellMap = /* @__PURE__ */ new Map();
165865
+ for (const col of visibleCols) {
165866
+ cellMap.set(String(col.key), getCellValue(row, col, this.displayFunction));
165867
+ }
165868
+ nextSnapshot.set(rowId, cellMap);
165869
+ const prevCells = this.__prevSnapshot?.get(rowId);
165870
+ if (!prevCells) continue;
165871
+ for (const [colKey, nextVal] of cellMap) {
165872
+ if (prevCells.get(colKey) !== nextVal) {
165873
+ if (this.__editingCell && this.__editingCell.rowId === rowId && this.__editingCell.colKey === colKey) continue;
165874
+ let set3 = newlyFlashing.get(rowId);
165875
+ if (!set3) {
165876
+ set3 = /* @__PURE__ */ new Set();
165877
+ newlyFlashing.set(rowId, set3);
165878
+ }
165879
+ set3.add(colKey);
165880
+ }
165881
+ }
165882
+ }
165883
+ const hadPrev = !!this.__prevSnapshot;
165884
+ this.__prevSnapshot = nextSnapshot;
165885
+ if (!hadPrev) return;
165886
+ if (newlyFlashing.size === 0) return;
165887
+ for (const [rowId, cols] of newlyFlashing) {
165888
+ const existing = this.__flashingCells.get(rowId);
165889
+ if (existing) {
165890
+ for (const c11 of cols) existing.add(c11);
165891
+ } else {
165892
+ this.__flashingCells.set(rowId, cols);
165893
+ }
165894
+ }
165895
+ this.__flashTick++;
165896
+ this.__flashingCells = new Map(this.__flashingCells);
165897
+ if (this.__flashClearTimer) clearTimeout(this.__flashClearTimer);
165898
+ this.__flashClearTimer = setTimeout(() => {
165899
+ this.__flashingCells = /* @__PURE__ */ new Map();
165900
+ this.__flashClearTimer = void 0;
165901
+ }, Math.max(0, this.highlightDuration));
165902
+ }
165560
165903
  async updated(changedProperties) {
165561
165904
  super.updated(changedProperties);
165905
+ if (changedProperties.has("highlightDuration")) {
165906
+ this.style.setProperty("--dees-table-flash-duration", `${this.highlightDuration}ms`);
165907
+ }
165562
165908
  const dataOrColsChanged = !this.__columnsSizedFor || this.__columnsSizedFor.data !== this.data || this.__columnsSizedFor.columns !== this.columns;
165563
165909
  if (dataOrColsChanged) {
165564
165910
  this.__columnsSizedFor = { data: this.data, columns: this.columns };
@@ -166268,6 +166614,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
166268
166614
  }
166269
166615
  if (parsed !== oldValue) {
166270
166616
  item[col.key] = parsed;
166617
+ this.__recordCellInSnapshot(item, col);
166271
166618
  this.dispatchEvent(
166272
166619
  new CustomEvent("cellEdit", {
166273
166620
  detail: { row: item, key: key2, oldValue, newValue: parsed },
@@ -166280,6 +166627,23 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
166280
166627
  this.__editingCell = void 0;
166281
166628
  this.requestUpdate();
166282
166629
  }
166630
+ /**
166631
+ * Updates the flash diff snapshot for a single cell to match its current
166632
+ * resolved value. Called from `commitCellEdit` so a user-initiated edit
166633
+ * does not register as an external change on the next diff pass.
166634
+ * No-op when flash mode is off or no snapshot exists yet.
166635
+ */
166636
+ __recordCellInSnapshot(item, col) {
166637
+ if (this.highlightUpdates !== "flash" || !this.__prevSnapshot) return;
166638
+ if (!this.rowKey) return;
166639
+ const rowId = this.getRowId(item);
166640
+ let cellMap = this.__prevSnapshot.get(rowId);
166641
+ if (!cellMap) {
166642
+ cellMap = /* @__PURE__ */ new Map();
166643
+ this.__prevSnapshot.set(rowId, cellMap);
166644
+ }
166645
+ cellMap.set(String(col.key), getCellValue(item, col, this.displayFunction));
166646
+ }
166283
166647
  /** Renders the appropriate dees-input-* component for this column. */
166284
166648
  renderCellEditor(item, col) {
166285
166649
  const raw2 = item[col.key];
@@ -166433,6 +166797,8 @@ _showColumnFilters = new WeakMap();
166433
166797
  _showSelectionCheckbox = new WeakMap();
166434
166798
  _virtualized = new WeakMap();
166435
166799
  _virtualOverscan = new WeakMap();
166800
+ _highlightUpdates = new WeakMap();
166801
+ _highlightDuration = new WeakMap();
166436
166802
  _fixedHeight = new WeakMap();
166437
166803
  _searchMode = new WeakMap();
166438
166804
  _selectionMode = new WeakMap();
@@ -166440,6 +166806,7 @@ _selectedIds = new WeakMap();
166440
166806
  ___focusedCell = new WeakMap();
166441
166807
  ___editingCell = new WeakMap();
166442
166808
  ___floatingActive = new WeakMap();
166809
+ ___flashingCells = new WeakMap();
166443
166810
  ___virtualRange = new WeakMap();
166444
166811
  __decorateElement(_init39, 4, "heading1", _heading1_dec, _DeesTable, _heading1);
166445
166812
  __decorateElement(_init39, 4, "heading2", _heading2_dec, _DeesTable, _heading22);
@@ -166467,6 +166834,8 @@ __decorateElement(_init39, 4, "showColumnFilters", _showColumnFilters_dec, _Dees
166467
166834
  __decorateElement(_init39, 4, "showSelectionCheckbox", _showSelectionCheckbox_dec, _DeesTable, _showSelectionCheckbox);
166468
166835
  __decorateElement(_init39, 4, "virtualized", _virtualized_dec, _DeesTable, _virtualized);
166469
166836
  __decorateElement(_init39, 4, "virtualOverscan", _virtualOverscan_dec, _DeesTable, _virtualOverscan);
166837
+ __decorateElement(_init39, 4, "highlightUpdates", _highlightUpdates_dec, _DeesTable, _highlightUpdates);
166838
+ __decorateElement(_init39, 4, "highlightDuration", _highlightDuration_dec, _DeesTable, _highlightDuration);
166470
166839
  __decorateElement(_init39, 4, "fixedHeight", _fixedHeight_dec, _DeesTable, _fixedHeight);
166471
166840
  __decorateElement(_init39, 4, "searchMode", _searchMode_dec, _DeesTable, _searchMode);
166472
166841
  __decorateElement(_init39, 4, "selectionMode", _selectionMode_dec, _DeesTable, _selectionMode);
@@ -166474,6 +166843,7 @@ __decorateElement(_init39, 4, "selectedIds", _selectedIds_dec, _DeesTable, _sele
166474
166843
  __decorateElement(_init39, 4, "__focusedCell", ___focusedCell_dec, _DeesTable, ___focusedCell);
166475
166844
  __decorateElement(_init39, 4, "__editingCell", ___editingCell_dec, _DeesTable, ___editingCell);
166476
166845
  __decorateElement(_init39, 4, "__floatingActive", ___floatingActive_dec, _DeesTable, ___floatingActive);
166846
+ __decorateElement(_init39, 4, "__flashingCells", ___flashingCells_dec, _DeesTable, ___flashingCells);
166477
166847
  __decorateElement(_init39, 4, "__virtualRange", ___virtualRange_dec, _DeesTable, ___virtualRange);
166478
166848
  _DeesTable = __decorateElement(_init39, 0, "DeesTable", _DeesTable_decorators, _DeesTable);
166479
166849
  __name(_DeesTable, "DeesTable");
@@ -200497,7 +200867,7 @@ init_group_runtime();
200497
200867
  // ts_web/00_commitinfo_data.ts
200498
200868
  var commitinfo = {
200499
200869
  name: "@design.estate/dees-catalog",
200500
- version: "3.69.1",
200870
+ version: "3.70.1",
200501
200871
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
200502
200872
  };
200503
200873
  export {
@@ -202470,4 +202840,4 @@ ibantools/jsnext/ibantools.js:
202470
202840
  * @preferred
202471
202841
  *)
202472
202842
  */
202473
- //# sourceMappingURL=bundle-1775642292133.js.map
202843
+ //# sourceMappingURL=bundle-1775897260164.js.map