Compare commits

..

2 Commits

Author SHA1 Message Date
1b1de04f86 1.0.68 2021-10-07 18:47:36 +02:00
7941628d1d fix(core): update 2021-10-07 18:47:36 +02:00
3 changed files with 33 additions and 19 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.67",
"version": "1.0.68",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@designestate/dees-catalog",
"version": "1.0.67",
"version": "1.0.68",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.94",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.67",
"version": "1.0.68",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

@ -73,7 +73,7 @@ export class DeesTable<T> extends DeesElement {
public heading2: string;
@property({
type: Array
type: Array,
})
public data: T[] = [];
@ -142,6 +142,9 @@ export class DeesTable<T> extends DeesElement {
tr:first-child:hover .innerCellContainer {
background: none;
}
tr.selected .innerCellContainer {
background: #ffffff20
}
th {
text-transform: uppercase;
}
@ -192,28 +195,39 @@ export class DeesTable<T> extends DeesElement {
return html`
<table>
<tr>
${headings.map(headingArg => html`
<th>
<div class="innerCellContainer">${headingArg}</div>
</th>
`)}
${headings.map(
(headingArg) => html`
<th>
<div class="innerCellContainer">${headingArg}</div>
</th>
`
)}
</tr>
${this.data.map(itemArg => html`
<tr>
${headings.map(headingArg => html`
<td>
<div class="innerCellContainer">${itemArg[headingArg]}</div>
</td>
`)}
</tr>
`)}
${this.data.map(
(itemArg) => html`
<tr
@click=${() => {
this.selectedDataRow = itemArg;
}}
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
>
${headings.map(
(headingArg) => html`
<td>
<div class="innerCellContainer">${itemArg[headingArg]}</div>
</td>
`
)}
</tr>
`
)}
</table>
`;
})()
: html` <div class="noDataSet">No data set!</div> `}
<div class="tableStatistics">
${this.data.length} data rows (total) |
${this.selectedDataRow ? html`` : html`No row selected`}
${this.selectedDataRow ? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected` : html`No row selected`}
</div>
</div>
`;