@fluid-topics/ftds-table 2.2.17 → 2.2.19
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.js +13 -9
- package/build/ftds-table.light.js +34 -34
- package/build/ftds-table.min.js +159 -159
- package/package.json +8 -8
package/build/ftds-table.js
CHANGED
|
@@ -66,7 +66,8 @@ export class FtdsTable extends FtLitElement {
|
|
|
66
66
|
return toRender;
|
|
67
67
|
}
|
|
68
68
|
renderHeader(column, index) {
|
|
69
|
-
var _a, _b
|
|
69
|
+
var _a, _b;
|
|
70
|
+
var _c, _d;
|
|
70
71
|
const headerCellClasses = {
|
|
71
72
|
"header-cell": true,
|
|
72
73
|
"header-cell--sticky": this.stickyHeaders,
|
|
@@ -75,10 +76,10 @@ export class FtdsTable extends FtLitElement {
|
|
|
75
76
|
"column-title-container": true,
|
|
76
77
|
["column-title-container--text-align-" + column.textAlign]: true,
|
|
77
78
|
};
|
|
78
|
-
const styles = (
|
|
79
|
+
const styles = (_c = (_a = column.styles) === null || _a === void 0 ? void 0 : _a.headerCell) !== null && _c !== void 0 ? _c : {};
|
|
79
80
|
let ariaSort;
|
|
80
|
-
if ((
|
|
81
|
-
if (((
|
|
81
|
+
if ((_d = column.sortable) !== null && _d !== void 0 ? _d : true) {
|
|
82
|
+
if (((_b = this.currentSort) === null || _b === void 0 ? void 0 : _b.column) === index) {
|
|
82
83
|
ariaSort = this.currentSort.order === "asc" ? "ascending" : "descending";
|
|
83
84
|
}
|
|
84
85
|
else {
|
|
@@ -164,15 +165,17 @@ export class FtdsTable extends FtLitElement {
|
|
|
164
165
|
`;
|
|
165
166
|
}
|
|
166
167
|
renderColumnSort(column, index) {
|
|
167
|
-
var _a
|
|
168
|
+
var _a;
|
|
169
|
+
var _b, _c;
|
|
168
170
|
const isSorted = ((_a = this.currentSort) === null || _a === void 0 ? void 0 : _a.column) === index;
|
|
169
171
|
const sortIcon = this.getSortIcon(isSorted);
|
|
170
172
|
const sort = () => {
|
|
171
|
-
var _a
|
|
172
|
-
|
|
173
|
+
var _a;
|
|
174
|
+
var _b;
|
|
175
|
+
const defaultSort = (_b = column.defaultSortOrder) !== null && _b !== void 0 ? _b : "asc";
|
|
173
176
|
this.currentSort = {
|
|
174
177
|
column: index,
|
|
175
|
-
order: isSorted && ((
|
|
178
|
+
order: isSorted && ((_a = this.currentSort) === null || _a === void 0 ? void 0 : _a.order) === defaultSort ? this.getOppositeSortOrder(defaultSort) : defaultSort,
|
|
176
179
|
};
|
|
177
180
|
this.dispatchChangeEvent();
|
|
178
181
|
};
|
|
@@ -213,7 +216,8 @@ export class FtdsTable extends FtLitElement {
|
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
218
|
getStickyHeaderBottom() {
|
|
216
|
-
var _a
|
|
219
|
+
var _a;
|
|
220
|
+
var _b;
|
|
217
221
|
if (!this.stickyHeaders) {
|
|
218
222
|
return 0;
|
|
219
223
|
}
|