@ukic/canary-web-components 2.0.0-canary.24 → 2.0.0-canary.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-85c5ca15.js → helpers-6817cfbb.js} +20 -31
  3. package/dist/cjs/helpers-6817cfbb.js.map +1 -0
  4. package/dist/cjs/ic-alert.cjs.entry.js +9 -4
  5. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  7. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-data-table.cjs.entry.js +200 -51
  11. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-date-input.cjs.entry.js +3 -2
  13. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-date-picker.cjs.entry.js +3 -1
  15. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-empty-state_2.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -1
  20. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-tree-item.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-tree-view.cjs.entry.js +1 -1
  24. package/dist/cjs/loader.cjs.js +1 -1
  25. package/dist/collection/components/ic-data-table/ic-data-table.css +31 -7
  26. package/dist/collection/components/ic-data-table/ic-data-table.js +298 -56
  27. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  28. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  29. package/dist/collection/components/ic-data-table/story-data.js +143 -54
  30. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  31. package/dist/collection/components/ic-date-input/ic-date-input.js +20 -1
  32. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  33. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +9 -0
  34. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  35. package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
  36. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  37. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +10 -0
  38. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
  39. package/dist/collection/utils/helpers.js +22 -0
  40. package/dist/collection/utils/helpers.js.map +1 -1
  41. package/dist/components/helpers2.js +18 -29
  42. package/dist/components/helpers2.js.map +1 -1
  43. package/dist/components/ic-alert2.js +11 -5
  44. package/dist/components/ic-alert2.js.map +1 -1
  45. package/dist/components/ic-badge.js +2 -2
  46. package/dist/components/ic-badge.js.map +1 -1
  47. package/dist/components/ic-data-table.js +207 -52
  48. package/dist/components/ic-data-table.js.map +1 -1
  49. package/dist/components/ic-date-input2.js +3 -1
  50. package/dist/components/ic-date-input2.js.map +1 -1
  51. package/dist/components/ic-date-picker.js +3 -0
  52. package/dist/components/ic-date-picker.js.map +1 -1
  53. package/dist/components/ic-dialog.js.map +1 -1
  54. package/dist/components/ic-text-field2.js +3 -1
  55. package/dist/components/ic-text-field2.js.map +1 -1
  56. package/dist/core/core.esm.js +1 -1
  57. package/dist/core/core.esm.js.map +1 -1
  58. package/dist/core/{p-401d0c66.entry.js → p-20997691.entry.js} +2 -2
  59. package/dist/core/p-297e99cf.js +2 -0
  60. package/dist/core/p-297e99cf.js.map +1 -0
  61. package/dist/core/p-40e5fa80.entry.js +2 -0
  62. package/dist/core/p-40e5fa80.entry.js.map +1 -0
  63. package/dist/core/p-673a4a62.entry.js.map +1 -1
  64. package/dist/core/p-6af080d3.entry.js +2 -0
  65. package/dist/core/p-6af080d3.entry.js.map +1 -0
  66. package/dist/core/p-74abc3bb.entry.js +2 -0
  67. package/dist/core/p-74abc3bb.entry.js.map +1 -0
  68. package/dist/core/{p-4309460f.entry.js → p-80d6a6b5.entry.js} +2 -2
  69. package/dist/core/{p-06732eaf.entry.js → p-92f701e7.entry.js} +2 -2
  70. package/dist/core/{p-ec9edecf.entry.js → p-989310a8.entry.js} +2 -2
  71. package/dist/core/p-989310a8.entry.js.map +1 -0
  72. package/dist/core/{p-ede631c5.entry.js → p-9b34989b.entry.js} +2 -2
  73. package/dist/core/p-bd1f8741.entry.js +2 -0
  74. package/dist/core/p-bd1f8741.entry.js.map +1 -0
  75. package/dist/core/{p-57043b1e.entry.js → p-c6bdbe69.entry.js} +2 -2
  76. package/dist/core/{p-a052bb95.entry.js → p-c98ce508.entry.js} +2 -2
  77. package/dist/core/{p-b29e96b5.entry.js → p-d362992d.entry.js} +2 -2
  78. package/dist/core/{p-b97eba08.entry.js → p-ee8a3de6.entry.js} +2 -2
  79. package/dist/core/p-ee8a3de6.entry.js.map +1 -0
  80. package/dist/esm/core.js +1 -1
  81. package/dist/esm/{helpers-f543bc77.js → helpers-5bd2012a.js} +19 -30
  82. package/dist/esm/helpers-5bd2012a.js.map +1 -0
  83. package/dist/esm/ic-alert.entry.js +10 -5
  84. package/dist/esm/ic-alert.entry.js.map +1 -1
  85. package/dist/esm/ic-badge.entry.js +2 -2
  86. package/dist/esm/ic-badge.entry.js.map +1 -1
  87. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  88. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  89. package/dist/esm/ic-data-table.entry.js +201 -52
  90. package/dist/esm/ic-data-table.entry.js.map +1 -1
  91. package/dist/esm/ic-date-input.entry.js +3 -2
  92. package/dist/esm/ic-date-input.entry.js.map +1 -1
  93. package/dist/esm/ic-date-picker.entry.js +3 -1
  94. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  95. package/dist/esm/ic-dialog.entry.js.map +1 -1
  96. package/dist/esm/ic-empty-state_2.entry.js +1 -1
  97. package/dist/esm/ic-menu-with-multi.entry.js +1 -1
  98. package/dist/esm/ic-pagination_4.entry.js +2 -1
  99. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  100. package/dist/esm/ic-select-with-multi.entry.js +1 -1
  101. package/dist/esm/ic-tree-item.entry.js +1 -1
  102. package/dist/esm/ic-tree-view.entry.js +1 -1
  103. package/dist/esm/loader.js +1 -1
  104. package/dist/types/components/ic-data-table/ic-data-table.d.ts +32 -9
  105. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +12 -4
  106. package/dist/types/components/ic-data-table/story-data.d.ts +69 -8
  107. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  108. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  109. package/dist/types/components.d.ts +62 -6
  110. package/dist/types/interface.d.ts +1 -0
  111. package/dist/types/utils/helpers.d.ts +6 -0
  112. package/hydrate/index.js +260 -102
  113. package/package.json +3 -3
  114. package/dist/cjs/helpers-85c5ca15.js.map +0 -1
  115. package/dist/core/p-1f9cb805.entry.js +0 -2
  116. package/dist/core/p-1f9cb805.entry.js.map +0 -1
  117. package/dist/core/p-3f2723aa.entry.js +0 -2
  118. package/dist/core/p-3f2723aa.entry.js.map +0 -1
  119. package/dist/core/p-59993f36.entry.js +0 -2
  120. package/dist/core/p-59993f36.entry.js.map +0 -1
  121. package/dist/core/p-91cf89c8.entry.js +0 -2
  122. package/dist/core/p-91cf89c8.entry.js.map +0 -1
  123. package/dist/core/p-adbe0d89.js +0 -2
  124. package/dist/core/p-adbe0d89.js.map +0 -1
  125. package/dist/core/p-b97eba08.entry.js.map +0 -1
  126. package/dist/core/p-ec9edecf.entry.js.map +0 -1
  127. package/dist/esm/helpers-f543bc77.js.map +0 -1
  128. /package/dist/core/{p-401d0c66.entry.js.map → p-20997691.entry.js.map} +0 -0
  129. /package/dist/core/{p-4309460f.entry.js.map → p-80d6a6b5.entry.js.map} +0 -0
  130. /package/dist/core/{p-06732eaf.entry.js.map → p-92f701e7.entry.js.map} +0 -0
  131. /package/dist/core/{p-ede631c5.entry.js.map → p-9b34989b.entry.js.map} +0 -0
  132. /package/dist/core/{p-57043b1e.entry.js.map → p-c6bdbe69.entry.js.map} +0 -0
  133. /package/dist/core/{p-a052bb95.entry.js.map → p-c98ce508.entry.js.map} +0 -0
  134. /package/dist/core/{p-b29e96b5.entry.js.map → p-d362992d.entry.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { h, Fragment, } from "@stencil/core";
2
+ import { h, Fragment, Host, } from "@stencil/core";
3
3
  import unsortedIcon from "./assets/unsorted-icon.svg";
4
4
  import ascendingIcon from "./assets/ascending-icon.svg";
5
5
  import descendingIcon from "./assets/descending-icon.svg";
6
6
  // Unable to import helper functions via @ukic/web-components
7
- import { getSlotContent, isEmptyString, isSlotUsed, pxToRem, debounce, } from "../../utils/helpers";
7
+ import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, } from "../../utils/helpers";
8
8
  /**
9
9
  * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
10
10
  * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
@@ -43,8 +43,11 @@ export class DataTable {
43
43
  this.icPageChangeEvent = false;
44
44
  this.itemsPerPageChange = false;
45
45
  this.DATA_ROW_HEIGHT_STRING = "data-row-height";
46
+ this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
46
47
  this.DEFAULT_LINE_HEIGHT = 24;
47
48
  this.densityUpdate = false;
49
+ this.truncationPatternUpdated = false;
50
+ this.isNewDebounceDelaySet = false;
48
51
  this.updateSetRowHeight = (typographyEl) => {
49
52
  const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
50
53
  if (typographyEl) {
@@ -52,7 +55,7 @@ export class DataTable {
52
55
  const rowHeight = fontSize *
53
56
  parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
54
57
  if (typographyEl.scrollHeight > rowHeight) {
55
- cellContainer.style.removeProperty("height");
58
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
56
59
  }
57
60
  }
58
61
  else {
@@ -61,24 +64,31 @@ export class DataTable {
61
64
  const rowHeight = fontSize *
62
65
  parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
63
66
  if (typographyEl.scrollHeight > rowHeight) {
64
- cellContainer.style.removeProperty("height");
67
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
65
68
  }
66
69
  });
67
70
  }
68
71
  };
69
72
  this.debounceDataTruncation = () => {
70
73
  this.getTypographyElements().forEach((typographyEl) => {
71
- if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
74
+ const cellContainer = this.getCellContainer(typographyEl);
75
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
72
76
  this.resizeObserver = new ResizeObserver(
73
77
  // This gets triggered twice due to updated data and see more/see less button
74
- debounce(() => {
75
- // console.log("resizeObserver triggered");
78
+ dynamicDebounce(() => {
76
79
  this.dataTruncation(typographyEl);
77
- }, 200));
80
+ if (!this.isNewDebounceDelaySet) {
81
+ this.setNewDebounceDelay(200);
82
+ }
83
+ }, () => this.debounceDelay));
78
84
  this.resizeObserver.observe(typographyEl);
79
85
  }
80
86
  });
81
87
  };
88
+ this.setNewDebounceDelay = (delay) => {
89
+ this.debounceDelay = delay;
90
+ this.isNewDebounceDelaySet = true;
91
+ };
82
92
  this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
83
93
  this.truncate = (typographyEl, cellContainer, tooltip) => {
84
94
  if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
@@ -207,11 +217,40 @@ export class DataTable {
207
217
  }
208
218
  return {};
209
219
  };
220
+ this.getColumnWidth = (columnWidth) => {
221
+ // TODO: Setting max width on columns
222
+ let columnWidthStyling = {};
223
+ if (columnWidth) {
224
+ if (typeof columnWidth === "string") {
225
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
226
+ }
227
+ if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
228
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
229
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
230
+ }
231
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
232
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
233
+ }
234
+ }
235
+ }
236
+ return columnWidthStyling;
237
+ };
238
+ this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
239
+ if ((this.truncationPattern || currentRowHeight) &&
240
+ !(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
241
+ !rowTextWrap &&
242
+ !this.getCellOptions(cell, "textWrap") &&
243
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element") {
244
+ return {
245
+ [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),
246
+ };
247
+ }
248
+ return {};
249
+ };
210
250
  this.createCells = (row, rowIndex) => {
211
251
  var _a;
212
252
  const rowValues = Object.values(row);
213
253
  const rowKeys = Object.keys(row);
214
- const index = rowIndex;
215
254
  const rowOptions = this.getRowOptions(rowKeys, rowValues);
216
255
  let rowAlignment;
217
256
  let rowEmphasis;
@@ -220,7 +259,7 @@ export class DataTable {
220
259
  rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
221
260
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
222
261
  }
223
- const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
262
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index: rowIndex }));
224
263
  const currentRowHeight = variableRowHeightVal
225
264
  ? variableRowHeightVal !== "auto" && variableRowHeightVal
226
265
  : this.globalRowHeight !== "auto" && this.globalRowHeight;
@@ -241,7 +280,7 @@ export class DataTable {
241
280
  return (h("td", { class: {
242
281
  ["table-cell"]: true,
243
282
  [`table-density-${this.density}`]: this.notDefaultDensity(),
244
- } }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
283
+ }, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
245
284
  !isSlotUsed(this.el, cellSlotName)
246
285
  ? cell
247
286
  : null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
@@ -256,15 +295,7 @@ export class DataTable {
256
295
  !!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
257
296
  !!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
258
297
  (rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
259
- !!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: {
260
- height: (this.truncationPattern || currentRowHeight) &&
261
- !columnProps.textWrap &&
262
- !rowOptions.textWrap &&
263
- !this.getCellOptions(cell, "textWrap") &&
264
- (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element"
265
- ? this.setRowHeight(currentRowHeight)
266
- : null,
267
- }, "data-row-height": this.truncationPattern || currentRowHeight
298
+ !!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
268
299
  ? this.setRowHeight(currentRowHeight)
269
300
  : null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
270
301
  !isSlotUsed(this.el, cellSlotName) && (h("ic-typography", { variant: "body", class: {
@@ -280,11 +311,11 @@ export class DataTable {
280
311
  });
281
312
  };
282
313
  this.createColumnHeaders = () => {
283
- return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (h("th", { scope: "col", class: {
314
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }) => (h("th", { scope: "col", class: {
284
315
  ["column-header"]: true,
285
316
  [`table-density-${this.density}`]: this.notDefaultDensity(),
286
317
  ["updating-state-headers"]: this.updating && !this.loading,
287
- }, colSpan: colspan }, h("div", { class: {
318
+ }, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
288
319
  "column-header-inner-container": true,
289
320
  [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
290
321
  } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
@@ -312,16 +343,18 @@ export class DataTable {
312
343
  /**
313
344
  * Ensures that createCells has a value in data to map over to actually render the slot.
314
345
  * Removes the need for the user to add it multiple times.
346
+ * `addDataToPosition` used to add the element in the correct column order.
347
+ * Adding empty string value in to give `createCells` something to loop over.
315
348
  */
316
- this.columns.forEach(({ key }) => {
317
- data.forEach((row, rowIndex) => {
318
- const cellSlotName = `${key}-${rowIndex}`;
319
- if (isSlotUsed(this.el, cellSlotName)) {
320
- row[key] = getSlotContent(this.el, cellSlotName);
321
- }
322
- });
349
+ const organisedData = data.map((row, rowIndex) => {
350
+ const slottedColumns = this.columns
351
+ .map(({ key }, index) => isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index })
352
+ .filter((col) => !!col);
353
+ return slottedColumns.length > 0
354
+ ? addDataToPosition(row, slottedColumns, "")
355
+ : row;
323
356
  });
324
- return data
357
+ return organisedData
325
358
  .sort(!this.sortable ? undefined : this.getSortFunction())
326
359
  .map((row, index) => {
327
360
  return (h("tr", {
@@ -418,6 +451,22 @@ export class DataTable {
418
451
  this.updateScrollOffset = () => {
419
452
  this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
420
453
  };
454
+ this.setTableDimensions = () => {
455
+ let tableHostDimensions = {};
456
+ if (this.width) {
457
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-width"]: this.width });
458
+ }
459
+ if (this.height) {
460
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-height"]: this.height });
461
+ }
462
+ if (this.maxWidth) {
463
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-max-width"]: this.maxWidth });
464
+ }
465
+ if (this.minWidth) {
466
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-min-width"]: this.minWidth });
467
+ }
468
+ return tableHostDimensions;
469
+ };
421
470
  this.fromRow = 0;
422
471
  this.previousRowsPerPage = undefined;
423
472
  this.rowsPerPage = undefined;
@@ -428,15 +477,19 @@ export class DataTable {
428
477
  this.sortedColumnOrder = undefined;
429
478
  this.toRow = undefined;
430
479
  this.currentRowHeight = undefined;
480
+ this.debounceDelay = 0;
431
481
  this.caption = undefined;
432
482
  this.columns = undefined;
433
483
  this.data = undefined;
434
484
  this.density = "default";
435
485
  this.embedded = false;
436
486
  this.globalRowHeight = "auto";
487
+ this.height = undefined;
437
488
  this.hideColumnHeaders = false;
438
489
  this.loading = false;
439
490
  this.loadingOptions = undefined;
491
+ this.maxWidth = undefined;
492
+ this.minWidth = undefined;
440
493
  this.minimumLoadingDisplayDuration = 1000;
441
494
  this.paginationBarOptions = {
442
495
  itemsPerPageOptions: [
@@ -462,10 +515,12 @@ export class DataTable {
462
515
  };
463
516
  this.stickyColumnHeaders = false;
464
517
  this.stickyRowHeaders = false;
518
+ this.tableLayout = "fixed";
465
519
  this.truncationPattern = undefined;
466
520
  this.updating = false;
467
521
  this.updatingOptions = undefined;
468
522
  this.variableRowHeight = undefined;
523
+ this.width = undefined;
469
524
  }
470
525
  disconnectedCallback() {
471
526
  var _a;
@@ -498,7 +553,8 @@ export class DataTable {
498
553
  }
499
554
  if (this.truncationPattern) {
500
555
  this.getTypographyElements().forEach((typographyEl) => {
501
- if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
556
+ const cellContainer = this.getCellContainer(typographyEl);
557
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
502
558
  this.dataTruncation(typographyEl);
503
559
  }
504
560
  });
@@ -509,12 +565,31 @@ export class DataTable {
509
565
  }
510
566
  }
511
567
  componentDidUpdate() {
512
- this.truncateUpdatedData();
568
+ // truncation updates invoked here once new/updated data has
569
+ // rendered to take into account updated .cell-container/ic-typography box model updates.
570
+ if (this.truncationPattern === this.SHOW_HIDE_STRING ||
571
+ this.truncationPattern === this.TOOLTIP_STRING) {
572
+ this.truncateUpdatedData();
573
+ }
513
574
  }
514
575
  truncateUpdatedData() {
515
576
  if (this.dataUpdated) {
516
577
  if (this.truncationPattern === this.SHOW_HIDE_STRING) {
517
- this.resetShowHideTruncation();
578
+ this.getTypographyElements().forEach((typographyEl) => {
579
+ const truncWrapper = this.getTruncWrapper(typographyEl);
580
+ const cellContainer = this.getCellContainer(typographyEl);
581
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
582
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
583
+ this.resetShowHideTruncation(typographyEl);
584
+ return;
585
+ }
586
+ setTimeout(() => {
587
+ // slight delay due to data rendering
588
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
589
+ this.addShowHideTruncation(cellContainer, typographyEl);
590
+ }
591
+ }, 150);
592
+ });
518
593
  }
519
594
  if (this.truncationPattern === this.TOOLTIP_STRING) {
520
595
  this.updateTruncationTooltip();
@@ -525,23 +600,49 @@ export class DataTable {
525
600
  if (this.truncationPattern === this.TOOLTIP_STRING) {
526
601
  this.updateTruncationTooltip();
527
602
  }
603
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
604
+ this.getTypographyElements().forEach((typographyEl) => {
605
+ const cellContainer = this.getCellContainer(typographyEl);
606
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
607
+ this.createShowHideTruncation(typographyEl, cellContainer);
608
+ }
609
+ else {
610
+ typographyEl.resetTruncation().then(() => {
611
+ cellContainer.removeAttribute("style");
612
+ });
613
+ }
614
+ });
615
+ }
528
616
  this.tableSorted = false;
529
617
  }
530
618
  // This function recalculates the tooltip truncation when the rowHeight has been set.
531
619
  // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
532
620
  if (this.rowHeightSet) {
533
621
  const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
622
+ const hasAutoRowHeight = this.globalRowHeight === "auto";
534
623
  this.getTypographyElements().forEach((typographyEl) => {
535
624
  var _a;
536
625
  const cellContainer = this.getCellContainer(typographyEl);
537
626
  const tooltipEl = this.getTooltip(typographyEl);
627
+ if (hasAutoRowHeight) {
628
+ cellContainer.style.height = null;
629
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
630
+ this.removeTooltip(cellContainer, typographyEl, tooltipEl);
631
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
632
+ }
633
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
634
+ this.resetShowHideTruncation(typographyEl);
635
+ }
636
+ return;
637
+ }
538
638
  const rowHeight = fontSize *
539
639
  parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
540
640
  // If the set row height is bigger than the cell container even
541
641
  // with textWrap, set the row height
542
642
  if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
543
- rowHeight > cellContainer.clientHeight) {
544
- cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
643
+ rowHeight > cellContainer.clientHeight &&
644
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
645
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
545
646
  }
546
647
  if (this.truncationPattern) {
547
648
  // If the set row height is bigger than the typography truncation wrapper
@@ -607,12 +708,37 @@ export class DataTable {
607
708
  });
608
709
  this.densityUpdate = false;
609
710
  }
711
+ if (this.truncationPatternUpdated) {
712
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
713
+ this.getTypographyElements().forEach((typographyEl) => {
714
+ const cellContainer = this.getCellContainer(typographyEl);
715
+ const tooltipEl = this.getTooltip(typographyEl);
716
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
717
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
718
+ }
719
+ });
720
+ }
721
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
722
+ this.getTypographyElements().forEach((typographyEl) => {
723
+ const truncWrapper = this.getTruncWrapper(typographyEl);
724
+ const cellContainer = this.getCellContainer(typographyEl);
725
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
726
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
727
+ this.resetShowHideTruncation(typographyEl);
728
+ return;
729
+ }
730
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
731
+ this.addShowHideTruncation(cellContainer, typographyEl);
732
+ }
733
+ });
734
+ }
735
+ }
610
736
  }
611
737
  createShowHideTruncation(typographyEl, cellContainer) {
612
738
  typographyEl.checkMaxLines(typographyEl.scrollHeight);
613
739
  typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
614
740
  typographyEl.setShowHideExpanded(false);
615
- cellContainer.style.height = null;
741
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
616
742
  }
617
743
  addTooltipTruncation(typographyEl, cellContainer, tooltip) {
618
744
  this.addLineClampCSS(typographyEl, cellContainer);
@@ -632,8 +758,9 @@ export class DataTable {
632
758
  handleTypographyTruncationExpandToggle({ detail, }) {
633
759
  const { expanded, typographyEl } = detail;
634
760
  const cellContainer = this.getCellContainer(typographyEl);
635
- if (cellContainer.style.height && expanded) {
636
- cellContainer.style.height = "inherit";
761
+ if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
762
+ expanded) {
763
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
637
764
  }
638
765
  }
639
766
  handlePageChange({ detail, target }) {
@@ -683,7 +810,8 @@ export class DataTable {
683
810
  }
684
811
  }
685
812
  truncationPatternHandler(newValue) {
686
- if (newValue === this.SHOW_HIDE_STRING) {
813
+ if (newValue === this.TOOLTIP_STRING) {
814
+ this.resetShowHideTruncation();
687
815
  this.updateTruncationTooltip(true);
688
816
  // Not using debounceDataTruncation here due to resizeObserver not being triggered
689
817
  this.getTypographyElements().forEach((typographyEl) => {
@@ -692,11 +820,27 @@ export class DataTable {
692
820
  this.truncate(typographyEl, cellContainer, tooltip);
693
821
  });
694
822
  }
695
- if (newValue === this.TOOLTIP_STRING) {
823
+ if (newValue === this.SHOW_HIDE_STRING) {
696
824
  // ResizeObserver is trigger here due to the see more/see less links being removed.
697
825
  // The resizeObserver will also apply the tooltip where relevant
698
- this.resetShowHideTruncation();
826
+ this.updateTruncationTooltip(true);
827
+ this.getTypographyElements().forEach((typographyEl) => {
828
+ const truncWrapper = this.getTruncWrapper(typographyEl);
829
+ const cellContainer = this.getCellContainer(typographyEl);
830
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
831
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
832
+ this.resetShowHideTruncation(typographyEl);
833
+ return;
834
+ }
835
+ setTimeout(() => {
836
+ // slight delay due to data rendering
837
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
838
+ this.addShowHideTruncation(cellContainer, typographyEl);
839
+ }
840
+ }, 150);
841
+ });
699
842
  }
843
+ this.truncationPatternUpdated = true;
700
844
  }
701
845
  async dataHandler(newData) {
702
846
  this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
@@ -724,11 +868,13 @@ export class DataTable {
724
868
  typographyEl.checkMaxLines(truncWrapper.scrollHeight);
725
869
  typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
726
870
  typographyEl.setShowHideExpanded(false);
727
- cellContainer.style.height = null;
871
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
728
872
  }
729
873
  else {
730
874
  typographyEl.resetTruncation().then(() => {
731
- cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
875
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
876
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
877
+ }
732
878
  });
733
879
  }
734
880
  }
@@ -736,7 +882,9 @@ export class DataTable {
736
882
  this.getTypographyElements().forEach((typographyEl) => {
737
883
  const cellContainer = this.getCellContainer(typographyEl);
738
884
  typographyEl.resetTruncation().then(() => {
739
- cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
885
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
886
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
887
+ }
740
888
  });
741
889
  });
742
890
  }
@@ -784,11 +932,10 @@ export class DataTable {
784
932
  if (!typographyEl.getAttribute("style") && this.dataUpdated) {
785
933
  this.addLineClampCSS(typographyEl, cellContainer);
786
934
  }
787
- // Adding the tableSorted boolean prevents the tooltip
788
- // being regenerated and flashing
789
935
  if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
790
- !this.tableSorted) {
791
- if (!typographyEl.getAttribute("style")) {
936
+ this.truncationPattern === this.TOOLTIP_STRING) {
937
+ if (!typographyEl.getAttribute("style") ||
938
+ typographyEl.style.cssText.includes("--ic-line-clamp: 0;")) {
792
939
  this.addLineClampCSS(typographyEl, cellContainer);
793
940
  }
794
941
  this.createTruncationTooltip(typographyEl, cellContainer);
@@ -817,10 +964,12 @@ export class DataTable {
817
964
  }
818
965
  render() {
819
966
  const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
820
- return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
967
+ return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
821
968
  ["table-row-container"]: true,
822
969
  scrollable,
823
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
970
+ }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", { style: {
971
+ ["--table-layout"]: this.tableLayout,
972
+ } }, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
824
973
  ["column-header-sticky"]: stickyColumnHeaders,
825
974
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
826
975
  } }, h("tr", null, createColumnHeaders()))), updating &&
@@ -833,7 +982,7 @@ export class DataTable {
833
982
  "show-background": loadingOptions.showBackground,
834
983
  }, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: data.length, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
835
984
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
836
- : "table unsorted"))));
985
+ : "table unsorted")))));
837
986
  }
838
987
  static get is() { return "ic-data-table"; }
839
988
  static get encapsulation() { return "shadow"; }
@@ -891,9 +1040,15 @@ export class DataTable {
891
1040
  "type": "unknown",
892
1041
  "mutable": false,
893
1042
  "complexType": {
894
- "original": "{ [key: string]: any }[]",
895
- "resolved": "{ [key: string]: any; }[]",
896
- "references": {}
1043
+ "original": "IcDataTableDataType[]",
1044
+ "resolved": "IcDataTableDataType[]",
1045
+ "references": {
1046
+ "IcDataTableDataType": {
1047
+ "location": "import",
1048
+ "path": "./ic-data-table.types",
1049
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableDataType"
1050
+ }
1051
+ }
897
1052
  },
898
1053
  "required": false,
899
1054
  "optional": false,
@@ -968,6 +1123,23 @@ export class DataTable {
968
1123
  "reflect": false,
969
1124
  "defaultValue": "\"auto\""
970
1125
  },
1126
+ "height": {
1127
+ "type": "string",
1128
+ "mutable": false,
1129
+ "complexType": {
1130
+ "original": "string",
1131
+ "resolved": "string",
1132
+ "references": {}
1133
+ },
1134
+ "required": false,
1135
+ "optional": true,
1136
+ "docs": {
1137
+ "tags": [],
1138
+ "text": "Sets the table height. Can be set to `auto` or a specific value in `px`, `rem`, or `%`."
1139
+ },
1140
+ "attribute": "height",
1141
+ "reflect": false
1142
+ },
971
1143
  "hideColumnHeaders": {
972
1144
  "type": "boolean",
973
1145
  "mutable": false,
@@ -1025,6 +1197,40 @@ export class DataTable {
1025
1197
  "text": "Sets the props for the circular loading indicator used in the loading state."
1026
1198
  }
1027
1199
  },
1200
+ "maxWidth": {
1201
+ "type": "string",
1202
+ "mutable": false,
1203
+ "complexType": {
1204
+ "original": "string",
1205
+ "resolved": "string",
1206
+ "references": {}
1207
+ },
1208
+ "required": false,
1209
+ "optional": true,
1210
+ "docs": {
1211
+ "tags": [],
1212
+ "text": "Sets the maximum width of the data table. Can be set in `px`, `rem`, or `%`."
1213
+ },
1214
+ "attribute": "max-width",
1215
+ "reflect": false
1216
+ },
1217
+ "minWidth": {
1218
+ "type": "string",
1219
+ "mutable": false,
1220
+ "complexType": {
1221
+ "original": "string",
1222
+ "resolved": "string",
1223
+ "references": {}
1224
+ },
1225
+ "required": false,
1226
+ "optional": true,
1227
+ "docs": {
1228
+ "tags": [],
1229
+ "text": "Sets the minimum width of the data table. Can be set in `px`, `rem`, or `%`."
1230
+ },
1231
+ "attribute": "min-width",
1232
+ "reflect": false
1233
+ },
1028
1234
  "minimumLoadingDisplayDuration": {
1029
1235
  "type": "number",
1030
1236
  "mutable": false,
@@ -1159,6 +1365,24 @@ export class DataTable {
1159
1365
  "reflect": false,
1160
1366
  "defaultValue": "false"
1161
1367
  },
1368
+ "tableLayout": {
1369
+ "type": "string",
1370
+ "mutable": false,
1371
+ "complexType": {
1372
+ "original": "\"fixed\" | \"auto\"",
1373
+ "resolved": "\"auto\" | \"fixed\"",
1374
+ "references": {}
1375
+ },
1376
+ "required": false,
1377
+ "optional": true,
1378
+ "docs": {
1379
+ "tags": [],
1380
+ "text": "Sets the layout of the table"
1381
+ },
1382
+ "attribute": "table-layout",
1383
+ "reflect": false,
1384
+ "defaultValue": "\"fixed\""
1385
+ },
1162
1386
  "truncationPattern": {
1163
1387
  "type": "string",
1164
1388
  "mutable": false,
@@ -1177,7 +1401,7 @@ export class DataTable {
1177
1401
  "optional": true,
1178
1402
  "docs": {
1179
1403
  "tags": [],
1180
- "text": "Sets the method used to truncate longer text in cells where textWrap is `false`.\nThe `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\" / \"See less\" buttons."
1404
+ "text": "Sets the method used to truncate long text in cells where textWrap is `false`. The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons."
1181
1405
  },
1182
1406
  "attribute": "truncation-pattern",
1183
1407
  "reflect": false
@@ -1241,6 +1465,23 @@ export class DataTable {
1241
1465
  "tags": [],
1242
1466
  "text": "Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\nIf the function returns `null`, that row's height will be set to the `globalRowHeight` property."
1243
1467
  }
1468
+ },
1469
+ "width": {
1470
+ "type": "string",
1471
+ "mutable": false,
1472
+ "complexType": {
1473
+ "original": "string",
1474
+ "resolved": "string",
1475
+ "references": {}
1476
+ },
1477
+ "required": false,
1478
+ "optional": true,
1479
+ "docs": {
1480
+ "tags": [],
1481
+ "text": "Sets the table width. Can be set to `auto` or a specific value in `px`, `rem`, or `%`."
1482
+ },
1483
+ "attribute": "width",
1484
+ "reflect": false
1244
1485
  }
1245
1486
  };
1246
1487
  }
@@ -1255,7 +1496,8 @@ export class DataTable {
1255
1496
  "sortedColumn": {},
1256
1497
  "sortedColumnOrder": {},
1257
1498
  "toRow": {},
1258
- "currentRowHeight": {}
1499
+ "currentRowHeight": {},
1500
+ "debounceDelay": {}
1259
1501
  };
1260
1502
  }
1261
1503
  static get events() {