@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.204",
3
+ "version": "1.0.207",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.204',
6
+ version: '1.0.207',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -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 #000;
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 {
@@ -124,7 +124,7 @@ export class DeesInputText extends DeesElement {
124
124
 
125
125
  .showPassword:hover {
126
126
  cursor: pointer;
127
- background: #333;
127
+ background: ${cssManager.bdTheme('#00000010', '#ffffff10')};
128
128
  }
129
129
  </style>
130
130
  <div class="maincontainer">
@@ -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', '#ffffff20')};
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', '#ffffff40')};
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: #00000060;
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: -8px 0px;
262
- padding: 8px;
263
- line-height: 16px;
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', '#111')};
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.style.background = 'green';
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.style.background = 'none';
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) {