@design.estate/dees-catalog 1.0.206 → 1.0.207
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 +115 -115
- package/dist_bundle/bundle.js.map +3 -3
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/dees-contextmenu.js +5 -5
- package/dist_ts_web/elements/dees-input-text.js +2 -2
- package/dist_ts_web/elements/dees-table.d.ts +2 -0
- package/dist_ts_web/elements/dees-table.js +32 -1
- package/dist_watch/bundle.js +30 -5
- package/dist_watch/bundle.js.map +3 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-contextmenu.ts +4 -4
- package/ts_web/elements/dees-input-text.ts +1 -1
- package/ts_web/elements/dees-table.ts +39 -0
package/package.json
CHANGED
|
@@ -71,11 +71,11 @@ export class DeesContextmenu extends DeesElement {
|
|
|
71
71
|
color: ${cssManager.bdTheme('#222', '#ccc')};
|
|
72
72
|
font-size: 14px;
|
|
73
73
|
width: 200px;
|
|
74
|
-
border: 1px solid #444;
|
|
74
|
+
border: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
|
75
75
|
min-height: 34px;
|
|
76
76
|
border-radius: 3px;
|
|
77
|
-
background: #222;
|
|
78
|
-
box-shadow: 0px 1px 4px #
|
|
77
|
+
background: ${cssManager.bdTheme('#fff', '#222')};
|
|
78
|
+
box-shadow: 0px 1px 4px ${cssManager.bdTheme('#00000020', '#000000')};
|
|
79
79
|
user-select: none;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -92,7 +92,7 @@ export class DeesContextmenu extends DeesElement {
|
|
|
92
92
|
|
|
93
93
|
.mainbox .menuitem:hover {
|
|
94
94
|
cursor: pointer;
|
|
95
|
-
background: #ffffff10;
|
|
95
|
+
background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.mainbox .menuitem:active {
|
|
@@ -526,6 +526,45 @@ export class DeesTable<T> extends DeesElement {
|
|
|
526
526
|
|
|
527
527
|
public async firstUpdated() {}
|
|
528
528
|
|
|
529
|
+
public async updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void> {
|
|
530
|
+
super.updated(changedProperties);
|
|
531
|
+
this.freezeColumnWidths();
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
freezeColumnWidths() {
|
|
535
|
+
// Get the table element
|
|
536
|
+
const table = this.shadowRoot.querySelector('table');
|
|
537
|
+
if (!table) return;
|
|
538
|
+
|
|
539
|
+
// Create a colgroup if it doesn't exist
|
|
540
|
+
let colgroup = table.querySelector('colgroup');
|
|
541
|
+
if (!colgroup) {
|
|
542
|
+
colgroup = document.createElement('colgroup');
|
|
543
|
+
table.insertBefore(colgroup, table.firstChild);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Get the first row's cells to measure the widths
|
|
547
|
+
const cells = table.rows[0].cells;
|
|
548
|
+
|
|
549
|
+
for (let i = 0; i < cells.length; i++) {
|
|
550
|
+
const cell = cells[i];
|
|
551
|
+
|
|
552
|
+
// Get computed width
|
|
553
|
+
const width = window.getComputedStyle(cell).width;
|
|
554
|
+
|
|
555
|
+
// Check if there's already a <col> for this cell
|
|
556
|
+
let col = colgroup.children[i] as HTMLElement;
|
|
557
|
+
if (!col) {
|
|
558
|
+
col = document.createElement('col');
|
|
559
|
+
colgroup.appendChild(col);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// Set the width
|
|
563
|
+
col.style.width = width;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
|
|
529
568
|
getActionsForType(typeArg: ITableAction['type'][0]) {
|
|
530
569
|
const actions: ITableAction[] = [];
|
|
531
570
|
for (const action of this.dataActions) {
|