@fluid-topics/ftds-table 2.2.0 → 2.2.1
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/build/ftds-table.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare class FtdsTable<T extends Record<string, any>> extends FtLitEleme
|
|
|
19
19
|
highlightedRowIndex: number;
|
|
20
20
|
private activeRowIndex;
|
|
21
21
|
private rows?;
|
|
22
|
+
get isEmptyState(): boolean;
|
|
22
23
|
static DEFAULT_RENDER: (v: any) => TemplateResult<1>;
|
|
23
24
|
static DEFAULT_COMPARATOR: (a: any, b: any) => number;
|
|
24
25
|
focusRow(rowIndex: number): void;
|
|
@@ -30,11 +31,11 @@ export declare class FtdsTable<T extends Record<string, any>> extends FtLitEleme
|
|
|
30
31
|
protected renderSortButton(sortIcon: FtdsIcons, label: string, sort: () => void, index: number): TemplateResult<1>;
|
|
31
32
|
protected renderCell(column: ColumnConfiguration<T>, columnIndex: number, row: T, rowIndex: number): TemplateResult<1>;
|
|
32
33
|
protected renderColumnSort(column: ColumnConfiguration<T>, index: number): typeof nothing | TemplateResult<1>;
|
|
33
|
-
private renderEmptyStateTable;
|
|
34
34
|
protected getSortIcon(isSorted: boolean | undefined): FtdsIcons;
|
|
35
35
|
protected update(props: PropertyValues): void;
|
|
36
36
|
protected columnPart(prefix: string, index: number): string;
|
|
37
37
|
protected getValue(column: ColumnConfiguration<T>, row: T): any;
|
|
38
|
+
private renderEmptyStateTable;
|
|
38
39
|
private sortData;
|
|
39
40
|
private getOppositeSortOrder;
|
|
40
41
|
private getSortOrderText;
|
package/build/ftds-table.js
CHANGED
|
@@ -31,6 +31,9 @@ export class FtdsTable extends FtLitElement {
|
|
|
31
31
|
this.highlightedRowIndex = -1;
|
|
32
32
|
this.activeRowIndex = -1;
|
|
33
33
|
}
|
|
34
|
+
get isEmptyState() {
|
|
35
|
+
return this.data.length === 0;
|
|
36
|
+
}
|
|
34
37
|
focusRow(rowIndex) {
|
|
35
38
|
if (this.rows) {
|
|
36
39
|
this.rows[rowIndex].focus();
|
|
@@ -46,8 +49,8 @@ export class FtdsTable extends FtLitElement {
|
|
|
46
49
|
>
|
|
47
50
|
${this.renderHeaderRow()}
|
|
48
51
|
<tbody>
|
|
49
|
-
${
|
|
50
|
-
${repeat(data, (_, rowIndex) => "row-" + rowIndex, (row, rowIndex) => this.renderRow(row, rowIndex))}`
|
|
52
|
+
${this.isEmptyState ? this.renderEmptyStateTable() : html `
|
|
53
|
+
${repeat(data, (_, rowIndex) => "row-" + rowIndex, (row, rowIndex) => this.renderRow(row, rowIndex))}`}
|
|
51
54
|
</tbody>
|
|
52
55
|
</table>
|
|
53
56
|
`;
|
|
@@ -115,6 +118,7 @@ export class FtdsTable extends FtLitElement {
|
|
|
115
118
|
"row--clickable": this.clickableRows,
|
|
116
119
|
"row--active": rowIndex === this.activeRowIndex,
|
|
117
120
|
"row--highlighted": rowIndex === this.highlightedRowIndex,
|
|
121
|
+
"row--has-content": !this.isEmptyState,
|
|
118
122
|
};
|
|
119
123
|
return html `
|
|
120
124
|
<tr class="${classMap(classes)}" role="row" tabindex="${this.clickableRows ? "0" : nothing}"
|
|
@@ -177,19 +181,6 @@ export class FtdsTable extends FtLitElement {
|
|
|
177
181
|
const label = `Sort ${titleText} in ${sortOrderText} order`;
|
|
178
182
|
return ((_c = column.sortable) !== null && _c !== void 0 ? _c : true) ? this.renderSortButton(sortIcon, label, sort, index) : nothing;
|
|
179
183
|
}
|
|
180
|
-
renderEmptyStateTable() {
|
|
181
|
-
var _a, _b;
|
|
182
|
-
return html `
|
|
183
|
-
<tr class="row" role="row">
|
|
184
|
-
<td colspan="${this.columns.length}" class="cell no-content" role="cell">
|
|
185
|
-
${((_a = this.emptyState) === null || _a === void 0 ? void 0 : _a.noImage) ? nothing : cactusSvg}
|
|
186
|
-
<ftds-typography variant="${FtdsTypographyVariants.body2medium}">
|
|
187
|
-
${(_b = this.emptyState) === null || _b === void 0 ? void 0 : _b.content}
|
|
188
|
-
</ftds-typography>
|
|
189
|
-
</td>
|
|
190
|
-
</tr>
|
|
191
|
-
`;
|
|
192
|
-
}
|
|
193
184
|
getSortIcon(isSorted) {
|
|
194
185
|
return isSorted ? (this.currentSort.order === "asc" ? FtdsIcons.SORT_UP : FtdsIcons.SORT_DOWN) : FtdsIcons.SORT;
|
|
195
186
|
}
|
|
@@ -205,6 +196,19 @@ export class FtdsTable extends FtLitElement {
|
|
|
205
196
|
getValue(column, row) {
|
|
206
197
|
return typeof column.getter === "string" ? row[column.getter] : column.getter(row);
|
|
207
198
|
}
|
|
199
|
+
renderEmptyStateTable() {
|
|
200
|
+
var _a, _b;
|
|
201
|
+
return html `
|
|
202
|
+
<tr class="row" role="row">
|
|
203
|
+
<td colspan="${this.columns.length}" class="cell no-content" role="cell">
|
|
204
|
+
${((_a = this.emptyState) === null || _a === void 0 ? void 0 : _a.noImage) ? nothing : cactusSvg}
|
|
205
|
+
<ftds-typography variant="${FtdsTypographyVariants.body2medium}">
|
|
206
|
+
${(_b = this.emptyState) === null || _b === void 0 ? void 0 : _b.content}
|
|
207
|
+
</ftds-typography>
|
|
208
|
+
</td>
|
|
209
|
+
</tr>
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
208
212
|
sortData(data) {
|
|
209
213
|
var _a, _b;
|
|
210
214
|
if (this.currentSort && !this.disableDataManipulation) {
|
|
@@ -2010,11 +2010,11 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2010
2010
|
border-right: ${U.dataRowBorderWidth} solid ${U.dataRowBorderColor};
|
|
2011
2011
|
}
|
|
2012
2012
|
|
|
2013
|
-
.row:hover {
|
|
2013
|
+
.row:hover.row--has-content {
|
|
2014
2014
|
background-color: ${U.dataRowDefaultHoverBackgroundColor};
|
|
2015
2015
|
}
|
|
2016
2016
|
|
|
2017
|
-
.row.row--clickable:hover {
|
|
2017
|
+
.row.row--clickable:hover.row--has-content {
|
|
2018
2018
|
background-color: ${U.dataRowClickableHoverBackgroundColor};
|
|
2019
2019
|
cursor: pointer;
|
|
2020
2020
|
}
|
|
@@ -2206,15 +2206,15 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2206
2206
|
</clipPath>
|
|
2207
2207
|
</defs>
|
|
2208
2208
|
</svg>
|
|
2209
|
-
`;var Ae=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},te=class e extends De.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.ariaLabel=null,this.clickableRows=!1,this.highlightedRowIndex=-1,this.activeRowIndex=-1}focusRow(t){this.rows&&this.rows[t].focus()}render(){var t;let n=this.sortData(this.data);return q.html`
|
|
2209
|
+
`;var Ae=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},te=class e extends De.FtLitElement{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.ariaLabel=null,this.clickableRows=!1,this.highlightedRowIndex=-1,this.activeRowIndex=-1}get isEmptyState(){return this.data.length===0}focusRow(t){this.rows&&this.rows[t].focus()}render(){var t;let n=this.sortData(this.data);return q.html`
|
|
2210
2210
|
<table class="table"
|
|
2211
2211
|
role="table"
|
|
2212
2212
|
aria-label="${(t=this.ariaLabel)!==null&&t!==void 0?t:q.nothing}"
|
|
2213
2213
|
>
|
|
2214
2214
|
${this.renderHeaderRow()}
|
|
2215
2215
|
<tbody>
|
|
2216
|
-
${
|
|
2217
|
-
${(0,Co.repeat)(n,(o,a)=>"row-"+a,(o,a)=>this.renderRow(o,a))}
|
|
2216
|
+
${this.isEmptyState?this.renderEmptyStateTable():q.html`
|
|
2217
|
+
${(0,Co.repeat)(n,(o,a)=>"row-"+a,(o,a)=>this.renderRow(o,a))}`}
|
|
2218
2218
|
</tbody>
|
|
2219
2219
|
</table>
|
|
2220
2220
|
`}optWrapWithFtTypography(t,n){return typeof t=="string"?q.html`
|
|
@@ -2239,7 +2239,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2239
2239
|
${(0,Co.repeat)(this.columns,(n,o)=>"header-cell-"+o,(n,o)=>this.renderHeader(n,o))}
|
|
2240
2240
|
</tr>
|
|
2241
2241
|
</thead>
|
|
2242
|
-
`}renderRow(t,n){let o={row:!0,"row--clickable":this.clickableRows,"row--active":n===this.activeRowIndex,"row--highlighted":n===this.highlightedRowIndex};return q.html`
|
|
2242
|
+
`}renderRow(t,n){let o={row:!0,"row--clickable":this.clickableRows,"row--active":n===this.activeRowIndex,"row--highlighted":n===this.highlightedRowIndex,"row--has-content":!this.isEmptyState};return q.html`
|
|
2243
2243
|
<tr class="${(0,pr.classMap)(o)}" role="row" tabindex="${this.clickableRows?"0":q.nothing}"
|
|
2244
2244
|
part="table-row-${n}"
|
|
2245
2245
|
@keydown=${this.clickableRows?a=>this.handleRowKeyDown(a,t):q.nothing}
|
|
@@ -2264,7 +2264,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2264
2264
|
part="${this.columnPart("cell",n)} cell-row-${a} cell-column-${n}-row-${a}">
|
|
2265
2265
|
${f(this.getValue(t,o))}
|
|
2266
2266
|
</td>
|
|
2267
|
-
`}renderColumnSort(t,n){var o,a,i;let s=((o=this.currentSort)===null||o===void 0?void 0:o.column)===n,l=this.getSortIcon(s),f=()=>{var b,x;let E=(b=t.defaultSortOrder)!==null&&b!==void 0?b:"asc";this.currentSort={column:n,order:s&&((x=this.currentSort)===null||x===void 0?void 0:x.order)===E?this.getOppositeSortOrder(E):E},this.dispatchChangeEvent()},m=this.getSortOrderText(s,t),g=`Sort ${(a=t.titleText)!==null&&a!==void 0?a:t.title} in ${m} order`;return!((i=t.sortable)!==null&&i!==void 0)||i?this.renderSortButton(l,g,f,n):q.nothing}renderEmptyStateTable(){var t,n;return q.html`
|
|
2267
|
+
`}renderColumnSort(t,n){var o,a,i;let s=((o=this.currentSort)===null||o===void 0?void 0:o.column)===n,l=this.getSortIcon(s),f=()=>{var b,x;let E=(b=t.defaultSortOrder)!==null&&b!==void 0?b:"asc";this.currentSort={column:n,order:s&&((x=this.currentSort)===null||x===void 0?void 0:x.order)===E?this.getOppositeSortOrder(E):E},this.dispatchChangeEvent()},m=this.getSortOrderText(s,t),g=`Sort ${(a=t.titleText)!==null&&a!==void 0?a:t.title} in ${m} order`;return!((i=t.sortable)!==null&&i!==void 0)||i?this.renderSortButton(l,g,f,n):q.nothing}getSortIcon(t){return t?this.currentSort.order==="asc"?p.SORT_UP:p.SORT_DOWN:p.SORT}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort)}columnPart(t,n){return`${t} ${t}-column-${n}`}getValue(t,n){return typeof t.getter=="string"?n[t.getter]:t.getter(n)}renderEmptyStateTable(){var t,n;return q.html`
|
|
2268
2268
|
<tr class="row" role="row">
|
|
2269
2269
|
<td colspan="${this.columns.length}" class="cell no-content" role="cell">
|
|
2270
2270
|
${!((t=this.emptyState)===null||t===void 0)&&t.noImage?q.nothing:A0}
|
|
@@ -2273,7 +2273,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2273
2273
|
</ftds-typography>
|
|
2274
2274
|
</td>
|
|
2275
2275
|
</tr>
|
|
2276
|
-
`}
|
|
2276
|
+
`}sortData(t){var n,o;if(this.currentSort&&!this.disableDataManipulation){let a=this.columns[this.currentSort.column],i=(n=a.comparator)!==null&&n!==void 0?n:e.DEFAULT_COMPARATOR,s=(o=a.descComparator)!==null&&o!==void 0?o:((f,m)=>-i(f,m)),l=this.currentSort.order==="asc"?i:s;return[...t].sort((f,m)=>l(this.getValue(a,f),this.getValue(a,m)))}return t}getOppositeSortOrder(t){return t==="asc"?"desc":"asc"}getSortOrderText(t,n){return t?this.currentSort.order==="asc"?"descending":"ascending":n.defaultSortOrder==="desc"?"descending":"ascending"}dispatchChangeEvent(){this.dispatchEvent(new vo({sort:this.currentSort}))}handleRowKeyDown(t,n){(t.key==="Enter"||t.key===" ")&&this.dispatchRowClickEvent(n)}dispatchRowClickEvent(t){this.dispatchEvent(new xo(t))}handleRowMouseDown(t){this.activeRowIndex=t}handleRowMouseUp(){this.activeRowIndex=-1}};te.styles=C0;te.DEFAULT_RENDER=e=>q.html`
|
|
2277
2277
|
<ftds-typography variant="${he.caption1medium}">
|
|
2278
2278
|
${e}
|
|
2279
2279
|
</ftds-typography>
|
package/build/ftds-table.min.js
CHANGED
|
@@ -2090,11 +2090,11 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2090
2090
|
border-right: ${j.dataRowBorderWidth} solid ${j.dataRowBorderColor};
|
|
2091
2091
|
}
|
|
2092
2092
|
|
|
2093
|
-
.row:hover {
|
|
2093
|
+
.row:hover.row--has-content {
|
|
2094
2094
|
background-color: ${j.dataRowDefaultHoverBackgroundColor};
|
|
2095
2095
|
}
|
|
2096
2096
|
|
|
2097
|
-
.row.row--clickable:hover {
|
|
2097
|
+
.row.row--clickable:hover.row--has-content {
|
|
2098
2098
|
background-color: ${j.dataRowClickableHoverBackgroundColor};
|
|
2099
2099
|
cursor: pointer;
|
|
2100
2100
|
}
|
|
@@ -2286,15 +2286,15 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2286
2286
|
</clipPath>
|
|
2287
2287
|
</defs>
|
|
2288
2288
|
</svg>
|
|
2289
|
-
`;var Te=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ce=class t extends Z{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.ariaLabel=null,this.clickableRows=!1,this.highlightedRowIndex=-1,this.activeRowIndex=-1}focusRow(e){this.rows&&this.rows[e].focus()}render(){var e;let r=this.sortData(this.data);return $`
|
|
2289
|
+
`;var Te=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ce=class t extends Z{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.disableDataManipulation=!1,this.ariaLabel=null,this.clickableRows=!1,this.highlightedRowIndex=-1,this.activeRowIndex=-1}get isEmptyState(){return this.data.length===0}focusRow(e){this.rows&&this.rows[e].focus()}render(){var e;let r=this.sortData(this.data);return $`
|
|
2290
2290
|
<table class="table"
|
|
2291
2291
|
role="table"
|
|
2292
2292
|
aria-label="${(e=this.ariaLabel)!==null&&e!==void 0?e:G}"
|
|
2293
2293
|
>
|
|
2294
2294
|
${this.renderHeaderRow()}
|
|
2295
2295
|
<tbody>
|
|
2296
|
-
${
|
|
2297
|
-
${mt(r,(o,a)=>"row-"+a,(o,a)=>this.renderRow(o,a))}
|
|
2296
|
+
${this.isEmptyState?this.renderEmptyStateTable():$`
|
|
2297
|
+
${mt(r,(o,a)=>"row-"+a,(o,a)=>this.renderRow(o,a))}`}
|
|
2298
2298
|
</tbody>
|
|
2299
2299
|
</table>
|
|
2300
2300
|
`}optWrapWithFtTypography(e,r){return typeof e=="string"?$`
|
|
@@ -2319,7 +2319,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2319
2319
|
${mt(this.columns,(r,o)=>"header-cell-"+o,(r,o)=>this.renderHeader(r,o))}
|
|
2320
2320
|
</tr>
|
|
2321
2321
|
</thead>
|
|
2322
|
-
`}renderRow(e,r){let o={row:!0,"row--clickable":this.clickableRows,"row--active":r===this.activeRowIndex,"row--highlighted":r===this.highlightedRowIndex};return $`
|
|
2322
|
+
`}renderRow(e,r){let o={row:!0,"row--clickable":this.clickableRows,"row--active":r===this.activeRowIndex,"row--highlighted":r===this.highlightedRowIndex,"row--has-content":!this.isEmptyState};return $`
|
|
2323
2323
|
<tr class="${be(o)}" role="row" tabindex="${this.clickableRows?"0":G}"
|
|
2324
2324
|
part="table-row-${r}"
|
|
2325
2325
|
@keydown=${this.clickableRows?a=>this.handleRowKeyDown(a,e):G}
|
|
@@ -2344,7 +2344,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2344
2344
|
part="${this.columnPart("cell",r)} cell-row-${a} cell-column-${r}-row-${a}">
|
|
2345
2345
|
${d(this.getValue(e,o))}
|
|
2346
2346
|
</td>
|
|
2347
|
-
`}renderColumnSort(e,r){var o,a,i;let s=((o=this.currentSort)===null||o===void 0?void 0:o.column)===r,c=this.getSortIcon(s),d=()=>{var y,v;let C=(y=e.defaultSortOrder)!==null&&y!==void 0?y:"asc";this.currentSort={column:r,order:s&&((v=this.currentSort)===null||v===void 0?void 0:v.order)===C?this.getOppositeSortOrder(C):C},this.dispatchChangeEvent()},f=this.getSortOrderText(s,e),m=`Sort ${(a=e.titleText)!==null&&a!==void 0?a:e.title} in ${f} order`;return!((i=e.sortable)!==null&&i!==void 0)||i?this.renderSortButton(c,m,d,r):G}renderEmptyStateTable(){var e,r;return $`
|
|
2347
|
+
`}renderColumnSort(e,r){var o,a,i;let s=((o=this.currentSort)===null||o===void 0?void 0:o.column)===r,c=this.getSortIcon(s),d=()=>{var y,v;let C=(y=e.defaultSortOrder)!==null&&y!==void 0?y:"asc";this.currentSort={column:r,order:s&&((v=this.currentSort)===null||v===void 0?void 0:v.order)===C?this.getOppositeSortOrder(C):C},this.dispatchChangeEvent()},f=this.getSortOrderText(s,e),m=`Sort ${(a=e.titleText)!==null&&a!==void 0?a:e.title} in ${f} order`;return!((i=e.sortable)!==null&&i!==void 0)||i?this.renderSortButton(c,m,d,r):G}getSortIcon(e){return e?this.currentSort.order==="asc"?h.SORT_UP:h.SORT_DOWN:h.SORT}update(e){super.update(e),e.has("sort")&&(this.currentSort=this.sort)}columnPart(e,r){return`${e} ${e}-column-${r}`}getValue(e,r){return typeof e.getter=="string"?r[e.getter]:e.getter(r)}renderEmptyStateTable(){var e,r;return $`
|
|
2348
2348
|
<tr class="row" role="row">
|
|
2349
2349
|
<td colspan="${this.columns.length}" class="cell no-content" role="cell">
|
|
2350
2350
|
${!((e=this.emptyState)===null||e===void 0)&&e.noImage?G:Xd}
|
|
@@ -2353,7 +2353,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2353
2353
|
</ftds-typography>
|
|
2354
2354
|
</td>
|
|
2355
2355
|
</tr>
|
|
2356
|
-
`}
|
|
2356
|
+
`}sortData(e){var r,o;if(this.currentSort&&!this.disableDataManipulation){let a=this.columns[this.currentSort.column],i=(r=a.comparator)!==null&&r!==void 0?r:t.DEFAULT_COMPARATOR,s=(o=a.descComparator)!==null&&o!==void 0?o:((d,f)=>-i(d,f)),c=this.currentSort.order==="asc"?i:s;return[...e].sort((d,f)=>c(this.getValue(a,d),this.getValue(a,f)))}return e}getOppositeSortOrder(e){return e==="asc"?"desc":"asc"}getSortOrderText(e,r){return e?this.currentSort.order==="asc"?"descending":"ascending":r.defaultSortOrder==="desc"?"descending":"ascending"}dispatchChangeEvent(){this.dispatchEvent(new ra({sort:this.currentSort}))}handleRowKeyDown(e,r){(e.key==="Enter"||e.key===" ")&&this.dispatchRowClickEvent(r)}dispatchRowClickEvent(e){this.dispatchEvent(new ta(e))}handleRowMouseDown(e){this.activeRowIndex=e}handleRowMouseUp(){this.activeRowIndex=-1}};ce.styles=Yd;ce.DEFAULT_RENDER=t=>$`
|
|
2357
2357
|
<ftds-typography variant="${Oe.caption1medium}">
|
|
2358
2358
|
${t}
|
|
2359
2359
|
</ftds-typography>
|
|
@@ -28,11 +28,11 @@ export const designSystemStyles = css `
|
|
|
28
28
|
border-right: ${table.dataRowBorderWidth} solid ${table.dataRowBorderColor};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.row:hover {
|
|
31
|
+
.row:hover.row--has-content {
|
|
32
32
|
background-color: ${table.dataRowDefaultHoverBackgroundColor};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.row.row--clickable:hover {
|
|
35
|
+
.row.row--clickable:hover.row--has-content {
|
|
36
36
|
background-color: ${table.dataRowClickableHoverBackgroundColor};
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ftds-table",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "The design system table component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fluid-topics/design-system-variables": "3.6.0",
|
|
23
|
-
"@fluid-topics/ft-assets": "2.2.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
25
|
-
"@fluid-topics/ftds-button": "2.2.
|
|
26
|
-
"@fluid-topics/ftds-icon": "2.2.
|
|
27
|
-
"@fluid-topics/ftds-typography": "2.2.
|
|
23
|
+
"@fluid-topics/ft-assets": "2.2.1",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.2.1",
|
|
25
|
+
"@fluid-topics/ftds-button": "2.2.1",
|
|
26
|
+
"@fluid-topics/ftds-icon": "2.2.1",
|
|
27
|
+
"@fluid-topics/ftds-typography": "2.2.1",
|
|
28
28
|
"lit": "3.3.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@fluid-topics/ft-wc-test-utils": "2.2.
|
|
31
|
+
"@fluid-topics/ft-wc-test-utils": "2.2.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "25fd63f06bb81a168e9dbd9356d8e3d86a925ad9"
|
|
34
34
|
}
|