@design.estate/dees-catalog 3.78.2 → 3.78.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +72 -76
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.d.ts +5 -4
- package/dist_ts_web/elements/00group-dataview/dees-table/dees-table.js +84 -90
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-dataview/dees-table/dees-table.ts +97 -99
package/dist_bundle/bundle.js
CHANGED
|
@@ -165126,7 +165126,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165126
165126
|
__publicField(this, "__prevSnapshot");
|
|
165127
165127
|
/** Single shared timer that clears __flashingCells after highlightDuration ms. */
|
|
165128
165128
|
__publicField(this, "__flashClearTimer");
|
|
165129
|
-
/** Monotonic counter bumped
|
|
165129
|
+
/** Monotonic counter bumped per flash batch so only changed cells restart their animation. */
|
|
165130
165130
|
__publicField(this, "__flashTick", 0);
|
|
165131
165131
|
/** One-shot console.warn gate for missing rowKey in flash mode. */
|
|
165132
165132
|
__publicField(this, "__flashWarnedNoRowKey", false);
|
|
@@ -165136,7 +165136,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165136
165136
|
// must never trigger a re-render.
|
|
165137
165137
|
__publicField(this, "__memoEffectiveCols");
|
|
165138
165138
|
__publicField(this, "__memoViewData");
|
|
165139
|
-
/** Tracks the
|
|
165139
|
+
/** Tracks the layout inputs that `determineColumnWidths()` last sized for. */
|
|
165140
165140
|
__publicField(this, "__columnsSizedFor");
|
|
165141
165141
|
// ─── Virtualization state ────────────────────────────────────────────
|
|
165142
165142
|
/** Estimated row height (px). Measured once from the first rendered row. */
|
|
@@ -165198,12 +165198,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165198
165198
|
const view = this._lastViewData ?? [];
|
|
165199
165199
|
const item = view.find((r11) => this.getRowId(r11) === this.__focusedCell.rowId);
|
|
165200
165200
|
if (!item) return;
|
|
165201
|
-
const allCols =
|
|
165202
|
-
this.columns,
|
|
165203
|
-
this.augmentFromDisplayFunction,
|
|
165204
|
-
this.displayFunction,
|
|
165205
|
-
this.data
|
|
165206
|
-
) : computeColumnsFromDisplayFunction(this.displayFunction, this.data);
|
|
165201
|
+
const allCols = this.__getEffectiveColumns();
|
|
165207
165202
|
const col = allCols.find((c11) => String(c11.key) === this.__focusedCell.colKey);
|
|
165208
165203
|
if (!col || !this.__isColumnEditable(col)) return;
|
|
165209
165204
|
eventArg.preventDefault();
|
|
@@ -165364,10 +165359,16 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165364
165359
|
* that affect it. Avoids re-running `computeEffectiveColumnsFn` /
|
|
165365
165360
|
* `computeColumnsFromDisplayFunctionFn` on every Lit update.
|
|
165366
165361
|
*/
|
|
165362
|
+
__getDisplayFunctionShapeKey() {
|
|
165363
|
+
if (!this.data || this.data.length === 0) return "";
|
|
165364
|
+
const firstTransformedItem = this.displayFunction(this.data[0]) ?? {};
|
|
165365
|
+
return Object.keys(firstTransformedItem).join("\0");
|
|
165366
|
+
}
|
|
165367
165367
|
__getEffectiveColumns() {
|
|
165368
165368
|
const usingColumns = Array.isArray(this.columns) && this.columns.length > 0;
|
|
165369
|
+
const displayShapeKey = !usingColumns || this.augmentFromDisplayFunction ? this.__getDisplayFunctionShapeKey() : "";
|
|
165369
165370
|
const cache = this.__memoEffectiveCols;
|
|
165370
|
-
if (cache && cache.columns === this.columns && cache.augment === this.augmentFromDisplayFunction && cache.displayFunction === this.displayFunction && cache.
|
|
165371
|
+
if (cache && cache.columns === this.columns && cache.augment === this.augmentFromDisplayFunction && cache.displayFunction === this.displayFunction && cache.displayShapeKey === displayShapeKey) {
|
|
165371
165372
|
return cache.out;
|
|
165372
165373
|
}
|
|
165373
165374
|
const out = usingColumns ? computeEffectiveColumns(
|
|
@@ -165380,7 +165381,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165380
165381
|
columns: this.columns,
|
|
165381
165382
|
augment: this.augmentFromDisplayFunction,
|
|
165382
165383
|
displayFunction: this.displayFunction,
|
|
165383
|
-
|
|
165384
|
+
displayShapeKey,
|
|
165384
165385
|
out
|
|
165385
165386
|
};
|
|
165386
165387
|
return out;
|
|
@@ -165420,6 +165421,9 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165420
165421
|
render() {
|
|
165421
165422
|
const effectiveColumns = this.__getEffectiveColumns();
|
|
165422
165423
|
const viewData = this.__getViewData(effectiveColumns);
|
|
165424
|
+
const headerActions = this.getActionsForType("header");
|
|
165425
|
+
const footerActions = this.getActionsForType("footer");
|
|
165426
|
+
const inRowActions = this.getActionsForType("inRow");
|
|
165423
165427
|
this._lastViewData = viewData;
|
|
165424
165428
|
const useVirtual = this.virtualized && viewData.length > 0;
|
|
165425
165429
|
let renderRows = viewData;
|
|
@@ -165444,27 +165448,20 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165444
165448
|
<div class="heading heading2">${this.heading2}</div>
|
|
165445
165449
|
</div>
|
|
165446
165450
|
<div class="headerActions">
|
|
165447
|
-
${
|
|
165448
|
-
|
|
165449
|
-
|
|
165450
|
-
|
|
165451
|
-
|
|
165452
|
-
|
|
165453
|
-
|
|
165454
|
-
|
|
165455
|
-
|
|
165456
|
-
|
|
165457
|
-
|
|
165458
|
-
|
|
165459
|
-
|
|
165460
|
-
|
|
165461
|
-
${action.iconName ? b2`<dees-icon .iconSize=${14} .icon=${action.iconName}></dees-icon>
|
|
165462
|
-
${action.name}` : action.name}
|
|
165463
|
-
</div>`
|
|
165464
|
-
);
|
|
165465
|
-
}
|
|
165466
|
-
return resultArray;
|
|
165467
|
-
})}
|
|
165451
|
+
${headerActions.map(
|
|
165452
|
+
(action) => b2`<div
|
|
165453
|
+
class="headerAction"
|
|
165454
|
+
@click=${() => {
|
|
165455
|
+
action.actionFunc({
|
|
165456
|
+
item: this.selectedDataRow,
|
|
165457
|
+
table: this
|
|
165458
|
+
});
|
|
165459
|
+
}}
|
|
165460
|
+
>
|
|
165461
|
+
${action.iconName ? b2`<dees-icon .iconSize=${14} .icon=${action.iconName}></dees-icon>
|
|
165462
|
+
${action.name}` : action.name}
|
|
165463
|
+
</div>`
|
|
165464
|
+
)}
|
|
165468
165465
|
</div>
|
|
165469
165466
|
</div>
|
|
165470
165467
|
<div class="headingSeparation"></div>
|
|
@@ -165523,11 +165520,11 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165523
165520
|
${useVirtual && topSpacerHeight > 0 ? b2`<tr aria-hidden="true" style="height:${topSpacerHeight}px"><td></td></tr>` : b2``}
|
|
165524
165521
|
${directives_exports.repeat(
|
|
165525
165522
|
renderRows,
|
|
165526
|
-
(itemArg
|
|
165523
|
+
(itemArg) => this.getRowId(itemArg),
|
|
165527
165524
|
(itemArg, sliceIdx) => {
|
|
165528
165525
|
const rowIndex = renderStart + sliceIdx;
|
|
165529
165526
|
const rowId = this.getRowId(itemArg);
|
|
165530
|
-
const
|
|
165527
|
+
const flashTokens = this.__flashingCells.get(rowId);
|
|
165531
165528
|
return b2`
|
|
165532
165529
|
<tr
|
|
165533
165530
|
data-row-idx=${rowIndex}
|
|
@@ -165549,7 +165546,8 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165549
165546
|
const isEditable = !!(col.editable || col.editor);
|
|
165550
165547
|
const isFocused = this.__focusedCell?.rowId === rowId && this.__focusedCell?.colKey === editKey;
|
|
165551
165548
|
const isEditing = this.__editingCell?.rowId === rowId && this.__editingCell?.colKey === editKey;
|
|
165552
|
-
const
|
|
165549
|
+
const flashToken = flashTokens?.get(editKey);
|
|
165550
|
+
const isFlashing = flashToken !== void 0;
|
|
165553
165551
|
const useFlashBorder = isFlashing && !!col.flashBorder;
|
|
165554
165552
|
const cellClasses = [
|
|
165555
165553
|
isEditable ? "editable" : "",
|
|
@@ -165568,18 +165566,18 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165568
165566
|
data-col-key=${editKey}
|
|
165569
165567
|
>
|
|
165570
165568
|
${isFlashing ? directives_exports.keyed(
|
|
165571
|
-
`${rowId}:${editKey}:${
|
|
165569
|
+
`${rowId}:${editKey}:${flashToken}`,
|
|
165572
165570
|
innerHtml
|
|
165573
165571
|
) : innerHtml}
|
|
165574
165572
|
</td>
|
|
165575
165573
|
`;
|
|
165576
165574
|
})}
|
|
165577
165575
|
${(() => {
|
|
165578
|
-
if (
|
|
165576
|
+
if (inRowActions.length > 0) {
|
|
165579
165577
|
return b2`
|
|
165580
165578
|
<td class="actionsCol">
|
|
165581
165579
|
<div class="actionsContainer">
|
|
165582
|
-
${
|
|
165580
|
+
${inRowActions.map(
|
|
165583
165581
|
(actionArg) => b2`
|
|
165584
165582
|
<div
|
|
165585
165583
|
class="action"
|
|
@@ -165619,27 +165617,20 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165619
165617
|
selected
|
|
165620
165618
|
</div>
|
|
165621
165619
|
<div class="footerActions">
|
|
165622
|
-
${
|
|
165623
|
-
|
|
165624
|
-
|
|
165625
|
-
|
|
165626
|
-
|
|
165627
|
-
|
|
165628
|
-
|
|
165629
|
-
|
|
165630
|
-
|
|
165631
|
-
|
|
165632
|
-
|
|
165633
|
-
|
|
165634
|
-
|
|
165635
|
-
|
|
165636
|
-
${action.iconName ? b2`<dees-icon .iconSize=${14} .icon=${action.iconName}></dees-icon>
|
|
165637
|
-
${action.name}` : action.name}
|
|
165638
|
-
</div>`
|
|
165639
|
-
);
|
|
165640
|
-
}
|
|
165641
|
-
return resultArray;
|
|
165642
|
-
})}
|
|
165620
|
+
${footerActions.map(
|
|
165621
|
+
(action) => b2`<div
|
|
165622
|
+
class="footerAction"
|
|
165623
|
+
@click=${() => {
|
|
165624
|
+
action.actionFunc({
|
|
165625
|
+
item: this.selectedDataRow,
|
|
165626
|
+
table: this
|
|
165627
|
+
});
|
|
165628
|
+
}}
|
|
165629
|
+
>
|
|
165630
|
+
${action.iconName ? b2`<dees-icon .iconSize=${14} .icon=${action.iconName}></dees-icon>
|
|
165631
|
+
${action.name}` : action.name}
|
|
165632
|
+
</div>`
|
|
165633
|
+
)}
|
|
165643
165634
|
</div>
|
|
165644
165635
|
</div>
|
|
165645
165636
|
</dees-tile>
|
|
@@ -165931,7 +165922,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
165931
165922
|
/**
|
|
165932
165923
|
* Measures the height of the first rendered body row and stores it for
|
|
165933
165924
|
* subsequent virtualization math. Idempotent — only measures once per
|
|
165934
|
-
*
|
|
165925
|
+
* rendered table layout (cleared in `updated()` when that layout changes).
|
|
165935
165926
|
*/
|
|
165936
165927
|
__measureRowHeight() {
|
|
165937
165928
|
if (!this.virtualized || this.__rowHeightMeasured) return;
|
|
@@ -166128,16 +166119,14 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
166128
166119
|
this.__prevSnapshot = nextSnapshot;
|
|
166129
166120
|
if (!hadPrev) return;
|
|
166130
166121
|
if (newlyFlashing.size === 0) return;
|
|
166122
|
+
const flashToken = ++this.__flashTick;
|
|
166123
|
+
const nextFlashingCells = new Map(this.__flashingCells);
|
|
166131
166124
|
for (const [rowId, cols] of newlyFlashing) {
|
|
166132
|
-
const existing =
|
|
166133
|
-
|
|
166134
|
-
|
|
166135
|
-
} else {
|
|
166136
|
-
this.__flashingCells.set(rowId, cols);
|
|
166137
|
-
}
|
|
166125
|
+
const existing = new Map(nextFlashingCells.get(rowId) ?? []);
|
|
166126
|
+
for (const colKey of cols) existing.set(colKey, flashToken);
|
|
166127
|
+
nextFlashingCells.set(rowId, existing);
|
|
166138
166128
|
}
|
|
166139
|
-
this.
|
|
166140
|
-
this.__flashingCells = new Map(this.__flashingCells);
|
|
166129
|
+
this.__flashingCells = nextFlashingCells;
|
|
166141
166130
|
if (this.__flashClearTimer) clearTimeout(this.__flashClearTimer);
|
|
166142
166131
|
this.__flashClearTimer = setTimeout(() => {
|
|
166143
166132
|
this.__flashingCells = /* @__PURE__ */ new Map();
|
|
@@ -166146,12 +166135,20 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
166146
166135
|
}
|
|
166147
166136
|
async updated(changedProperties) {
|
|
166148
166137
|
super.updated(changedProperties);
|
|
166138
|
+
const effectiveColumns = this.__getEffectiveColumns();
|
|
166139
|
+
const currentTable = this.shadowRoot?.querySelector("table") ?? null;
|
|
166140
|
+
const inRowActionCount = this.getActionsForType("inRow").length;
|
|
166149
166141
|
if (changedProperties.has("highlightDuration")) {
|
|
166150
166142
|
this.style.setProperty("--dees-table-flash-duration", `${this.highlightDuration}ms`);
|
|
166151
166143
|
}
|
|
166152
|
-
const
|
|
166153
|
-
if (
|
|
166154
|
-
this.__columnsSizedFor = {
|
|
166144
|
+
const columnLayoutChanged = !!currentTable && (!this.__columnsSizedFor || this.__columnsSizedFor.effectiveColumns !== effectiveColumns || this.__columnsSizedFor.showSelectionCheckbox !== this.showSelectionCheckbox || this.__columnsSizedFor.inRowActionCount !== inRowActionCount || this.__columnsSizedFor.table !== currentTable);
|
|
166145
|
+
if (currentTable && columnLayoutChanged) {
|
|
166146
|
+
this.__columnsSizedFor = {
|
|
166147
|
+
effectiveColumns,
|
|
166148
|
+
showSelectionCheckbox: this.showSelectionCheckbox,
|
|
166149
|
+
inRowActionCount,
|
|
166150
|
+
table: currentTable
|
|
166151
|
+
};
|
|
166155
166152
|
this.determineColumnWidths();
|
|
166156
166153
|
this.__rowHeightMeasured = false;
|
|
166157
166154
|
}
|
|
@@ -166167,7 +166164,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
166167
166164
|
this.teardownFloatingHeader();
|
|
166168
166165
|
}
|
|
166169
166166
|
}
|
|
166170
|
-
if (!this.fixedHeight && this.data.length > 0 && (this.__floatingActive ||
|
|
166167
|
+
if (!this.fixedHeight && this.data.length > 0 && (this.__floatingActive || columnLayoutChanged)) {
|
|
166171
166168
|
this.__syncFloatingHeader();
|
|
166172
166169
|
}
|
|
166173
166170
|
if (this.searchable) {
|
|
@@ -166433,8 +166430,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
166433
166430
|
* Used by the modal helper to render human-friendly labels.
|
|
166434
166431
|
*/
|
|
166435
166432
|
_lookupColumnByKey(key2) {
|
|
166436
|
-
const
|
|
166437
|
-
const effective = usingColumns ? computeEffectiveColumns(this.columns, this.augmentFromDisplayFunction, this.displayFunction, this.data) : computeColumnsFromDisplayFunction(this.displayFunction, this.data);
|
|
166433
|
+
const effective = this.__getEffectiveColumns();
|
|
166438
166434
|
return effective.find((c11) => String(c11.key) === key2);
|
|
166439
166435
|
}
|
|
166440
166436
|
/**
|
|
@@ -166977,7 +166973,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
|
|
|
166977
166973
|
moveFocusedCell(dx, dy, andStartEditing) {
|
|
166978
166974
|
const view = this._lastViewData ?? [];
|
|
166979
166975
|
if (view.length === 0) return;
|
|
166980
|
-
const allCols =
|
|
166976
|
+
const allCols = this.__getEffectiveColumns();
|
|
166981
166977
|
const editableCols = this.__editableColumns(allCols);
|
|
166982
166978
|
if (editableCols.length === 0) return;
|
|
166983
166979
|
let rowIdx = 0;
|
|
@@ -201677,7 +201673,7 @@ init_group_runtime();
|
|
|
201677
201673
|
// ts_web/00_commitinfo_data.ts
|
|
201678
201674
|
var commitinfo = {
|
|
201679
201675
|
name: "@design.estate/dees-catalog",
|
|
201680
|
-
version: "3.78.
|
|
201676
|
+
version: "3.78.3",
|
|
201681
201677
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
201682
201678
|
};
|
|
201683
201679
|
export {
|
|
@@ -203643,4 +203639,4 @@ ibantools/jsnext/ibantools.js:
|
|
|
203643
203639
|
* @preferred
|
|
203644
203640
|
*)
|
|
203645
203641
|
*/
|
|
203646
|
-
//# sourceMappingURL=bundle-
|
|
203642
|
+
//# sourceMappingURL=bundle-1776175095370.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '3.78.
|
|
6
|
+
version: '3.78.3',
|
|
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
|
|
@@ -136,19 +136,19 @@ export declare class DeesTable<T> extends DeesElement {
|
|
|
136
136
|
* needed (saves a full thead worth of cells per render when inactive).
|
|
137
137
|
*/
|
|
138
138
|
private accessor __floatingActive;
|
|
139
|
-
/** rowId →
|
|
139
|
+
/** rowId → (colKey → flash token) for cells currently flashing. */
|
|
140
140
|
private accessor __flashingCells;
|
|
141
141
|
/** rowId → (colKey → last-seen resolved cell value). Populated per diff pass. */
|
|
142
142
|
private __prevSnapshot?;
|
|
143
143
|
/** Single shared timer that clears __flashingCells after highlightDuration ms. */
|
|
144
144
|
private __flashClearTimer?;
|
|
145
|
-
/** Monotonic counter bumped
|
|
145
|
+
/** Monotonic counter bumped per flash batch so only changed cells restart their animation. */
|
|
146
146
|
private __flashTick;
|
|
147
147
|
/** One-shot console.warn gate for missing rowKey in flash mode. */
|
|
148
148
|
private __flashWarnedNoRowKey;
|
|
149
149
|
private __memoEffectiveCols?;
|
|
150
150
|
private __memoViewData?;
|
|
151
|
-
/** Tracks the
|
|
151
|
+
/** Tracks the layout inputs that `determineColumnWidths()` last sized for. */
|
|
152
152
|
private __columnsSizedFor?;
|
|
153
153
|
/** Estimated row height (px). Measured once from the first rendered row. */
|
|
154
154
|
private __rowHeight;
|
|
@@ -177,6 +177,7 @@ export declare class DeesTable<T> extends DeesElement {
|
|
|
177
177
|
* that affect it. Avoids re-running `computeEffectiveColumnsFn` /
|
|
178
178
|
* `computeColumnsFromDisplayFunctionFn` on every Lit update.
|
|
179
179
|
*/
|
|
180
|
+
private __getDisplayFunctionShapeKey;
|
|
180
181
|
private __getEffectiveColumns;
|
|
181
182
|
/**
|
|
182
183
|
* Returns the sorted/filtered view of the data, memoized by reference of
|
|
@@ -248,7 +249,7 @@ export declare class DeesTable<T> extends DeesElement {
|
|
|
248
249
|
/**
|
|
249
250
|
* Measures the height of the first rendered body row and stores it for
|
|
250
251
|
* subsequent virtualization math. Idempotent — only measures once per
|
|
251
|
-
*
|
|
252
|
+
* rendered table layout (cleared in `updated()` when that layout changes).
|
|
252
253
|
*/
|
|
253
254
|
private __measureRowHeight;
|
|
254
255
|
/**
|