@eui/components 19.1.2-snapshot-1741681025211 → 19.1.2-snapshot-1741955106555

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.
Files changed (105) hide show
  1. package/docs/components/EuiAutocompleteComponent.html +377 -0
  2. package/docs/components/EuiAutocompleteOptionComponent.html +50 -0
  3. package/docs/components/EuiAutocompleteOptionGroupComponent.html +38 -0
  4. package/docs/components/EuiBlockDocumentComponent.html +64 -0
  5. package/docs/components/EuiDropdownComponent.html +25 -1
  6. package/docs/components/EuiProgressBarComponent.html +115 -109
  7. package/docs/components/EuiTableV2Component.html +228 -63
  8. package/docs/components/EuiTableV2FilterComponent.html +39 -0
  9. package/docs/components/EuiTableV2SelectableHeaderComponent.html +33 -0
  10. package/docs/components/EuiTableV2SelectableRowComponent.html +45 -0
  11. package/docs/components/EuiTableV2SortableColComponent.html +47 -0
  12. package/docs/dependencies.html +2 -2
  13. package/docs/directives/EuiDropdownContentDirective.html +69 -0
  14. package/docs/directives/EuiTableV2ExpandableRowDirective.html +7 -0
  15. package/docs/directives/EuiTableV2StickyColDirective.html +7 -0
  16. package/docs/injectables/EuiTableV2SelectableRowService.html +106 -0
  17. package/docs/injectables/EuiTableV2SortService.html +47 -0
  18. package/docs/js/menu-wc.js +33 -16
  19. package/docs/js/menu-wc_es5.js +1 -1
  20. package/docs/js/search/search_index.js +2 -2
  21. package/docs/modules/EuiAutocompleteModule.html +11 -0
  22. package/docs/modules/EuiBlockDocumentModule.html +22 -4
  23. package/docs/modules/EuiProgressBarModule.html +2 -14
  24. package/docs/modules/EuiTableV2Module.html +11 -0
  25. package/docs/pipes/EuiTableV2HighlightPipe.html +26 -0
  26. package/eui-autocomplete/eui-autocomplete-option/eui-autocomplete-option.component.d.ts +29 -0
  27. package/eui-autocomplete/eui-autocomplete-option/eui-autocomplete-option.component.d.ts.map +1 -1
  28. package/eui-autocomplete/eui-autocomplete-option-group/eui-autocomplete-option-group.component.d.ts +17 -0
  29. package/eui-autocomplete/eui-autocomplete-option-group/eui-autocomplete-option-group.component.d.ts.map +1 -1
  30. package/eui-autocomplete/eui-autocomplete.component.d.ts +311 -1
  31. package/eui-autocomplete/eui-autocomplete.component.d.ts.map +1 -1
  32. package/eui-autocomplete/eui-autocomplete.module.d.ts +12 -0
  33. package/eui-autocomplete/eui-autocomplete.module.d.ts.map +1 -1
  34. package/eui-autocomplete/validators/force-selection-from-data.validator.d.ts +1 -1
  35. package/eui-block-document/eui-block-document.component.d.ts +41 -1
  36. package/eui-block-document/eui-block-document.component.d.ts.map +1 -1
  37. package/eui-block-document/eui-block-document.module.d.ts +12 -2
  38. package/eui-block-document/eui-block-document.module.d.ts.map +1 -1
  39. package/eui-date-range-selector/eui-date-range-selector.component.d.ts +10 -1
  40. package/eui-date-range-selector/eui-date-range-selector.component.d.ts.map +1 -1
  41. package/eui-datepicker/eui-datepicker.component.d.ts +10 -1
  42. package/eui-datepicker/eui-datepicker.component.d.ts.map +1 -1
  43. package/eui-dropdown/directives/eui-dropdown-content.directive.d.ts +1 -0
  44. package/eui-dropdown/directives/eui-dropdown-content.directive.d.ts.map +1 -1
  45. package/eui-dropdown/eui-dropdown.component.d.ts +2 -1
  46. package/eui-dropdown/eui-dropdown.component.d.ts.map +1 -1
  47. package/eui-progress-bar/eui-progress-bar.component.d.ts +16 -9
  48. package/eui-progress-bar/eui-progress-bar.component.d.ts.map +1 -1
  49. package/eui-progress-bar/eui-progress-bar.module.d.ts +5 -17
  50. package/eui-progress-bar/eui-progress-bar.module.d.ts.map +1 -1
  51. package/eui-table-v2/directives/eui-table-v2-expandable-row.directive.d.ts +4 -0
  52. package/eui-table-v2/directives/eui-table-v2-expandable-row.directive.d.ts.map +1 -1
  53. package/eui-table-v2/directives/eui-table-v2-sticky-col.directive.d.ts +4 -0
  54. package/eui-table-v2/directives/eui-table-v2-sticky-col.directive.d.ts.map +1 -1
  55. package/eui-table-v2/eui-table-v2.component.d.ts +273 -1
  56. package/eui-table-v2/eui-table-v2.component.d.ts.map +1 -1
  57. package/eui-table-v2/eui-table-v2.module.d.ts +12 -0
  58. package/eui-table-v2/eui-table-v2.module.d.ts.map +1 -1
  59. package/eui-table-v2/filter/eui-table-v2-filter.component.d.ts +21 -0
  60. package/eui-table-v2/filter/eui-table-v2-filter.component.d.ts.map +1 -1
  61. package/eui-table-v2/pipes/eui-table-v2-highlight.pipe.d.ts +19 -0
  62. package/eui-table-v2/pipes/eui-table-v2-highlight.pipe.d.ts.map +1 -1
  63. package/eui-table-v2/selectable-header/eui-table-v2-selectable-header.component.d.ts +19 -0
  64. package/eui-table-v2/selectable-header/eui-table-v2-selectable-header.component.d.ts.map +1 -1
  65. package/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.d.ts +28 -0
  66. package/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.d.ts.map +1 -1
  67. package/eui-table-v2/services/eui-table-v2-selectable-row.service.d.ts +71 -0
  68. package/eui-table-v2/services/eui-table-v2-selectable-row.service.d.ts.map +1 -1
  69. package/eui-table-v2/services/eui-table-v2-sort.service.d.ts +22 -0
  70. package/eui-table-v2/services/eui-table-v2-sort.service.d.ts.map +1 -1
  71. package/eui-table-v2/sortable-col/eui-table-v2-sortable-col.component.d.ts +32 -0
  72. package/eui-table-v2/sortable-col/eui-table-v2-sortable-col.component.d.ts.map +1 -1
  73. package/fesm2022/eui-components-eui-autocomplete.mjs +354 -4
  74. package/fesm2022/eui-components-eui-autocomplete.mjs.map +1 -1
  75. package/fesm2022/eui-components-eui-block-document.mjs +56 -7
  76. package/fesm2022/eui-components-eui-block-document.mjs.map +1 -1
  77. package/fesm2022/eui-components-eui-card.mjs +1 -1
  78. package/fesm2022/eui-components-eui-card.mjs.map +1 -1
  79. package/fesm2022/eui-components-eui-date-range-selector.mjs +7 -3
  80. package/fesm2022/eui-components-eui-date-range-selector.mjs.map +1 -1
  81. package/fesm2022/eui-components-eui-datepicker.mjs +7 -3
  82. package/fesm2022/eui-components-eui-datepicker.mjs.map +1 -1
  83. package/fesm2022/eui-components-eui-dropdown.mjs +12 -5
  84. package/fesm2022/eui-components-eui-dropdown.mjs.map +1 -1
  85. package/fesm2022/eui-components-eui-input-group.mjs +2 -2
  86. package/fesm2022/eui-components-eui-input-group.mjs.map +1 -1
  87. package/fesm2022/eui-components-eui-language-selector.mjs +1 -1
  88. package/fesm2022/eui-components-eui-language-selector.mjs.map +1 -1
  89. package/fesm2022/eui-components-eui-navbar.mjs +1 -1
  90. package/fesm2022/eui-components-eui-navbar.mjs.map +1 -1
  91. package/fesm2022/eui-components-eui-popover.mjs +2 -2
  92. package/fesm2022/eui-components-eui-popover.mjs.map +1 -1
  93. package/fesm2022/eui-components-eui-progress-bar.mjs +37 -31
  94. package/fesm2022/eui-components-eui-progress-bar.mjs.map +1 -1
  95. package/fesm2022/eui-components-eui-table-v2.mjs +482 -5
  96. package/fesm2022/eui-components-eui-table-v2.mjs.map +1 -1
  97. package/fesm2022/eui-components-eui-table.mjs +1 -1
  98. package/fesm2022/eui-components-eui-table.mjs.map +1 -1
  99. package/fesm2022/eui-components-eui-tree.mjs +2 -2
  100. package/fesm2022/eui-components-eui-tree.mjs.map +1 -1
  101. package/fesm2022/eui-components-eui-user-profile.mjs +1 -1
  102. package/fesm2022/eui-components-eui-user-profile.mjs.map +1 -1
  103. package/fesm2022/eui-components-layout.mjs +1 -1
  104. package/fesm2022/eui-components-layout.mjs.map +1 -1
  105. package/package.json +7 -7
@@ -28,26 +28,53 @@ import * as i4$2 from '@ngx-translate/core';
28
28
  import { TranslateModule } from '@ngx-translate/core';
29
29
  import { EuiListModule } from '@eui/components/eui-list';
30
30
 
31
+ /**
32
+ * Service to manage the selection state of rows in a table.
33
+ * Allows tracking of selected rows and managing selection for individual and multiple rows.
34
+ */
31
35
  class EuiTableV2SelectableRowService {
32
36
  constructor() {
37
+ /**
38
+ * BehaviorSubject containing the selected rows.
39
+ */
33
40
  this.selectedRows$ = new BehaviorSubject([]);
41
+ /**
42
+ * BehaviorSubject containing the state of whether all rows are selected.
43
+ */
34
44
  this.isAllRowsSelected$ = new BehaviorSubject(false);
35
45
  this.lastSelectedRow = null;
36
46
  this.rows = [];
37
47
  this.propId = 'id';
38
48
  }
49
+ /**
50
+ * Observable stream of selected rows.
51
+ */
39
52
  get selectedRows() {
40
53
  return this.selectedRows$.asObservable();
41
54
  }
55
+ /**
56
+ * Observable stream of whether all rows are selected.
57
+ */
42
58
  get isAllRowsSelected() {
43
59
  return this.isAllRowsSelected$.asObservable();
44
60
  }
61
+ /**
62
+ * Sets the property name used to identify rows as unique.
63
+ */
45
64
  setPropId(value) {
46
65
  this.propId = value;
47
66
  }
67
+ /**
68
+ * Gets the current property name used to identify rows.
69
+ */
48
70
  getPropId() {
49
71
  return this.propId;
50
72
  }
73
+ /**
74
+ * Registers a row as selectable.
75
+ *
76
+ * @param row Row to register.
77
+ */
51
78
  registerRow(row) {
52
79
  if (row && !this.rows.find((r) => r[this.propId] === row[this.propId])) {
53
80
  this.rows.push(row);
@@ -59,17 +86,35 @@ class EuiTableV2SelectableRowService {
59
86
  }
60
87
  }
61
88
  }
89
+ /**
90
+ * Registers a set of rows as selectable.
91
+ *
92
+ * @param rows Set of rows to register.
93
+ */
62
94
  registerRows(rows) {
63
95
  rows.forEach((row) => {
64
96
  this.registerRow(row);
65
97
  });
66
98
  }
99
+ /**
100
+ * Unregisters a row as selectable.
101
+ *
102
+ * @param row Row to unregister.
103
+ */
67
104
  unregisterRow(row) {
68
105
  this.rows = this.rows.filter(r => r[this.propId] !== row[this.propId]);
69
106
  }
107
+ /**
108
+ * Unregisters all rows.
109
+ */
70
110
  unregisterRows() {
71
111
  this.rows = [];
72
112
  }
113
+ /**
114
+ * Selects a row.
115
+ *
116
+ * @param row Row to select.
117
+ */
73
118
  selectRow(row) {
74
119
  if (this.selectedRows$.value.indexOf(row) === -1) {
75
120
  this.selectedRows$.next([...this.selectedRows$.value, row]);
@@ -77,6 +122,11 @@ class EuiTableV2SelectableRowService {
77
122
  this.isAllRowsSelected$.next(this.selectedRows$.value.length === this.rows.length);
78
123
  this.lastSelectedRow = row;
79
124
  }
125
+ /**
126
+ * Unselects a row.
127
+ *
128
+ * @param row Row to unselect.
129
+ */
80
130
  unselectRow(row) {
81
131
  if (row && this.selectedRows$.value.find((r) => r[this.propId] === row[this.propId]) !== undefined) {
82
132
  const value = this.selectedRows$.value.filter((selected) => selected[this.propId] !== row[this.propId]);
@@ -84,24 +134,45 @@ class EuiTableV2SelectableRowService {
84
134
  this.isAllRowsSelected$.next(false);
85
135
  }
86
136
  }
137
+ /**
138
+ * Selects a set of rows.
139
+ *
140
+ * @param rows Rows to select.
141
+ */
87
142
  selectRows(rows) {
88
143
  this.selectedRows$.next([...rows]);
89
144
  this.isAllRowsSelected$.next(this.rows.length > 0 && this.rows.length === this.selectedRows$.value.length);
90
145
  this.lastSelectedRow = rows[rows.length - 1];
91
146
  }
147
+ /**
148
+ * Select all rows.
149
+ */
92
150
  selectAllRows() {
93
151
  this.selectedRows$.next([...this.rows]);
94
152
  this.isAllRowsSelected$.next(true);
95
153
  this.lastSelectedRow = this.rows[this.rows.length - 1];
96
154
  }
155
+ /**
156
+ * Unselect all rows.
157
+ */
97
158
  unselectAllRows() {
98
159
  this.selectedRows$.next([]);
99
160
  this.isAllRowsSelected$.next(false);
100
161
  this.lastSelectedRow = null;
101
162
  }
163
+ /**
164
+ * Gets the list of registered rows.
165
+ *
166
+ * @returns The list of registered rows.
167
+ */
102
168
  getRows() {
103
169
  return this.rows;
104
170
  }
171
+ /**
172
+ * Gets the last selected row.
173
+ *
174
+ * @returns The last selected row.
175
+ */
105
176
  getLastSelectedRow() {
106
177
  return this.lastSelectedRow;
107
178
  }
@@ -112,14 +183,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
112
183
  type: Injectable
113
184
  }] });
114
185
 
186
+ /**
187
+ * Service to manage the sorting state of columns in a table.
188
+ * Uses a `BehaviorSubject` to store and emit the current sorting values.
189
+ */
115
190
  class EuiTableV2SortService {
116
191
  constructor() {
192
+ /**
193
+ * BehaviorSubject containing the current sorting information.
194
+ */
117
195
  this.sorts$ = new BehaviorSubject([]);
118
196
  this.isCurrentMultiSortable = false;
119
197
  }
198
+ /**
199
+ * Observable stream of sorting values.
200
+ */
120
201
  get sorts() {
121
202
  return this.sorts$.asObservable();
122
203
  }
204
+ /**
205
+ * Sets the ordering order for a given column
206
+ *
207
+ * @param sort The name of the column to sort.
208
+ * @param order The sorting order (ascending or descending).
209
+ * @param isMultiSortable Whether multi-sorting is allowed.
210
+ */
123
211
  setSort(sort, order, isMultiSortable) {
124
212
  if (isMultiSortable && this.isCurrentMultiSortable) {
125
213
  let sortValues = this.sorts$.value;
@@ -142,6 +230,11 @@ class EuiTableV2SortService {
142
230
  }
143
231
  this.isCurrentMultiSortable = isMultiSortable;
144
232
  }
233
+ /**
234
+ * Sets the full list of sorting values.
235
+ *
236
+ * @param sorts The list of sorts to apply.
237
+ */
145
238
  setSorts(sorts) {
146
239
  this.sorts$.next(sorts);
147
240
  this.isCurrentMultiSortable = sorts.length > 1;
@@ -158,7 +251,70 @@ var ScrollinDirection;
158
251
  ScrollinDirection["UP"] = "UP";
159
252
  ScrollinDirection["DOWN"] = "DOWN";
160
253
  })(ScrollinDirection || (ScrollinDirection = {}));
254
+ /**
255
+ * @description
256
+ * The `eui-table-v2` component has been built to offer various requested features including fast performance and excellent level of control over tabular presentation of data.
257
+ *
258
+ * The eui-table is quite simple of usage and requires :
259
+ *
260
+ * - rows : the data value input as an array of objects, usually fetched from a service (data payload),
261
+ * - view : this is the template for the presentation with its various options such as the search filter, the paginator, sortable columns, etc.
262
+ *
263
+ * @example
264
+ * ```
265
+ * <table class="eui-table-default">
266
+ * <thead>
267
+ * <tr>
268
+ * <th>Country</th>
269
+ * <th>Year</th>
270
+ * <th>ISO</th>
271
+ * <th>Population</th>
272
+ * <th>Capital city</th>
273
+ * </tr>
274
+ * </thead>
275
+ * <tbody>
276
+ * \@for (row of data; track row) {
277
+ * <tr>
278
+ * <td>{{ row.country }}</td>
279
+ * <td>{{ row.year }}</td>
280
+ * <td>{{ row.iso }}</td>
281
+ * <td>{{ row.population | number }}</td>
282
+ * <td>{{ row.capital }}</td>
283
+ * </tr>
284
+ * }
285
+ * </tbody>
286
+ * <tfoot>
287
+ * <tr>
288
+ * <td class="eui-u-text-center" colspan="5">Footer 1</td>
289
+ * </tr>
290
+ * </tfoot>
291
+ * </table>
292
+ * ```
293
+ *
294
+ * ```
295
+ * public data: Country[] = [
296
+ * { id: 1, country: 'Austria', year: 1995, iso: 'AT', population: 8504850, capital: 'Vienna' },
297
+ * { id: 2, country: 'Belgium', year: 1958, iso: 'BE', population: 11198638, capital: 'Brussels' },
298
+ * { id: 3, country: 'Bulgaria', year: 2007, iso: 'BG', population: 7364570, capital: 'Sofia' },
299
+ * { id: 4, country: 'Croatia', year: 2013, iso: 'HR', population: 4284889, capital: 'Zagreb' },
300
+ * { id: 5, country: 'Cyprus', year: 2004, iso: 'CY', population: 1117000, capital: 'Nicosia' },
301
+ * { id: 6, country: 'Czechia', year: 2004, iso: 'CZ', population: 10513209, capital: 'Prague' },
302
+ * { id: 7, country: 'Denmark', year: 1973, iso: 'DK', population: 5655750, capital: 'Copenhagen' },
303
+ * { id: 8, country: 'Estonia', year: 2004, iso: 'EE', population: 1315819, capital: 'Tallinn' },
304
+ * { id: 9, country: 'Finland', year: 1995, iso: 'FI', population: 5470820, capital: 'Helsinki' },
305
+ * { id: 10, country: 'France', year: 1958, iso: 'FR', population: 67210000, capital: 'Paris' },
306
+ * ];
307
+ * ```
308
+ *
309
+ * See {@link https://eui.ecdevops.eu/eui-showcase-ux-components-19.x/style-guide/components/eui-table-v2}.
310
+ */
161
311
  class EuiTableV2Component {
312
+ /**
313
+ * @description
314
+ * Computes and returns the CSS classes for the component based on its current state.
315
+ *
316
+ * @returns {string} Space-separated string of CSS class names
317
+ */
162
318
  get cssClasses() {
163
319
  return [
164
320
  this.baseStatesDirective.getCssClasses('eui-table-default eui-table-v2'),
@@ -180,29 +336,143 @@ class EuiTableV2Component {
180
336
  this.euiTableV2SortService = euiTableV2SortService;
181
337
  this.baseStatesDirective = baseStatesDirective;
182
338
  this.renderer = renderer;
339
+ /**
340
+ * Data to display in the table.
341
+ *
342
+ * @type {DATA[]} Generic type of data
343
+ */
183
344
  this.data = [];
345
+ /**
346
+ * Unicity criteria of the data.
347
+ *
348
+ * @default 'id'
349
+ */
184
350
  this.propId = 'id';
351
+ /**
352
+ * In combination with `isVirtualScroll`. Row height use by virtual scroll calculation.
353
+ *
354
+ * @default 41
355
+ */
185
356
  this.itemSize = 41;
357
+ /**
358
+ * In combination with `isDataSelectable`. Rows to be selected by default.
359
+ *
360
+ * @type {DATA[]} Set of data to select.
361
+ */
186
362
  this.preselectedRows = [];
363
+ /**
364
+ * Wheter the table uses virtual scroll to display data.
365
+ *
366
+ * `eui-table-v2` selector needs to be used in order to make virtual scroll working properly.
367
+ *
368
+ * @example
369
+ * <eui-table-v2 isVirtualScroll>
370
+ * ...
371
+ * </eui-table-v2>
372
+ *
373
+ * @default false
374
+ */
187
375
  this.isVirtualScroll = false;
376
+ /**
377
+ * In combination with `isVirtualScroll`. Wheter the table caches the data when scroll.
378
+ * Means that if a scroll level has already loads data, the `scrollChange` event won't be emitted.
379
+ *
380
+ * @default false
381
+ */
188
382
  this.isVirtualScrollCache = false;
383
+ /**
384
+ * Wheter the table header is sticky.
385
+ * In order to use eui-table sticky feature and control the scrolling overflow,
386
+ * we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.
387
+ *
388
+ * @default false
389
+ */
189
390
  this.hasStickyHeader = false;
391
+ /**
392
+ * Wheter the table footer is sticky.
393
+ * In order to use eui-table sticky feature and control the scrolling overflow,
394
+ * we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.
395
+ *
396
+ * @default false
397
+ */
190
398
  this.hasStickyFooter = false;
399
+ /**
400
+ * Wheter the table col is sticky.
401
+ * In order to use eui-table sticky feature and control the scrolling overflow,
402
+ * we recommend to wrap the table with the provided eui-table-v2__scrollable-wrapper class and set your custom table width and/or height.
403
+ *
404
+ * Only first or latest columns can be sticky.
405
+ *
406
+ * @default false
407
+ */
191
408
  this.hasStickyCols = false;
409
+ /**
410
+ * Wheter the table is reponsive.
411
+ *
412
+ * @default false
413
+ */
192
414
  this.isTableResponsive = false;
415
+ /**
416
+ * Wheter the table uses async data.
417
+ * In this configuration, pagination, filtering and sorting are managed by the backend.
418
+ *
419
+ * When data are async, paginator and filter must not be bound to the eui-table component like in other sample.
420
+ *
421
+ * @default false
422
+ */
193
423
  this.isAsync = false;
424
+ /**
425
+ * In combination with `isVirtualScroll`. Total length of data that are displayed in the table with virtual scroll.
426
+ *
427
+ * @default 0
428
+ */
194
429
  this.virtualScrollAsyncItemsLength = 0;
430
+ /**
431
+ * In combination with `isVirtualScroll`. Nb of data items to load in the table.
432
+ *
433
+ * @default 50
434
+ */
195
435
  this.virtualScrollNbRows = 50;
436
+ /**
437
+ * Wheter the cols can be reordered.
438
+ *
439
+ * @default false
440
+ */
196
441
  this.isColsOrderable = false;
442
+ /**
443
+ * Wheter a loading spinner is displayed in the table.
444
+ *
445
+ * @default false
446
+ */
197
447
  this.isLoading = false;
448
+ /**
449
+ * Wheter the 'select all' checkbox in the header will select ONLY items in the current page.
450
+ *
451
+ * If `false`, all items across the pages will be selected.
452
+ *
453
+ * @default true
454
+ */
198
455
  this.isSelectOnlyVisibleRows = true;
456
+ /**
457
+ * @deprecated
458
+ * Has been deprecated to align with Design System
459
+ */
199
460
  this.isTableBordered = false;
200
461
  this.loading = [];
201
462
  this.nbCols = [];
202
463
  this.dataRendered = [];
203
464
  this.cdkVirtualScrollViewportOverflowValue = 'auto';
465
+ /**
466
+ * In combination with `isVirtualScroll`. Event emitted when a scroll is done.
467
+ */
204
468
  this.scrollChange = new EventEmitter();
469
+ /**
470
+ * In combination with `isDataSelectable` on a row. Event emitted when the selection changes with an array of data.
471
+ */
205
472
  this.rowsSelect = new EventEmitter();
473
+ /**
474
+ * In combination with `isSortable` on the cols. Event emitted when the sort changes with the property displayed in the col and the order as `ASC` or `DESC`.
475
+ */
206
476
  this.sortChange = new EventEmitter();
207
477
  this.destroy$ = new Subject();
208
478
  this.virtualScrollLastMultiple = 0;
@@ -321,9 +591,9 @@ class EuiTableV2Component {
321
591
  }
322
592
  });
323
593
  }
324
- test(index) {
325
- this.cdkVirtualScrollViewport.scrollToIndex(index);
326
- }
594
+ // test(index): void {
595
+ // this.cdkVirtualScrollViewport.scrollToIndex(index)
596
+ // }
327
597
  ngAfterViewInit() {
328
598
  this.stickyFeatureHandler();
329
599
  if (this.isVirtualScroll) {
@@ -443,6 +713,13 @@ class EuiTableV2Component {
443
713
  setSort(sorts) {
444
714
  this.euiTableV2SortService.setSorts(sorts);
445
715
  }
716
+ /**
717
+ * Filters the table's data based on a string declared in `EuiTableV2FilterComponent`
718
+ *
719
+ * @param filter String to filter the data
720
+ * @param r Array of data to filter
721
+ * @returns The set of data matching the filter
722
+ */
446
723
  filterData(filter, r) {
447
724
  const rows = filter ?
448
725
  r.filter((row) => {
@@ -454,27 +731,42 @@ class EuiTableV2Component {
454
731
  this.filteredData = rows;
455
732
  return rows;
456
733
  }
734
+ /**
735
+ * Get the top position in px of the sticky header.
736
+ */
457
737
  get stickyHeaderTopPosition() {
458
738
  if (!this.cdkVirtualScrollViewport || !this.cdkVirtualScrollViewport['_renderedContentOffset']) {
459
739
  return '0';
460
740
  }
461
741
  return (-this.cdkVirtualScrollViewport['_renderedContentOffset'] - 1) + 'px';
462
742
  }
743
+ /**
744
+ * Get the bottom position in px of the sticky footer.
745
+ */
463
746
  get stickyFooterBottomPosition() {
464
747
  if (!this.cdkVirtualScrollViewport || !this.cdkVirtualScrollViewport['_renderedContentOffset']) {
465
748
  return '-1px';
466
749
  }
467
750
  return this.cdkVirtualScrollViewport['_renderedContentOffset'] - 1 + 'px';
468
751
  }
752
+ /**
753
+ * Get the width in px of the viewport in which the table is.
754
+ */
469
755
  get cdkVirtualScrollViewportWidth() {
470
756
  return (this.elementRef.nativeElement?.parentElement?.clientWidth || 0) + 'px';
471
757
  }
758
+ /**
759
+ * Get the width, as a number, of the host element.
760
+ */
472
761
  get hostWidth() {
473
762
  return this.elementRef.nativeElement.style.width;
474
763
  }
475
764
  trackByFn(index) {
476
765
  return index;
477
766
  }
767
+ /**
768
+ * Handles table features such as sorting, filtering, and pagination before rendering.
769
+ */
478
770
  tableFeaturesHandler() {
479
771
  this.tableFeaturesHandlerSubscription = combineLatest(this.paginator ? this.paginator.page$ : new BehaviorSubject(null), this.filter ? this.filter.filter$ : new BehaviorSubject(null), this.euiTableV2SortService.sorts).pipe(takeUntil(this.destroy$)).subscribe(([pagination, filter, sorts]) => {
480
772
  let r = [...this.dataSrc];
@@ -498,6 +790,13 @@ class EuiTableV2Component {
498
790
  }
499
791
  });
500
792
  }
793
+ /**
794
+ * Sorts the data based on the sort, property and order, criterias.
795
+ *
796
+ * @param sortCriterias Array of sort criterias containing the property on which the sort will be performed and the order (`ASC` or `DESC`).
797
+ * @param r Array of data to sort
798
+ * @returns A sorted array
799
+ */
501
800
  sortData(sortCriterias, r) {
502
801
  if (sortCriterias.every(criteria => criteria.order === null)) {
503
802
  return r.slice();
@@ -531,14 +830,36 @@ class EuiTableV2Component {
531
830
  return 0;
532
831
  });
533
832
  }
833
+ /**
834
+ * Slices the data array based on the pagination event.
835
+ *
836
+ * @param pagination Object containing the page, the page size and the total number of pages.
837
+ * @param r Array of data to paginate.
838
+ * @returns The sliced array to render.
839
+ */
534
840
  paginateRows(pagination, r) {
535
841
  this.page = pagination.page;
536
842
  this.pageSize = pagination.pageSize;
537
843
  return r.slice(this.page * this.pageSize, this.page * this.pageSize + this.pageSize);
538
844
  }
845
+ /**
846
+ * Round down the index to the nearest multiple of the number of rows.
847
+ *
848
+ * @param index Index of the current scroll level.
849
+ * @param nbRows Number of rows to display.
850
+ * @returns A rounded number.
851
+ */
539
852
  roundDown(index, nbRows) {
540
853
  return Math.floor(index / nbRows) * nbRows;
541
854
  }
855
+ /**
856
+ * Checks if in the range of data to render some of them had already been loaded or not.
857
+ *
858
+ * @param startIndex Start index of the range to check
859
+ * @param limit Number of item to check after the start index.
860
+ * @param dataRendered Array of data to check
861
+ * @returns The index of the first undefined item in the range or `-1` if not found.
862
+ */
542
863
  hasUndefinedInRange(startIndex, limit, dataRendered) {
543
864
  for (let i = startIndex; i < startIndex + limit; i++) {
544
865
  if (dataRendered[i] === undefined) {
@@ -547,6 +868,9 @@ class EuiTableV2Component {
547
868
  }
548
869
  return -1;
549
870
  }
871
+ /**
872
+ * Calcultates the position of columns that are sticky.
873
+ */
550
874
  stickyFeatureHandler() {
551
875
  setTimeout(() => {
552
876
  const containerWidth = this.elementRef.nativeElement?.parentElement?.clientWidth || 0;
@@ -591,16 +915,29 @@ class EuiTableV2Component {
591
915
  }
592
916
  }, 250);
593
917
  }
918
+ /**
919
+ * Handles the selection of rows.
920
+ */
594
921
  selectRowsFeatureHandler() {
595
922
  this.euiTableV2SelectableRowService.selectedRows.pipe(skip(1), takeUntil(this.destroy$)).subscribe((selected) => {
596
923
  this.rowsSelect.emit(selected);
597
924
  });
598
925
  }
926
+ /**
927
+ * Handles the sorting of columns.
928
+ */
599
929
  sortFeatureHandler() {
600
930
  this.euiTableV2SortService.sorts.pipe(skip(1), takeUntil(this.destroy$)).subscribe((sorts) => {
601
931
  this.sortChange.emit(sorts);
602
932
  });
603
933
  }
934
+ /**
935
+ * Get the properties of the object matching the filter string.
936
+ *
937
+ * @param row Row to extract the property from.
938
+ * @param filter String to search in the properties.
939
+ * @returns An array of properties matching the filter.
940
+ */
604
941
  getProps(row, filter) {
605
942
  const isObject = (val) => val && typeof val === 'object';
606
943
  const addDelimiter = (a, b) => (a && a !== '0' ? `${a}.${b}` : b);
@@ -618,11 +955,18 @@ class EuiTableV2Component {
618
955
  paths(row);
619
956
  return props;
620
957
  }
958
+ /**
959
+ * Get a property of an object based on the path.
960
+ *
961
+ * @param obj Row to extract the property from.
962
+ * @param prop Path of the property to extract.
963
+ * @returns The value of the property
964
+ */
621
965
  getObjProp(obj, prop) {
622
966
  return prop ? prop.split('.').reduce((prev, curr) => (prev ? prev[curr] : null), obj || self) : null;
623
967
  }
624
968
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EuiTableV2Component, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: EuiTableV2SelectableRowService }, { token: EuiTableV2SortService }, { token: i3.BaseStatesDirective }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
625
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: EuiTableV2Component, isStandalone: false, selector: "eui-table-v2, table[euiTableV2]", inputs: { data: "data", propId: "propId", itemSize: "itemSize", paginator: "paginator", filter: "filter", preselectedRows: "preselectedRows", isVirtualScroll: ["isVirtualScroll", "isVirtualScroll", booleanAttribute], isVirtualScrollCache: ["isVirtualScrollCache", "isVirtualScrollCache", booleanAttribute], hasStickyHeader: ["hasStickyHeader", "hasStickyHeader", booleanAttribute], hasStickyFooter: ["hasStickyFooter", "hasStickyFooter", booleanAttribute], hasStickyCols: ["hasStickyCols", "hasStickyCols", booleanAttribute], isTableResponsive: ["isTableResponsive", "isTableResponsive", booleanAttribute], isAsync: ["isAsync", "isAsync", booleanAttribute], virtualScrollAsyncItemsLength: ["virtualScrollAsyncItemsLength", "virtualScrollAsyncItemsLength", numberAttribute], virtualScrollNbRows: ["virtualScrollNbRows", "virtualScrollNbRows", numberAttribute], isColsOrderable: ["isColsOrderable", "isColsOrderable", booleanAttribute], isLoading: ["isLoading", "isLoading", booleanAttribute], isSelectOnlyVisibleRows: ["isSelectOnlyVisibleRows", "isSelectOnlyVisibleRows", booleanAttribute], isTableBordered: ["isTableBordered", "isTableBordered", booleanAttribute] }, outputs: { scrollChange: "scrollChange", rowsSelect: "rowsSelect", sortChange: "sortChange" }, host: { properties: { "class": "this.cssClasses" } }, providers: [EuiTableV2SelectableRowService, EuiTableV2SortService], queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: ["cdkVirtualScrollViewport"], descendants: true }, { propertyName: "cdkVirtualScrollViewportElement", first: true, predicate: ["cdkVirtualScrollViewportElement"], descendants: true, read: ElementRef }, { propertyName: "theadRef", first: true, predicate: ["theadRef"], descendants: true }, { propertyName: "tbodyRef", first: true, predicate: ["tbodyRef"], descendants: true }, { propertyName: "tfootRef", first: true, predicate: ["tfootRef"], descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: i3.BaseStatesDirective }], ngImport: i0, template: "<!-- <button (click)=\"test(19250)\">19250</button>\n<button (click)=\"test(7895)\">7895</button>\n<button (click)=\"test(16860)\">16860</button>\n<button (click)=\"test(16870)\">16870</button>\n<button (click)=\"test(16880)\">16880</button>\n<button (click)=\"test(16890)\">16890</button>\n<button (click)=\"test(16900)\">16900</button>\n<button (click)=\"test(26998)\">26998</button>\n<button (click)=\"test(28000)\">28000</button> -->\n@if (isVirtualScroll) {\n <cdk-virtual-scroll-viewport\n #cdkVirtualScrollViewport\n #cdkVirtualScrollViewportElement\n class=\"eui-table-v2__scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.overflow]=\"cdkVirtualScrollViewportOverflowValue\"\n tabindex=\"0\">\n <table class=\"{{ cssClasses }}\" [style.width]=\"hostWidth\">\n @if (headerTemplate) {\n <thead #theadRef [style.top]=\"stickyHeaderTopPosition\">\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n <ng-container *cdkVirtualFor=\"let row of dataRendered; let i = index; trackBy: trackByFn\">\n @if (row) {\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n } @else {\n <ng-template [ngTemplateOutlet]=\"skeletonLoading\"></ng-template>\n }\n </ng-container>\n\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef [style.bottom]=\"stickyFooterBottomPosition\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n} @else {\n @if (headerTemplate) {\n <thead #theadRef>\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n @for (row of dataRendered; let i = $index; track $index) {\n <ng-container>\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n </ng-container>\n }\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef>\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n}\n\n<ng-template #skeletonLoading>\n <tr [style.height.px]=\"itemSize\">\n <td *ngFor=\"let __ of nbCols\"><eui-skeleton line euiRounded></eui-skeleton></td>\n </tr>\n</ng-template>\n", styles: [":root{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-lightest)}html.eui-t-dark{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-light)}.eui-19 .eui-table-v2__scroll-viewport{min-height:100%;width:100%}.eui-19 .eui-table-v2__scrollable-wrapper{overflow:auto}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-neutral-bg-light)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-neutral-lighter)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-bg-light);border-radius:0}@-moz-document url-prefix(){.eui-19 .eui-table-v2__scrollable-wrapper{scrollbar-color:var(--eui-c-neutral-lighter) var(--eui-c-neutral-bg-light);scrollbar-width:auto}}.eui-19 .eui-table-v2__orderable-cols-preview,.eui-19 .eui-table-v2__orderable-rows-preview{display:none}.eui-19 .eui-table-v2--highlighted{background-color:var(--eui-c-accent);text-decoration:none}.eui-19 .eui-table-v2--virtual-scroll{width:100%;height:100%}.eui-19 .eui-table-v2--cols-orderable .cdk-drag-placeholder{background-color:var(--eui-c-white);color:var(--eui-c-info);cursor:move;opacity:1}.eui-19 .eui-table-v2--cols-orderable tr{display:table-row}.eui-19 .eui-table-v2--cols-orderable tr th.cdk-drag:not(.cdk-drag-disabled){cursor:move}.eui-19 .eui-table-v2--loading:before{animation:.8s linear infinite spin;border:8px solid transparent;border-radius:50%;border-top-color:var(--eui-c-primary);content:\"\";display:block;height:80px;left:50%;margin:-40px 0 0 -40px;position:absolute;top:50%;width:80px;z-index:1000001}.eui-19 .eui-table-v2--loading:after{background-color:#fff6;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.eui-19 .eui-table-v2--sticky{max-width:none!important}.eui-19 .eui-table-v2--sticky-header thead{position:sticky;top:0;z-index:8}.eui-19 .eui-table-v2--sticky-header thead th,.eui-19 .eui-table-v2--sticky-header thead td{background-color:inherit}.eui-19 .eui-table-v2--sticky-header.eui-table-v2-sticky-col thead{z-index:9}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(odd) td{background-color:inherit}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(2n) td{background-color:inherit}.eui-19 .eui-table-v2--sticky-footer tfoot{position:sticky;bottom:-1px;z-index:8}.eui-19 .eui-table-v2--sticky-footer tfoot tr td{background-color:inherit}.eui-19 .eui-table-v2--sticky-cols .eui-table-v2__col--sticky{position:sticky;z-index:1}.eui-19 .eui-table-v2__row--selected td{background-color:var(--eui-c-primary-lightest)}@media screen and (max-width: 767px){.eui-19 .eui-table-v2.eui-table-default--responsive{width:100%!important}.eui-19 .eui-table-v2.eui-table-default--responsive thead,.eui-19 .eui-table-v2.eui-table-default--responsive tbody,.eui-19 .eui-table-v2.eui-table-default--responsive tfoot,.eui-19 .eui-table-v2.eui-table-default--responsive th,.eui-19 .eui-table-v2.eui-table-default--responsive td,.eui-19 .eui-table-v2.eui-table-default--responsive tr{display:block}.eui-19 .eui-table-v2.eui-table-default--responsive thead tr{left:-9999px;position:absolute;top:-9999px}.eui-19 .eui-table-v2.eui-table-default--responsive tr{height:auto}.eui-19 .eui-table-v2.eui-table-default--responsive td{border:var(--eui-bw-none);border-bottom:1px solid var(--eui-c-neutral-bg);padding-left:50%;position:relative;text-align:left!important;left:unset!important;right:unset!important}.eui-19 .eui-table-v2.eui-table-default--responsive td:before{color:var(--eui-c-neutral-light);content:attr(data-col-label);left:var(--eui-s-xs);padding-right:var(--eui-s-xs);position:absolute;width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--eui-f-m-bold)}.eui-19 .eui-table-v2.eui-table-default--responsive tfoot tr td:empty{display:none!important}.eui-19 .eui-table-v2 .actionsColumn,.eui-19 .eui-table-v2 .actions-column{justify-content:flex-start;text-align:left;width:100%}.eui-19 .eui-table-v2__sticky-container{height:auto;width:auto!important}.eui-19 .eui-table-v2--sticky-cols th,.eui-19 .eui-table-v2--sticky-cols td,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky{width:auto;z-index:auto}.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-last,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-last{box-shadow:none!important}.eui-19 .eui-table-v2--sticky-cols tfoot tr td:empty{display:none!important}}.eui-19 .eui-table-v2__filter{align-items:center;display:flex;justify-content:flex-end;position:relative}.eui-19 .eui-table-v2__filter--responsive{width:100%}.eui-19 .eui-table-v2__filter-input{padding-left:var(--eui-s-3xl)!important}.eui-19 .eui-table-v2__filter-search-icon{left:var(--eui-s-xs);position:absolute;top:var(--eui-s-xs)}.eui-19 .eui-table-v2__sortable-col-multisort-index{font:var(--eui-f-s)}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content{align-items:center;display:flex;vertical-align:middle;white-space:nowrap;justify-content:space-between}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content .eui-table-v2__sortable-col-content-label{align-items:center;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i5.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i6.EuiSkeletonComponent, selector: "eui-skeleton", inputs: ["circle", "line", "square", "rectangle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
969
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: EuiTableV2Component, isStandalone: false, selector: "eui-table-v2, table[euiTableV2]", inputs: { data: "data", propId: "propId", itemSize: "itemSize", paginator: "paginator", filter: "filter", preselectedRows: "preselectedRows", isVirtualScroll: ["isVirtualScroll", "isVirtualScroll", booleanAttribute], isVirtualScrollCache: ["isVirtualScrollCache", "isVirtualScrollCache", booleanAttribute], hasStickyHeader: ["hasStickyHeader", "hasStickyHeader", booleanAttribute], hasStickyFooter: ["hasStickyFooter", "hasStickyFooter", booleanAttribute], hasStickyCols: ["hasStickyCols", "hasStickyCols", booleanAttribute], isTableResponsive: ["isTableResponsive", "isTableResponsive", booleanAttribute], isAsync: ["isAsync", "isAsync", booleanAttribute], virtualScrollAsyncItemsLength: ["virtualScrollAsyncItemsLength", "virtualScrollAsyncItemsLength", numberAttribute], virtualScrollNbRows: ["virtualScrollNbRows", "virtualScrollNbRows", numberAttribute], isColsOrderable: ["isColsOrderable", "isColsOrderable", booleanAttribute], isLoading: ["isLoading", "isLoading", booleanAttribute], isSelectOnlyVisibleRows: ["isSelectOnlyVisibleRows", "isSelectOnlyVisibleRows", booleanAttribute], isTableBordered: ["isTableBordered", "isTableBordered", booleanAttribute] }, outputs: { scrollChange: "scrollChange", rowsSelect: "rowsSelect", sortChange: "sortChange" }, host: { properties: { "class": "this.cssClasses" } }, providers: [EuiTableV2SelectableRowService, EuiTableV2SortService], queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: ["cdkVirtualScrollViewport"], descendants: true }, { propertyName: "cdkVirtualScrollViewportElement", first: true, predicate: ["cdkVirtualScrollViewportElement"], descendants: true, read: ElementRef }, { propertyName: "theadRef", first: true, predicate: ["theadRef"], descendants: true }, { propertyName: "tbodyRef", first: true, predicate: ["tbodyRef"], descendants: true }, { propertyName: "tfootRef", first: true, predicate: ["tfootRef"], descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: i3.BaseStatesDirective }], ngImport: i0, template: "@if (isVirtualScroll) {\n <cdk-virtual-scroll-viewport\n #cdkVirtualScrollViewport\n #cdkVirtualScrollViewportElement\n class=\"eui-table-v2__scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.overflow]=\"cdkVirtualScrollViewportOverflowValue\"\n tabindex=\"0\">\n <table class=\"{{ cssClasses }}\" [style.width]=\"hostWidth\">\n @if (headerTemplate) {\n <thead #theadRef [style.top]=\"stickyHeaderTopPosition\">\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n <ng-container *cdkVirtualFor=\"let row of dataRendered; let i = index; trackBy: trackByFn\">\n @if (row) {\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n } @else {\n <ng-template [ngTemplateOutlet]=\"skeletonLoading\"></ng-template>\n }\n </ng-container>\n\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef [style.bottom]=\"stickyFooterBottomPosition\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n} @else {\n @if (headerTemplate) {\n <thead #theadRef>\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n @for (row of dataRendered; let i = $index; track $index) {\n <ng-container>\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n </ng-container>\n }\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef>\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n}\n\n<ng-template #skeletonLoading>\n <tr [style.height.px]=\"itemSize\">\n <td *ngFor=\"let __ of nbCols\"><eui-skeleton line euiRounded></eui-skeleton></td>\n </tr>\n</ng-template>\n", styles: [":root{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-lightest)}html.eui-t-dark{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-light)}.eui-19 .eui-table-v2__scroll-viewport{min-height:100%;width:100%}.eui-19 .eui-table-v2__scrollable-wrapper{overflow:auto}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-neutral-bg-light)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-neutral-lighter)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-bg-light);border-radius:0}@-moz-document url-prefix(){.eui-19 .eui-table-v2__scrollable-wrapper{scrollbar-color:var(--eui-c-neutral-lighter) var(--eui-c-neutral-bg-light);scrollbar-width:auto}}.eui-19 .eui-table-v2__orderable-cols-preview,.eui-19 .eui-table-v2__orderable-rows-preview{display:none}.eui-19 .eui-table-v2--highlighted{background-color:var(--eui-c-accent);text-decoration:none}.eui-19 .eui-table-v2--virtual-scroll{width:100%;height:100%}.eui-19 .eui-table-v2--cols-orderable .cdk-drag-placeholder{background-color:var(--eui-c-white);color:var(--eui-c-info);cursor:move;opacity:1}.eui-19 .eui-table-v2--cols-orderable tr{display:table-row}.eui-19 .eui-table-v2--cols-orderable tr th.cdk-drag:not(.cdk-drag-disabled){cursor:move}.eui-19 .eui-table-v2--loading:before{animation:.8s linear infinite spin;border:8px solid transparent;border-radius:50%;border-top-color:var(--eui-c-primary);content:\"\";display:block;height:80px;left:50%;margin:-40px 0 0 -40px;position:absolute;top:50%;width:80px;z-index:1000001}.eui-19 .eui-table-v2--loading:after{background-color:#fff6;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.eui-19 .eui-table-v2--sticky{max-width:none!important}.eui-19 .eui-table-v2--sticky-header thead{position:sticky;top:0;z-index:8}.eui-19 .eui-table-v2--sticky-header thead th,.eui-19 .eui-table-v2--sticky-header thead td{background-color:inherit}.eui-19 .eui-table-v2--sticky-header.eui-table-v2-sticky-col thead{z-index:9}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(odd) td{background-color:inherit}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(2n) td{background-color:inherit}.eui-19 .eui-table-v2--sticky-footer tfoot{position:sticky;bottom:-1px;z-index:8}.eui-19 .eui-table-v2--sticky-footer tfoot tr td{background-color:inherit}.eui-19 .eui-table-v2--sticky-cols .eui-table-v2__col--sticky{position:sticky;z-index:1}.eui-19 .eui-table-v2__row--selected td{background-color:var(--eui-c-primary-lightest)}@media screen and (max-width: 767px){.eui-19 .eui-table-v2.eui-table-default--responsive{width:100%!important}.eui-19 .eui-table-v2.eui-table-default--responsive thead,.eui-19 .eui-table-v2.eui-table-default--responsive tbody,.eui-19 .eui-table-v2.eui-table-default--responsive tfoot,.eui-19 .eui-table-v2.eui-table-default--responsive th,.eui-19 .eui-table-v2.eui-table-default--responsive td,.eui-19 .eui-table-v2.eui-table-default--responsive tr{display:block}.eui-19 .eui-table-v2.eui-table-default--responsive thead tr{left:-9999px;position:absolute;top:-9999px}.eui-19 .eui-table-v2.eui-table-default--responsive tr{height:auto}.eui-19 .eui-table-v2.eui-table-default--responsive td{border:var(--eui-bw-none);border-bottom:1px solid var(--eui-c-neutral-bg);padding-left:50%;position:relative;text-align:left!important;left:unset!important;right:unset!important}.eui-19 .eui-table-v2.eui-table-default--responsive td:before{color:var(--eui-c-neutral-light);content:attr(data-col-label);left:var(--eui-s-xs);padding-right:var(--eui-s-xs);position:absolute;width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--eui-f-m-bold)}.eui-19 .eui-table-v2.eui-table-default--responsive tfoot tr td:empty{display:none!important}.eui-19 .eui-table-v2 .actionsColumn,.eui-19 .eui-table-v2 .actions-column{justify-content:flex-start;text-align:left;width:100%}.eui-19 .eui-table-v2__sticky-container{height:auto;width:auto!important}.eui-19 .eui-table-v2--sticky-cols th,.eui-19 .eui-table-v2--sticky-cols td,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky{width:auto;z-index:auto}.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-last,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-last{box-shadow:none!important}.eui-19 .eui-table-v2--sticky-cols tfoot tr td:empty{display:none!important}}.eui-19 .eui-table-v2__filter{align-items:center;display:flex;justify-content:flex-end;position:relative}.eui-19 .eui-table-v2__filter--responsive{width:100%}.eui-19 .eui-table-v2__filter-input{padding-left:var(--eui-s-3xl)!important}.eui-19 .eui-table-v2__filter-search-icon{left:var(--eui-s-xs);position:absolute;top:var(--eui-s-xs)}.eui-19 .eui-table-v2__sortable-col-multisort-index{font:var(--eui-f-s)}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content{align-items:center;display:flex;vertical-align:middle;white-space:nowrap;justify-content:space-between}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content .eui-table-v2__sortable-col-content-label{align-items:center;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i5.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i5.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i6.EuiSkeletonComponent, selector: "eui-skeleton", inputs: ["circle", "line", "square", "rectangle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
626
970
  }
627
971
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EuiTableV2Component, decorators: [{
628
972
  type: Component,
@@ -631,7 +975,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
631
975
  directive: BaseStatesDirective,
632
976
  inputs: [],
633
977
  },
634
- ], template: "<!-- <button (click)=\"test(19250)\">19250</button>\n<button (click)=\"test(7895)\">7895</button>\n<button (click)=\"test(16860)\">16860</button>\n<button (click)=\"test(16870)\">16870</button>\n<button (click)=\"test(16880)\">16880</button>\n<button (click)=\"test(16890)\">16890</button>\n<button (click)=\"test(16900)\">16900</button>\n<button (click)=\"test(26998)\">26998</button>\n<button (click)=\"test(28000)\">28000</button> -->\n@if (isVirtualScroll) {\n <cdk-virtual-scroll-viewport\n #cdkVirtualScrollViewport\n #cdkVirtualScrollViewportElement\n class=\"eui-table-v2__scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.overflow]=\"cdkVirtualScrollViewportOverflowValue\"\n tabindex=\"0\">\n <table class=\"{{ cssClasses }}\" [style.width]=\"hostWidth\">\n @if (headerTemplate) {\n <thead #theadRef [style.top]=\"stickyHeaderTopPosition\">\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n <ng-container *cdkVirtualFor=\"let row of dataRendered; let i = index; trackBy: trackByFn\">\n @if (row) {\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n } @else {\n <ng-template [ngTemplateOutlet]=\"skeletonLoading\"></ng-template>\n }\n </ng-container>\n\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef [style.bottom]=\"stickyFooterBottomPosition\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n} @else {\n @if (headerTemplate) {\n <thead #theadRef>\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n @for (row of dataRendered; let i = $index; track $index) {\n <ng-container>\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n </ng-container>\n }\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef>\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n}\n\n<ng-template #skeletonLoading>\n <tr [style.height.px]=\"itemSize\">\n <td *ngFor=\"let __ of nbCols\"><eui-skeleton line euiRounded></eui-skeleton></td>\n </tr>\n</ng-template>\n", styles: [":root{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-lightest)}html.eui-t-dark{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-light)}.eui-19 .eui-table-v2__scroll-viewport{min-height:100%;width:100%}.eui-19 .eui-table-v2__scrollable-wrapper{overflow:auto}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-neutral-bg-light)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-neutral-lighter)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-bg-light);border-radius:0}@-moz-document url-prefix(){.eui-19 .eui-table-v2__scrollable-wrapper{scrollbar-color:var(--eui-c-neutral-lighter) var(--eui-c-neutral-bg-light);scrollbar-width:auto}}.eui-19 .eui-table-v2__orderable-cols-preview,.eui-19 .eui-table-v2__orderable-rows-preview{display:none}.eui-19 .eui-table-v2--highlighted{background-color:var(--eui-c-accent);text-decoration:none}.eui-19 .eui-table-v2--virtual-scroll{width:100%;height:100%}.eui-19 .eui-table-v2--cols-orderable .cdk-drag-placeholder{background-color:var(--eui-c-white);color:var(--eui-c-info);cursor:move;opacity:1}.eui-19 .eui-table-v2--cols-orderable tr{display:table-row}.eui-19 .eui-table-v2--cols-orderable tr th.cdk-drag:not(.cdk-drag-disabled){cursor:move}.eui-19 .eui-table-v2--loading:before{animation:.8s linear infinite spin;border:8px solid transparent;border-radius:50%;border-top-color:var(--eui-c-primary);content:\"\";display:block;height:80px;left:50%;margin:-40px 0 0 -40px;position:absolute;top:50%;width:80px;z-index:1000001}.eui-19 .eui-table-v2--loading:after{background-color:#fff6;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.eui-19 .eui-table-v2--sticky{max-width:none!important}.eui-19 .eui-table-v2--sticky-header thead{position:sticky;top:0;z-index:8}.eui-19 .eui-table-v2--sticky-header thead th,.eui-19 .eui-table-v2--sticky-header thead td{background-color:inherit}.eui-19 .eui-table-v2--sticky-header.eui-table-v2-sticky-col thead{z-index:9}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(odd) td{background-color:inherit}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(2n) td{background-color:inherit}.eui-19 .eui-table-v2--sticky-footer tfoot{position:sticky;bottom:-1px;z-index:8}.eui-19 .eui-table-v2--sticky-footer tfoot tr td{background-color:inherit}.eui-19 .eui-table-v2--sticky-cols .eui-table-v2__col--sticky{position:sticky;z-index:1}.eui-19 .eui-table-v2__row--selected td{background-color:var(--eui-c-primary-lightest)}@media screen and (max-width: 767px){.eui-19 .eui-table-v2.eui-table-default--responsive{width:100%!important}.eui-19 .eui-table-v2.eui-table-default--responsive thead,.eui-19 .eui-table-v2.eui-table-default--responsive tbody,.eui-19 .eui-table-v2.eui-table-default--responsive tfoot,.eui-19 .eui-table-v2.eui-table-default--responsive th,.eui-19 .eui-table-v2.eui-table-default--responsive td,.eui-19 .eui-table-v2.eui-table-default--responsive tr{display:block}.eui-19 .eui-table-v2.eui-table-default--responsive thead tr{left:-9999px;position:absolute;top:-9999px}.eui-19 .eui-table-v2.eui-table-default--responsive tr{height:auto}.eui-19 .eui-table-v2.eui-table-default--responsive td{border:var(--eui-bw-none);border-bottom:1px solid var(--eui-c-neutral-bg);padding-left:50%;position:relative;text-align:left!important;left:unset!important;right:unset!important}.eui-19 .eui-table-v2.eui-table-default--responsive td:before{color:var(--eui-c-neutral-light);content:attr(data-col-label);left:var(--eui-s-xs);padding-right:var(--eui-s-xs);position:absolute;width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--eui-f-m-bold)}.eui-19 .eui-table-v2.eui-table-default--responsive tfoot tr td:empty{display:none!important}.eui-19 .eui-table-v2 .actionsColumn,.eui-19 .eui-table-v2 .actions-column{justify-content:flex-start;text-align:left;width:100%}.eui-19 .eui-table-v2__sticky-container{height:auto;width:auto!important}.eui-19 .eui-table-v2--sticky-cols th,.eui-19 .eui-table-v2--sticky-cols td,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky{width:auto;z-index:auto}.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-last,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-last{box-shadow:none!important}.eui-19 .eui-table-v2--sticky-cols tfoot tr td:empty{display:none!important}}.eui-19 .eui-table-v2__filter{align-items:center;display:flex;justify-content:flex-end;position:relative}.eui-19 .eui-table-v2__filter--responsive{width:100%}.eui-19 .eui-table-v2__filter-input{padding-left:var(--eui-s-3xl)!important}.eui-19 .eui-table-v2__filter-search-icon{left:var(--eui-s-xs);position:absolute;top:var(--eui-s-xs)}.eui-19 .eui-table-v2__sortable-col-multisort-index{font:var(--eui-f-s)}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content{align-items:center;display:flex;vertical-align:middle;white-space:nowrap;justify-content:space-between}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content .eui-table-v2__sortable-col-content-label{align-items:center;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"] }]
978
+ ], template: "@if (isVirtualScroll) {\n <cdk-virtual-scroll-viewport\n #cdkVirtualScrollViewport\n #cdkVirtualScrollViewportElement\n class=\"eui-table-v2__scroll-viewport\"\n [itemSize]=\"itemSize\"\n [style.overflow]=\"cdkVirtualScrollViewportOverflowValue\"\n tabindex=\"0\">\n <table class=\"{{ cssClasses }}\" [style.width]=\"hostWidth\">\n @if (headerTemplate) {\n <thead #theadRef [style.top]=\"stickyHeaderTopPosition\">\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n <ng-container *cdkVirtualFor=\"let row of dataRendered; let i = index; trackBy: trackByFn\">\n @if (row) {\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n } @else {\n <ng-template [ngTemplateOutlet]=\"skeletonLoading\"></ng-template>\n }\n </ng-container>\n\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef [style.bottom]=\"stickyFooterBottomPosition\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n} @else {\n @if (headerTemplate) {\n <thead #theadRef>\n <ng-template [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n </thead>\n }\n @if (bodyTemplate) {\n <tbody #tbodyRef>\n @for (row of dataRendered; let i = $index; track $index) {\n <ng-container>\n <ng-template\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\">\n </ng-template>\n </ng-container>\n }\n @if (noDataTemplate && (data?.length === 0 || dataRendered?.length === 0)) {\n <ng-template [ngTemplateOutlet]=\"noDataTemplate\"></ng-template>\n }\n </tbody>\n }\n @if (footerTemplate) {\n <tfoot #tfootRef>\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </tfoot>\n }\n}\n\n<ng-template #skeletonLoading>\n <tr [style.height.px]=\"itemSize\">\n <td *ngFor=\"let __ of nbCols\"><eui-skeleton line euiRounded></eui-skeleton></td>\n </tr>\n</ng-template>\n", styles: [":root{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-lightest)}html.eui-t-dark{--_eui-scrollbars-foreground-color: var(--eui-c-neutral-light)}.eui-19 .eui-table-v2__scroll-viewport{min-height:100%;width:100%}.eui-19 .eui-table-v2__scrollable-wrapper{overflow:auto}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar{display:inherit;height:8px;width:8px;background-color:var(--eui-c-neutral-bg-light)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb{background-color:var(--_eui-scrollbars-foreground-color);border-radius:5rem}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--eui-c-neutral-lighter)}.eui-19 .eui-table-v2__scrollable-wrapper::-webkit-scrollbar-track{background-color:var(--eui-c-neutral-bg-light);border-radius:0}@-moz-document url-prefix(){.eui-19 .eui-table-v2__scrollable-wrapper{scrollbar-color:var(--eui-c-neutral-lighter) var(--eui-c-neutral-bg-light);scrollbar-width:auto}}.eui-19 .eui-table-v2__orderable-cols-preview,.eui-19 .eui-table-v2__orderable-rows-preview{display:none}.eui-19 .eui-table-v2--highlighted{background-color:var(--eui-c-accent);text-decoration:none}.eui-19 .eui-table-v2--virtual-scroll{width:100%;height:100%}.eui-19 .eui-table-v2--cols-orderable .cdk-drag-placeholder{background-color:var(--eui-c-white);color:var(--eui-c-info);cursor:move;opacity:1}.eui-19 .eui-table-v2--cols-orderable tr{display:table-row}.eui-19 .eui-table-v2--cols-orderable tr th.cdk-drag:not(.cdk-drag-disabled){cursor:move}.eui-19 .eui-table-v2--loading:before{animation:.8s linear infinite spin;border:8px solid transparent;border-radius:50%;border-top-color:var(--eui-c-primary);content:\"\";display:block;height:80px;left:50%;margin:-40px 0 0 -40px;position:absolute;top:50%;width:80px;z-index:1000001}.eui-19 .eui-table-v2--loading:after{background-color:#fff6;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.eui-19 .eui-table-v2--sticky{max-width:none!important}.eui-19 .eui-table-v2--sticky-header thead{position:sticky;top:0;z-index:8}.eui-19 .eui-table-v2--sticky-header thead th,.eui-19 .eui-table-v2--sticky-header thead td{background-color:inherit}.eui-19 .eui-table-v2--sticky-header.eui-table-v2-sticky-col thead{z-index:9}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(odd) td{background-color:inherit}.eui-19 .eui-table-v2--sticky tbody tr:nth-of-type(2n) td{background-color:inherit}.eui-19 .eui-table-v2--sticky-footer tfoot{position:sticky;bottom:-1px;z-index:8}.eui-19 .eui-table-v2--sticky-footer tfoot tr td{background-color:inherit}.eui-19 .eui-table-v2--sticky-cols .eui-table-v2__col--sticky{position:sticky;z-index:1}.eui-19 .eui-table-v2__row--selected td{background-color:var(--eui-c-primary-lightest)}@media screen and (max-width: 767px){.eui-19 .eui-table-v2.eui-table-default--responsive{width:100%!important}.eui-19 .eui-table-v2.eui-table-default--responsive thead,.eui-19 .eui-table-v2.eui-table-default--responsive tbody,.eui-19 .eui-table-v2.eui-table-default--responsive tfoot,.eui-19 .eui-table-v2.eui-table-default--responsive th,.eui-19 .eui-table-v2.eui-table-default--responsive td,.eui-19 .eui-table-v2.eui-table-default--responsive tr{display:block}.eui-19 .eui-table-v2.eui-table-default--responsive thead tr{left:-9999px;position:absolute;top:-9999px}.eui-19 .eui-table-v2.eui-table-default--responsive tr{height:auto}.eui-19 .eui-table-v2.eui-table-default--responsive td{border:var(--eui-bw-none);border-bottom:1px solid var(--eui-c-neutral-bg);padding-left:50%;position:relative;text-align:left!important;left:unset!important;right:unset!important}.eui-19 .eui-table-v2.eui-table-default--responsive td:before{color:var(--eui-c-neutral-light);content:attr(data-col-label);left:var(--eui-s-xs);padding-right:var(--eui-s-xs);position:absolute;width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--eui-f-m-bold)}.eui-19 .eui-table-v2.eui-table-default--responsive tfoot tr td:empty{display:none!important}.eui-19 .eui-table-v2 .actionsColumn,.eui-19 .eui-table-v2 .actions-column{justify-content:flex-start;text-align:left;width:100%}.eui-19 .eui-table-v2__sticky-container{height:auto;width:auto!important}.eui-19 .eui-table-v2--sticky-cols th,.eui-19 .eui-table-v2--sticky-cols td,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky{width:auto;z-index:auto}.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols th .eui-table__col--sticky.eui-table__col--sticky-shadowed-last,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-first,.eui-19 .eui-table-v2--sticky-cols td .eui-table__col--sticky.eui-table__col--sticky-shadowed-last{box-shadow:none!important}.eui-19 .eui-table-v2--sticky-cols tfoot tr td:empty{display:none!important}}.eui-19 .eui-table-v2__filter{align-items:center;display:flex;justify-content:flex-end;position:relative}.eui-19 .eui-table-v2__filter--responsive{width:100%}.eui-19 .eui-table-v2__filter-input{padding-left:var(--eui-s-3xl)!important}.eui-19 .eui-table-v2__filter-search-icon{left:var(--eui-s-xs);position:absolute;top:var(--eui-s-xs)}.eui-19 .eui-table-v2__sortable-col-multisort-index{font:var(--eui-f-s)}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content{align-items:center;display:flex;vertical-align:middle;white-space:nowrap;justify-content:space-between}.eui-19 .eui-table-v2__sortable-col .eui-table-v2__sortable-col-content .eui-table-v2__sortable-col-content-label{align-items:center;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"] }]
635
979
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: EuiTableV2SelectableRowService }, { type: EuiTableV2SortService }, { type: i3.BaseStatesDirective }, { type: i0.Renderer2 }], propDecorators: { cssClasses: [{
636
980
  type: HostBinding,
637
981
  args: ['class']
@@ -712,6 +1056,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
712
1056
  type: Output
713
1057
  }] } });
714
1058
 
1059
+ /**
1060
+ * @description
1061
+ * Directive used to activate the sticky feature on a column of the table.
1062
+ */
715
1063
  class EuiTableV2StickyColDirective {
716
1064
  constructor() {
717
1065
  this.class = 'eui-table-v2__col--sticky';
@@ -731,6 +1079,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
731
1079
  args: ['class']
732
1080
  }] } });
733
1081
 
1082
+ /**
1083
+ * @description
1084
+ * Directive used to activate the expandable feature on a orw of the table.
1085
+ */
734
1086
  class EuiTableV2ExpandableRowDirective {
735
1087
  constructor(el, animationBuilder) {
736
1088
  this.el = el;
@@ -763,9 +1115,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
763
1115
  args: ['class']
764
1116
  }] } });
765
1117
 
1118
+ /**
1119
+ * @description
1120
+ * Component used internally by `eui-table-v2` to add a 'select all' checkbox in the header of the table.
1121
+ */
766
1122
  class EuiTableV2SelectableHeaderComponent {
767
1123
  constructor(euiDataTableSelectableRowService) {
768
1124
  this.euiDataTableSelectableRowService = euiDataTableSelectableRowService;
1125
+ /**
1126
+ * Wheter a select all feature is available in the header.
1127
+ *
1128
+ * @default false
1129
+ */
769
1130
  this.isHeaderSelectable = true;
770
1131
  this.isCheckedIndeterminate = false;
771
1132
  this.isChecked = false;
@@ -784,6 +1145,11 @@ class EuiTableV2SelectableHeaderComponent {
784
1145
  this.destroy$.next(true);
785
1146
  this.destroy$.unsubscribe();
786
1147
  }
1148
+ /**
1149
+ * Gets the `aria-label` attribute for the checkbox element.
1150
+ *
1151
+ * @default `Unchecked`
1152
+ */
787
1153
  get ariaLabel() {
788
1154
  if (!this.isChecked && !this.isCheckedIndeterminate) {
789
1155
  return 'Unchecked';
@@ -795,6 +1161,11 @@ class EuiTableV2SelectableHeaderComponent {
795
1161
  return 'Checked';
796
1162
  }
797
1163
  }
1164
+ /**
1165
+ * Handle the change of the selected status.
1166
+ *
1167
+ * @param e Change Event
1168
+ */
798
1169
  toggleCheckedState(e) {
799
1170
  this.isChecked = e.target.checked;
800
1171
  if (this.isChecked) {
@@ -815,7 +1186,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
815
1186
  args: [{ transform: booleanAttribute }]
816
1187
  }] } });
817
1188
 
1189
+ /**
1190
+ * @description
1191
+ * Component used internally by `eui-table-v2` to make a row selectable.
1192
+ */
818
1193
  class EuiTableV2SelectableRowComponent {
1194
+ /**
1195
+ * @description
1196
+ * Computes and returns the CSS classes for the component based on its current state.
1197
+ *
1198
+ * @returns {string} Space-separated string of CSS class names
1199
+ */
819
1200
  get cssClasses() {
820
1201
  return [
821
1202
  'eui-table-v2__row',
@@ -828,7 +1209,17 @@ class EuiTableV2SelectableRowComponent {
828
1209
  constructor(euiDataTableSelectableRowService, elementRef) {
829
1210
  this.euiDataTableSelectableRowService = euiDataTableSelectableRowService;
830
1211
  this.elementRef = elementRef;
1212
+ /**
1213
+ * Wheter the row is selected.
1214
+ *
1215
+ * @default false
1216
+ */
831
1217
  this.isChecked = false;
1218
+ /**
1219
+ * Wheter the selection can be done with the keyboard.
1220
+ *
1221
+ * @default false
1222
+ */
832
1223
  this.isKeyboardSelectable = false;
833
1224
  this.propId = 'id';
834
1225
  this.destroy$ = new Subject();
@@ -879,6 +1270,11 @@ class EuiTableV2SelectableRowComponent {
879
1270
  this.destroy$.next(true);
880
1271
  this.destroy$.unsubscribe();
881
1272
  }
1273
+ /**
1274
+ * Handle the change of the selected status.
1275
+ *
1276
+ * @param e Change Event
1277
+ */
882
1278
  toggleCheckedState(e) {
883
1279
  this.isChecked = e.target.checked;
884
1280
  if (this.isChecked) {
@@ -907,8 +1303,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
907
1303
  args: ['class']
908
1304
  }] } });
909
1305
 
1306
+ /**
1307
+ * @description
1308
+ * Component used with `eui-table-v2` to add a filter feature to the table.
1309
+ */
910
1310
  class EuiTableV2FilterComponent {
911
1311
  constructor() {
1312
+ /**
1313
+ * Event emitted when the value of the input changes.
1314
+ */
912
1315
  this.filterChange = new EventEmitter();
913
1316
  this.filter$ = new BehaviorSubject(null);
914
1317
  this.form = new FormGroup({
@@ -916,6 +1319,12 @@ class EuiTableV2FilterComponent {
916
1319
  });
917
1320
  this.destroy$ = new Subject();
918
1321
  }
1322
+ /**
1323
+ * @description
1324
+ * Computes and returns the CSS classes for the component based on its current state.
1325
+ *
1326
+ * @returns {string} Space-separated string of CSS class names
1327
+ */
919
1328
  get cssClasses() {
920
1329
  return [
921
1330
  'eui-table-v2__filter',
@@ -932,6 +1341,11 @@ class EuiTableV2FilterComponent {
932
1341
  this.destroy$.next(true);
933
1342
  this.destroy$.unsubscribe();
934
1343
  }
1344
+ /**
1345
+ * Set the filter value and emit the change event.
1346
+ *
1347
+ * @param value Value of the input.
1348
+ */
935
1349
  setFilter(value) {
936
1350
  this.filter$.next(value);
937
1351
  this.filterChange.emit(value);
@@ -963,7 +1377,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
963
1377
  args: ['filterInput', { read: ElementRef }]
964
1378
  }] } });
965
1379
 
1380
+ /**
1381
+ * @description
1382
+ * Pipe used to highlight the matching string in the data of the table when used with filter feature.
1383
+ *
1384
+ * @example
1385
+ * ```
1386
+ * <td><span [innerHTML]="row.year | euiTableV2Highlight: strFilter"></span></td>
1387
+ *
1388
+ * strFilter = '19'
1389
+ * ```
1390
+ */
966
1391
  class EuiTableV2HighlightPipe {
1392
+ /**
1393
+ * Wrap a matching string with a span element with a class name in the data of the table
1394
+ *
1395
+ * @param value Data displayed in a cell.
1396
+ * @param strFilter Search string to highlight.
1397
+ * @param className CSS class to add to the span element. Default: 'eui-table-v2--highlighted'
1398
+ * @returns
1399
+ */
967
1400
  transform(value, strFilter, className = 'eui-table-v2--highlighted') {
968
1401
  if (value) {
969
1402
  if (strFilter && strFilter.length > 0) {
@@ -989,7 +1422,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
989
1422
  }]
990
1423
  }] });
991
1424
 
1425
+ /**
1426
+ * @description
1427
+ * Component used internally by `eui-table-v2` to make a column sortable.
1428
+ */
992
1429
  class EuiTableV2SortableColComponent {
1430
+ /**
1431
+ * @description
1432
+ * Computes and returns the CSS classes for the component based on its current state.
1433
+ *
1434
+ * @returns {string} Space-separated string of CSS class names
1435
+ */
993
1436
  get cssClasses() {
994
1437
  return ['eui-table-v2__sortable-col', this.sortDisabled ? 'eui-table-v2__sortable-col--disabled' : ''].join(' ').trim();
995
1438
  }
@@ -997,8 +1440,23 @@ class EuiTableV2SortableColComponent {
997
1440
  this.euiTableV2SortService = euiTableV2SortService;
998
1441
  this.elementRef = elementRef;
999
1442
  this.sortOrder = 'asc';
1443
+ /**
1444
+ * Wheter the column is sorted by defaut.
1445
+ *
1446
+ * @default false
1447
+ */
1000
1448
  this.defaultOrder = false;
1449
+ /**
1450
+ * Wheter the sort is disabled on the column.
1451
+ *
1452
+ * @default false
1453
+ */
1001
1454
  this.sortDisabled = false;
1455
+ /**
1456
+ * Wheter the sorting of the column can be cumulated with the one of other column.
1457
+ *
1458
+ * @default false
1459
+ */
1002
1460
  this.isMultiSortable = false;
1003
1461
  this.order = null;
1004
1462
  this.isSorted = false;
@@ -1032,6 +1490,9 @@ class EuiTableV2SortableColComponent {
1032
1490
  this.destroy$.next(true);
1033
1491
  this.destroy$.unsubscribe();
1034
1492
  }
1493
+ /**
1494
+ * Handles the click event on the sortable column.
1495
+ */
1035
1496
  changeSort() {
1036
1497
  if (!this.sortDisabled) {
1037
1498
  if (this.order === 'asc') {
@@ -1046,6 +1507,10 @@ class EuiTableV2SortableColComponent {
1046
1507
  this.euiTableV2SortService.setSort(this.sortOn, this.order, this.isMultiSortable);
1047
1508
  }
1048
1509
  }
1510
+ /**
1511
+ * Handles the click event on the dropdown item when the column is multi-sortable.
1512
+ * @param order An array of SortOrder. See {@link SortOrder}
1513
+ */
1049
1514
  onDropdownItemClick(order) {
1050
1515
  this.euiTableV2SortService.setSort(this.sortOn, order, this.isMultiSortable);
1051
1516
  }
@@ -1076,6 +1541,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
1076
1541
  args: ['euiDropdown']
1077
1542
  }] } });
1078
1543
 
1544
+ /**
1545
+ * @description
1546
+ * Module that provides the EuiTableV2 component and its dependencies
1547
+ *
1548
+ * @example
1549
+ * ```
1550
+ * \@NgModule({
1551
+ * imports: [EuiTableV2Module]
1552
+ * })
1553
+ * export class YourModule { }
1554
+ * ```
1555
+ */
1079
1556
  class EuiTableV2Module {
1080
1557
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: EuiTableV2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1081
1558
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: EuiTableV2Module, declarations: [EuiTableV2Component,