@design.estate/dees-catalog 1.0.204 → 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 +126 -120
- 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 +47 -10
- package/dist_watch/bundle.js +45 -14
- 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 +54 -9
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 {
|
|
@@ -199,7 +199,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
199
199
|
cursor: pointer;
|
|
200
200
|
}
|
|
201
201
|
tr:hover td {
|
|
202
|
-
background: ${cssManager.bdTheme('#22222210', '#
|
|
202
|
+
background: ${cssManager.bdTheme('#22222210', '#ffffff10')};
|
|
203
203
|
}
|
|
204
204
|
tr:first-child:hover {
|
|
205
205
|
cursor: auto;
|
|
@@ -208,8 +208,13 @@ export class DeesTable<T> extends DeesElement {
|
|
|
208
208
|
background: none;
|
|
209
209
|
}
|
|
210
210
|
tr.selected td {
|
|
211
|
-
background: ${cssManager.bdTheme('#22222220', '#
|
|
211
|
+
background: ${cssManager.bdTheme('#22222220', '#ffffff20')};
|
|
212
212
|
}
|
|
213
|
+
|
|
214
|
+
tr.hasAttachment td {
|
|
215
|
+
background: ${cssManager.bdTheme('#0098847c', '#0098847c')};
|
|
216
|
+
}
|
|
217
|
+
|
|
213
218
|
th {
|
|
214
219
|
text-transform: uppercase;
|
|
215
220
|
}
|
|
@@ -249,7 +254,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
249
254
|
right: 0px;
|
|
250
255
|
left: 0px;
|
|
251
256
|
position: absolute;
|
|
252
|
-
background: #
|
|
257
|
+
background: #fa610140;
|
|
253
258
|
color: inherit;
|
|
254
259
|
font-family: inherit;
|
|
255
260
|
font-size: inherit;
|
|
@@ -258,9 +263,10 @@ export class DeesTable<T> extends DeesElement {
|
|
|
258
263
|
}
|
|
259
264
|
|
|
260
265
|
.action {
|
|
261
|
-
margin: -
|
|
262
|
-
padding:
|
|
263
|
-
line-height:
|
|
266
|
+
margin: -6px 0px;
|
|
267
|
+
padding: 10px;
|
|
268
|
+
line-height: 36px;
|
|
269
|
+
height: 36px;
|
|
264
270
|
display: inline-block;
|
|
265
271
|
}
|
|
266
272
|
|
|
@@ -270,7 +276,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
270
276
|
}
|
|
271
277
|
|
|
272
278
|
.action:hover {
|
|
273
|
-
background: ${cssManager.bdTheme('#CCC', '#
|
|
279
|
+
background: ${cssManager.bdTheme('#CCC', '#00000030')};
|
|
274
280
|
}
|
|
275
281
|
|
|
276
282
|
.footer {
|
|
@@ -391,14 +397,14 @@ export class DeesTable<T> extends DeesElement {
|
|
|
391
397
|
console.log('dragenter');
|
|
392
398
|
console.log(realTarget);
|
|
393
399
|
setTimeout(() => {
|
|
394
|
-
realTarget.
|
|
400
|
+
realTarget.classList.add('hasAttachment');
|
|
395
401
|
}, 0);
|
|
396
402
|
}}
|
|
397
403
|
@dragleave=${async (eventArg: DragEvent) => {
|
|
398
404
|
eventArg.preventDefault();
|
|
399
405
|
eventArg.stopPropagation();
|
|
400
406
|
const realTarget = getTr(eventArg.target as HTMLElement);
|
|
401
|
-
realTarget.
|
|
407
|
+
realTarget.classList.remove('hasAttachment');
|
|
402
408
|
}}
|
|
403
409
|
@dragover=${async (eventArg: DragEvent) => {
|
|
404
410
|
eventArg.preventDefault();
|
|
@@ -520,6 +526,45 @@ export class DeesTable<T> extends DeesElement {
|
|
|
520
526
|
|
|
521
527
|
public async firstUpdated() {}
|
|
522
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
|
+
|
|
523
568
|
getActionsForType(typeArg: ITableAction['type'][0]) {
|
|
524
569
|
const actions: ITableAction[] = [];
|
|
525
570
|
for (const action of this.dataActions) {
|