@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.
@@ -66,7 +66,8 @@ export class FtdsTable extends FtLitElement {
66
66
  return toRender;
67
67
  }
68
68
  renderHeader(column, index) {
69
- var _a, _b, _c, _d;
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 = (_b = (_a = column.styles) === null || _a === void 0 ? void 0 : _a.headerCell) !== null && _b !== void 0 ? _b : {};
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 ((_c = column.sortable) !== null && _c !== void 0 ? _c : true) {
81
- if (((_d = this.currentSort) === null || _d === void 0 ? void 0 : _d.column) === index) {
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, _b, _c;
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, _b;
172
- const defaultSort = (_a = column.defaultSortOrder) !== null && _a !== void 0 ? _a : "asc";
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 && ((_b = this.currentSort) === null || _b === void 0 ? void 0 : _b.order) === defaultSort ? this.getOppositeSortOrder(defaultSort) : defaultSort,
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, _b;
219
+ var _a;
220
+ var _b;
217
221
  if (!this.stickyHeaders) {
218
222
  return 0;
219
223
  }