@kodaris/krubble-components 1.0.47 → 1.0.49
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/custom-elements.json +374 -374
- package/dist/krubble-components.bundled.js +47 -27
- package/dist/krubble-components.bundled.js.map +1 -1
- package/dist/krubble-components.bundled.min.js +114 -104
- package/dist/krubble-components.bundled.min.js.map +1 -1
- package/dist/krubble-components.umd.js +47 -27
- package/dist/krubble-components.umd.js.map +1 -1
- package/dist/krubble-components.umd.min.js +104 -94
- package/dist/krubble-components.umd.min.js.map +1 -1
- package/dist/table/table.d.ts +2 -0
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +48 -28
- package/dist/table/table.js.map +1 -1
- package/package.json +1 -1
|
@@ -2558,17 +2558,21 @@ let KRTable = class KRTable extends i$2 {
|
|
|
2558
2558
|
this._data.forEach((row, rowIndex) => {
|
|
2559
2559
|
columns.forEach(col => {
|
|
2560
2560
|
const result = col.render(row);
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2561
|
+
if (!result)
|
|
2562
|
+
return;
|
|
2563
|
+
const el = document.createElement('span');
|
|
2564
|
+
el.slot = `cell-${rowIndex}-${col.id}`;
|
|
2565
|
+
if (col.type === 'actions') {
|
|
2566
|
+
el.style.display = 'flex';
|
|
2567
|
+
el.style.gap = '8px';
|
|
2568
|
+
}
|
|
2569
|
+
if (typeof result === 'string') {
|
|
2570
|
+
el.innerHTML = result;
|
|
2571
2571
|
}
|
|
2572
|
+
else {
|
|
2573
|
+
D(result, el);
|
|
2574
|
+
}
|
|
2575
|
+
this.appendChild(el);
|
|
2572
2576
|
});
|
|
2573
2577
|
});
|
|
2574
2578
|
}
|
|
@@ -3113,23 +3117,34 @@ let KRTable = class KRTable extends i$2 {
|
|
|
3113
3117
|
></div>` : A}</div>
|
|
3114
3118
|
`)}
|
|
3115
3119
|
</div>
|
|
3116
|
-
${this._data.map((row, rowIndex) =>
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3120
|
+
${this._data.map((row, rowIndex) => {
|
|
3121
|
+
const cells = this.getDisplayedColumns().map((col, i) => b `
|
|
3122
|
+
<div
|
|
3123
|
+
class=${e$1(this._getCellClasses(col, i))}
|
|
3124
|
+
style=${o$1(this._getCellStyle(col, i))}
|
|
3125
|
+
data-column-id=${col.id}
|
|
3126
|
+
>
|
|
3127
|
+
${this._renderCellContent(col, row, rowIndex)}
|
|
3128
|
+
</div>
|
|
3129
|
+
`);
|
|
3130
|
+
if (this._def.rowHref) {
|
|
3131
|
+
return b `
|
|
3132
|
+
<a
|
|
3133
|
+
href=${this._def.rowHref(row)}
|
|
3134
|
+
class=${e$1({ 'row': true, 'row--clickable': true, 'row--link': true })}
|
|
3135
|
+
@mousedown=${() => this._handleRowMouseDown()}
|
|
3136
|
+
@click=${() => this._handleRowClick(row, rowIndex)}
|
|
3137
|
+
>${cells}</a>
|
|
3138
|
+
`;
|
|
3139
|
+
}
|
|
3140
|
+
return b `
|
|
3141
|
+
<div
|
|
3142
|
+
class=${e$1({ 'row': true, 'row--clickable': !!this._def.rowClickable })}
|
|
3143
|
+
@mousedown=${() => this._handleRowMouseDown()}
|
|
3144
|
+
@click=${() => this._handleRowClick(row, rowIndex)}
|
|
3145
|
+
>${cells}</div>
|
|
3146
|
+
`;
|
|
3147
|
+
})}
|
|
3133
3148
|
</div>
|
|
3134
3149
|
</div>
|
|
3135
3150
|
</div>
|
|
@@ -3478,6 +3493,11 @@ KRTable.styles = [krBaseCSS, i$5 `
|
|
|
3478
3493
|
cursor: pointer;
|
|
3479
3494
|
}
|
|
3480
3495
|
|
|
3496
|
+
.row--link {
|
|
3497
|
+
color: inherit;
|
|
3498
|
+
text-decoration: none;
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3481
3501
|
.header-row {
|
|
3482
3502
|
display: contents;
|
|
3483
3503
|
}
|