@exmg/exm-grid 1.2.2 → 1.2.3

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.
@@ -1,331 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
- import { html } from 'lit';
3
- import { ExmgElement } from '@exmg/lit-base/index.js';
4
- import { property, customElement, state } from 'lit/decorators.js';
5
- import { cache } from 'lit/directives/cache.js';
6
- import '@exmg/exm-sortable/exm-sortable.js';
2
+ import { customElement } from 'lit/decorators.js';
7
3
  import { style as exmgGridTableStyles } from '../styles/exm-grid-styles-css.js';
8
- import { ExmRowSelectable } from './featrues/exm-row-selectable.js';
9
- import { ExmQuerySelectors } from './utils/exm-query-selectors.js';
10
- import { ExmRowExpandable } from './featrues/exm-row-expandable.js';
11
- import { ExmColumnSortable } from './featrues/exm-column-sortable.js';
12
- import { ExmRowSortable } from './featrues/exm-row-sortable.js';
13
- /**
14
- * ### Styling
15
- * The following custom properties and mixins are available for styling:
16
- *
17
- * Custom property | Description | Default
18
- * ----------------|-------------|----------
19
- * `--exm-arrow-upward-url` | Url to icon that is used for soring direction indicator | `url('/assets/arrow-upward.svg');`
20
- * `--exm-table-card-width` | table card width | `100%;`
21
- * `--exm-table-card-margin-bottom` | table bottom margin | `5px;`
22
- * `--exm-table-color` | table text color | `#02182b;`
23
- * `--exm-table-background-color` | table background color | `#ffffff;`
24
- * `--exm-table-box-shadow` | table box shadow | `#{0px 1px 5px 0px rgba($onSurface, .2), 0px 2px 2px 0px rgba($onSurface, .14), 0px 3px 1px -2px rgba($onSurface, .12)},`
25
- * `--exm-table-row-divider-color` | table rows separator color | `#dbdbdb;`
26
- * `--exm-table-row-selected-color` | selected row text color | `#02182b;`
27
- * `--exm-table-row-selected-background-color` | selected row background color | `#e2f1fe;`
28
- * `--exm-table-row-hover-color` | row hover text color | `#02182b;`
29
- * `--exm-table-row-hover-background-color` | row hover background color | `#f1f1f1;`
30
- * `--exm-table-row-dragged-background-color` | sortable row background color when dragged | `#f1f1f1;`
31
- * `--exm-table-rows-expanded-divider-border` | border between row and expanded row detail | `none;`
32
- * `--exm-table-rows-expanded-border` | border around row and expanded row detail | `1px solid #dbdbdb;`
33
- * `--exm-table-rows-expanded-background-color` | background color of row and expanded row detail | `#e2f1fe;`
34
- * `--exm-table-rows-expanded-color` | text color of row and expanded row detail | `#02182b;`
35
- * `--exm-table-th-color` | header text color | `#0071dc;`
36
- * `--exm-table-columns-background-color` | header background color | `#ffffff;`
37
- * `--exm-table-th-sortable-hover-color` | sortable header hover text color | `#02182b;`
38
- * `--exm-table-th-height` | header height | `48px;`
39
- * `--exm-table-th-sort-margin-left` | header margin after text but before icon | `0px;`
40
- * `--exm-table-td-height` | row cell height | `48px;`
41
- * `--exm-table-th-sort-icon-height` | sort icon height | `1em;`
42
- * `--exm-table-th-sort-icon-width` | sort icon width | `1em;`
43
- * `--exm-table-col-number-padding-right` | right padding of number column | `10px;`
44
- * `--exm-table-checkbox-cell-width` | width of cell with checkbox | `24px;`
45
- */
46
- let ExmGrid = class ExmGrid extends ExmgElement {
47
- constructor() {
48
- super(...arguments);
49
- /**
50
- * Array of data which mapped to rows
51
- */
52
- this.items = [];
53
- /**
54
- * Feature that turn on sort by column
55
- */
56
- this.sortable = false;
57
- /**
58
- * Feature that allow sort rows
59
- * If table has turn on feature `selectable` then it takes precedence and `rowSelectable` will be ignored
60
- */
61
- this.rowsSortable = false;
62
- /**
63
- * Feature that allow select rows
64
- */
65
- this.rowsSelectable = false;
66
- /**
67
- * By default a ros is also selactable by clicking anywhere inside the row when the rowSElectable option is enabled
68
- */
69
- this.disableRowClickSelection = false;
70
- /**
71
- * Map of column names that should be hidden
72
- */
73
- this.hiddenColumnNames = {};
74
- /**
75
- * Map of row id and selection state
76
- * Useful for setup default selection or manipulating programmatically
77
- */
78
- this.selectedRowIds = {};
79
- /**
80
- * Map of row id and expandable row state
81
- * Useful for setup default expanded rows or manipulating programmatically
82
- */
83
- this.expandedRowIds = {};
84
- /**
85
- * Set table layout. If fixed then text overflow will be hidden and ellipsis added.
86
- */
87
- this.tableLayout = 'auto';
88
- this.withToolbar = false;
89
- this.componentReady = false;
90
- }
91
- getQuerySelectors() {
92
- if (!this.querySelectors) {
93
- throw new Error('ExmQuerySelector not initialized yet');
94
- }
95
- return this.querySelectors;
96
- }
97
- getTable() {
98
- return this.getQuerySelectors().getTable();
99
- }
100
- getTableBody() {
101
- return this.getQuerySelectors().getTableBody();
102
- }
103
- findTableBody() {
104
- if (this.querySelectors) {
105
- return this.getTableBody() || undefined;
106
- }
107
- return undefined;
108
- }
109
- // eslint-disable-next-line
110
- getColumns(selector = 'th') {
111
- return this.getQuerySelectors().getColumns(selector);
112
- }
113
- getBodyRowSelector(selector = '') {
114
- return this.getQuerySelectors().getBodyRowSelector(selector);
115
- }
116
- canSortRows() {
117
- return !this.sortable && this.rowsSortable;
118
- }
119
- rowsOrderChange(e) {
120
- setTimeout(() => {
121
- const { sourceIndex, targetIndex } = e.detail;
122
- const items = [...this.items];
123
- const movedElement = items[sourceIndex];
124
- items.splice(sourceIndex, 1);
125
- items.splice(targetIndex, 0, movedElement);
126
- this.dispatchEvent(new CustomEvent('exm-grid-rows-order-updated', {
127
- composed: true,
128
- bubbles: true,
129
- detail: { sourceIndex, targetIndex },
130
- }));
131
- this.dispatchEvent(new CustomEvent('exm-grid-rows-order-changed', {
132
- composed: true,
133
- bubbles: true,
134
- detail: { items },
135
- }));
136
- }, 0);
137
- }
138
- updateColumnVisibility(previousHiddenColumnNames = {}) {
139
- let visibleColumns = 0;
140
- this.getColumns().forEach((column, index) => {
141
- const columnKey = column.getAttribute('data-column-key');
142
- visibleColumns += this.hiddenColumnNames[columnKey || ''] ? 0 : 1;
143
- if (columnKey && previousHiddenColumnNames[columnKey] !== this.hiddenColumnNames[columnKey]) {
144
- const nextDisplayValue = this.hiddenColumnNames[columnKey] ? 'none' : 'table-cell';
145
- column.style.display = nextDisplayValue;
146
- this.getTable()
147
- .querySelectorAll(`tbody.grid-data tr:not(.grid-row-detail) td:nth-child(${index + 1})`)
148
- .forEach((cell) => {
149
- cell.style.display = nextDisplayValue;
150
- });
151
- }
152
- });
153
- this.updateAutoColspan(visibleColumns);
154
- }
155
- updateAutoColspan(visibleColumns) {
156
- this.getTable()
157
- .querySelectorAll('[data-auto-colspan]')
158
- .forEach((element) => {
159
- const offset = Number.parseInt(element.getAttribute('data-auto-span') || '0', 10);
160
- element.setAttribute('colspan', (visibleColumns - offset).toString());
161
- });
162
- }
163
- observeExpandedRowIds(changedProps) {
164
- if (changedProps.has('expandedRowIds')) {
165
- Object.entries(this.expandedRowIds).forEach(([rowId, nextExpandedState]) => {
166
- const expendableToggle = this.getTableBody().querySelector(this.getBodyRowSelector(`[data-row-key="${rowId}"] ${this.expandableToggleSelector}`));
167
- if (expendableToggle) {
168
- const isExpanded = expendableToggle.hasAttribute('data-is-expanded');
169
- if (isExpanded !== nextExpandedState) {
170
- expendableToggle.dispatchEvent(new MouseEvent('click'));
171
- }
172
- }
173
- });
174
- }
175
- }
176
- observeSelectedRowIds(changedProps) {
177
- if (changedProps.has('selectedRowIds')) {
178
- Object.entries(this.selectedRowIds).forEach(([rowId, nextSelectionState]) => {
179
- const row = this.getTableBody().querySelector(this.getBodyRowSelector(`[data-row-key="${rowId}"]`));
180
- if (row) {
181
- const isSelected = row.hasAttribute('data-selected');
182
- if (isSelected !== nextSelectionState) {
183
- row.dispatchEvent(new MouseEvent('click'));
184
- }
185
- }
186
- });
187
- }
188
- }
189
- observeItems(changedProps) {
190
- if (changedProps.has('items') && this.rowSelectableFeature) {
191
- this.rowSelectableFeature.syncSelectedItems();
192
- }
193
- }
194
- async initGridAttributes() {
195
- await this.updateComplete;
196
- const toolbarSlot = this.shadowRoot.querySelector('slot[name="toolbar"]');
197
- if (toolbarSlot && toolbarSlot.assignedNodes && toolbarSlot.assignedNodes().length) {
198
- // make TS happy - this.withToolbar is declared but never read
199
- this.withToolbar = this.withToolbar || true;
200
- }
201
- }
202
- async firstUpdated() {
203
- const table = this.shadowRoot.host.querySelector('table');
204
- const tableBody = table.querySelector('tbody.grid-data');
205
- this.querySelectors = new ExmQuerySelectors(table, tableBody);
206
- this.initGridAttributes();
207
- const bodyRows = this.querySelectors.getBodyRows();
208
- if (this.sortable) {
209
- this.columnSortableFeature = new ExmColumnSortable(this.querySelectors, (event) => this.dispatchEvent(event), this.defaultSortColumn, this.defaultSortDirection);
210
- this.columnSortableFeature.initFeature();
211
- }
212
- if (this.canSortRows()) {
213
- this.rowSortableFeature = new ExmRowSortable(this.querySelectors);
214
- this.rowSortableFeature.initFeature();
215
- }
216
- if (this.rowsSelectable) {
217
- this.rowSelectableFeature = new ExmRowSelectable(this.querySelectors, (event) => this.dispatchEvent(event), this.disableRowClickSelection, this.selectableCheckboxSelector);
218
- this.rowSelectableFeature.initFeature(bodyRows);
219
- }
220
- if (this.expandableToggleSelector) {
221
- this.rowExpandableFeature = new ExmRowExpandable(this.querySelectors, this.expandableToggleSelector);
222
- this.rowExpandableFeature.initFeature();
223
- }
224
- this.updateColumnVisibility();
225
- bodyRows.forEach((row) => row.setAttribute('data-initialized', ''));
226
- this.querySelectors.getColumns('th:not([title])').forEach((col) => col.setAttribute('title', col.innerText));
227
- this.querySelectors.getTable().setAttribute('data-table-layout', this.tableLayout);
228
- await this.updateComplete;
229
- this.componentReady = true;
230
- }
231
- updated(changedProps) {
232
- if (changedProps.has('hiddenColumnNames') || changedProps.has('items')) {
233
- this.updateColumnVisibility(changedProps.get('hiddenColumnNames'));
234
- }
235
- this.observeItems(changedProps);
236
- this.observeExpandedRowIds(changedProps);
237
- this.observeSelectedRowIds(changedProps);
238
- if (this.componentReady && changedProps.has('items')) {
239
- const bodyRows = this.querySelectors.getBodyRowsNotInitialized();
240
- if (this.rowSelectableFeature) {
241
- this.rowSelectableFeature.updateFeature(bodyRows);
242
- }
243
- if (this.rowExpandableFeature) {
244
- this.rowExpandableFeature.updateFeature();
245
- }
246
- if (this.rowSortableFeature) {
247
- this.rowSortableFeature.updateFeature();
248
- }
249
- bodyRows.forEach((row) => row.setAttribute('data-initialized', ''));
250
- }
251
- }
252
- renderWithoutSortable() {
253
- return html ` <slot></slot> `;
254
- }
255
- renderWithSortable() {
256
- return html `
257
- <exm-sortable
258
- orientation="${'vertical'}"
259
- animation-enabled
260
- item-selector="tbody.grid-data &gt; tr:not(.grid-row-detail)"
261
- handle-selector=".grid-row-drag-handler"
262
- .sortableHostNode="${this.findTableBody()}"
263
- @dom-order-change="${this.rowsOrderChange}"
264
- >
265
- <slot></slot>
266
- </exm-sortable>
267
- `;
268
- }
269
- render() {
270
- return html `
271
- <div class="table-card-container">
272
- <slot name="toolbar"></slot>
273
- <div class="table-card">
274
- <div class="table-container">
275
- ${cache(this.canSortRows() ? this.renderWithSortable() : this.renderWithoutSortable())}
276
- </div>
277
- <slot name="pagination"></slot>
278
- </div>
279
- </div>
280
- `;
281
- }
4
+ import { ExmGridBase } from './exm-grid-base.js';
5
+ let ExmGrid = class ExmGrid extends ExmGridBase {
282
6
  };
283
7
  ExmGrid.styles = [exmgGridTableStyles];
284
- __decorate([
285
- property({ type: Array })
286
- ], ExmGrid.prototype, "items", void 0);
287
- __decorate([
288
- property({ type: Boolean, reflect: true })
289
- ], ExmGrid.prototype, "sortable", void 0);
290
- __decorate([
291
- property({ type: String, attribute: 'default-sort-column' })
292
- ], ExmGrid.prototype, "defaultSortColumn", void 0);
293
- __decorate([
294
- property({ type: String, attribute: 'default-sort-direction' })
295
- ], ExmGrid.prototype, "defaultSortDirection", void 0);
296
- __decorate([
297
- property({ type: Boolean, reflect: true, attribute: 'rows-sortable' })
298
- ], ExmGrid.prototype, "rowsSortable", void 0);
299
- __decorate([
300
- property({ type: Boolean, attribute: 'rows-selectable' })
301
- ], ExmGrid.prototype, "rowsSelectable", void 0);
302
- __decorate([
303
- property({ type: Boolean, attribute: 'disable-row-click-selection' })
304
- ], ExmGrid.prototype, "disableRowClickSelection", void 0);
305
- __decorate([
306
- property({ type: String, attribute: 'selectable-checkbox-selector' })
307
- ], ExmGrid.prototype, "selectableCheckboxSelector", void 0);
308
- __decorate([
309
- property({ type: Object })
310
- ], ExmGrid.prototype, "hiddenColumnNames", void 0);
311
- __decorate([
312
- property({ type: Object })
313
- ], ExmGrid.prototype, "selectedRowIds", void 0);
314
- __decorate([
315
- property({ type: Object })
316
- ], ExmGrid.prototype, "expandedRowIds", void 0);
317
- __decorate([
318
- property({ type: String, attribute: 'expandable-toggle-selector', reflect: true })
319
- ], ExmGrid.prototype, "expandableToggleSelector", void 0);
320
- __decorate([
321
- property({ type: String, attribute: 'table-layout', reflect: true })
322
- ], ExmGrid.prototype, "tableLayout", void 0);
323
- __decorate([
324
- state()
325
- ], ExmGrid.prototype, "querySelectors", void 0);
326
- __decorate([
327
- property({ type: Boolean, reflect: true, attribute: 'data-with-toolbar' })
328
- ], ExmGrid.prototype, "withToolbar", void 0);
329
8
  ExmGrid = __decorate([
330
9
  customElement('exm-grid')
331
10
  ], ExmGrid);
@@ -0,0 +1,9 @@
1
+ import { ExmGridBase } from './exm-grid-base.js';
2
+ export declare class ExmOutlinedGrid extends ExmGridBase {
3
+ static styles: import("lit").CSSResult[];
4
+ }
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ 'exm-outlined-grid': ExmOutlinedGrid;
8
+ }
9
+ }
@@ -0,0 +1,12 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from 'lit/decorators.js';
3
+ import { style as exmgGridTableStyles, gridOutlineStyles } from '../styles/exm-grid-styles-css.js';
4
+ import { ExmGridBase } from './exm-grid-base.js';
5
+ let ExmOutlinedGrid = class ExmOutlinedGrid extends ExmGridBase {
6
+ };
7
+ ExmOutlinedGrid.styles = [exmgGridTableStyles, gridOutlineStyles];
8
+ ExmOutlinedGrid = __decorate([
9
+ customElement('exm-outlined-grid')
10
+ ], ExmOutlinedGrid);
11
+ export { ExmOutlinedGrid };
12
+ //# sourceMappingURL=exm-outlined-grid.js.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { EventDetailRowsOrderChanged, EventDetailRowsOrderUpdated, EventDetailSelectedRowsChange, EventDetailSortChange, SORT_DIRECTION, } from './table/types/exm-grid-types.js';
2
2
  export { ExmGrid } from './table/exm-grid.js';
3
+ export { ExmGridBase } from './table/exm-grid-base.js';
4
+ export { ExmOutlinedGrid } from './table/exm-outlined-grid.js';
3
5
  export { ExmGridPagination } from './table/exm-grid-pagination.js';
4
6
  export { ExmGridBaseToolbar } from './table/exm-grid-base-toolbar.js';
5
7
  export { ExmGridSmartToolbar } from './table/exm-grid-smart-toolbar.js';
@@ -8,7 +10,7 @@ export { ExmGridToolbar } from './table/exm-grid-toolbar.js';
8
10
  export { EventDetailGridToolbarSettingChanged, Action, Filter, FilterConfigType, FilterSingleSelectConfig, BaseFilterConfig, BaseSettingConfig, Setting, SettingConfigId, SettingConfigType, SettingSelectionListConfig, SettingSelectionListItem, } from './table/types/exm-grid-toolbar-types.js';
9
11
  export { ToolbarSearch } from './search/exm-toolbar-search.js';
10
12
  export { ExmGridToolbarFilters, EventSelectPayload } from './table/exm-grid-toolbar-filters.js';
11
- export { style as gridStyles } from './styles/exm-grid-styles-css.js';
13
+ export { style as gridStyles, gridOutlineStyles } from './styles/exm-grid-styles-css.js';
12
14
  export { style as gridBaseToolbarStyles } from './styles/exm-grid-base-toolbar-styles-css.js';
13
15
  export { style as gridCommonStyles } from './styles/exm-grid-common-styles-css.js';
14
16
  export { style as gridPaginationStyles } from './styles/exm-grid-pagination-styles-css.js';
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { ExmGrid } from './table/exm-grid.js';
2
+ export { ExmGridBase } from './table/exm-grid-base.js';
3
+ export { ExmOutlinedGrid } from './table/exm-outlined-grid.js';
2
4
  export { ExmGridPagination } from './table/exm-grid-pagination.js';
3
5
  export { ExmGridBaseToolbar } from './table/exm-grid-base-toolbar.js';
4
6
  export { ExmGridSmartToolbar } from './table/exm-grid-smart-toolbar.js';
@@ -7,7 +9,7 @@ export { ExmGridToolbar } from './table/exm-grid-toolbar.js';
7
9
  export { FilterConfigType, SettingConfigId, SettingConfigType } from './table/types/exm-grid-toolbar-types.js';
8
10
  export { ToolbarSearch } from './search/exm-toolbar-search.js';
9
11
  export { ExmGridToolbarFilters } from './table/exm-grid-toolbar-filters.js';
10
- export { style as gridStyles } from './styles/exm-grid-styles-css.js';
12
+ export { gridOutlineStyles, style as gridStyles } from './styles/exm-grid-styles-css.js';
11
13
  export { style as gridBaseToolbarStyles } from './styles/exm-grid-base-toolbar-styles-css.js';
12
14
  export { style as gridCommonStyles } from './styles/exm-grid-common-styles-css.js';
13
15
  export { style as gridPaginationStyles } from './styles/exm-grid-pagination-styles-css.js';
@@ -1 +1,2 @@
1
+ export declare const gridOutlineStyles: import("lit").CSSResult;
1
2
  export declare const style: import("lit").CSSResult;
@@ -1,5 +1,18 @@
1
1
  import { css } from 'lit';
2
2
 
3
+ const gridOutlineStyles = css `
4
+ :host {
5
+ --exm-theme-table-surface: var(--md-sys-color-background);
6
+ --exm-theme-table-toolbar-background-color: var(--md-sys-color-background);
7
+ --exm-table-th-background-color: var(--md-sys-color-background);
8
+ border: 1px solid var(--md-sys-color-outline-variant);
9
+ border-radius: 1rem;
10
+
11
+ tr:nth-child(odd) {
12
+ background-color: #cbc9d429;
13
+ }
14
+ }
15
+ `;
3
16
  const style = css `
4
17
  :host {
5
18
  -moz-osx-font-smoothing: grayscale;
@@ -413,5 +426,5 @@ const style = css `
413
426
  }
414
427
  `;
415
428
 
416
- export { style };
429
+ export { gridOutlineStyles, style };
417
430
  //# sourceMappingURL=exm-grid-styles-css.js.map
@@ -0,0 +1,124 @@
1
+ import { ExmgElement } from '@exmg/lit-base/index.js';
2
+ import '@exmg/exm-sortable/exm-sortable.js';
3
+ import { SORT_DIRECTION } from './types/exm-grid-types.js';
4
+ type GenericPropertyValues<T, V = unknown> = Map<T, V>;
5
+ type Props = Exclude<keyof ExmGridBase, number | symbol>;
6
+ type SmartPropertyValue = GenericPropertyValues<Props>;
7
+ /**
8
+ * ### Styling
9
+ * The following custom properties and mixins are available for styling:
10
+ *
11
+ * Custom property | Description | Default
12
+ * ----------------|-------------|----------
13
+ * `--exm-arrow-upward-url` | Url to icon that is used for soring direction indicator | `url('/assets/arrow-upward.svg');`
14
+ * `--exm-table-card-width` | table card width | `100%;`
15
+ * `--exm-table-card-margin-bottom` | table bottom margin | `5px;`
16
+ * `--exm-table-color` | table text color | `#02182b;`
17
+ * `--exm-table-background-color` | table background color | `#ffffff;`
18
+ * `--exm-table-box-shadow` | table box shadow | `#{0px 1px 5px 0px rgba($onSurface, .2), 0px 2px 2px 0px rgba($onSurface, .14), 0px 3px 1px -2px rgba($onSurface, .12)},`
19
+ * `--exm-table-row-divider-color` | table rows separator color | `#dbdbdb;`
20
+ * `--exm-table-row-selected-color` | selected row text color | `#02182b;`
21
+ * `--exm-table-row-selected-background-color` | selected row background color | `#e2f1fe;`
22
+ * `--exm-table-row-hover-color` | row hover text color | `#02182b;`
23
+ * `--exm-table-row-hover-background-color` | row hover background color | `#f1f1f1;`
24
+ * `--exm-table-row-dragged-background-color` | sortable row background color when dragged | `#f1f1f1;`
25
+ * `--exm-table-rows-expanded-divider-border` | border between row and expanded row detail | `none;`
26
+ * `--exm-table-rows-expanded-border` | border around row and expanded row detail | `1px solid #dbdbdb;`
27
+ * `--exm-table-rows-expanded-background-color` | background color of row and expanded row detail | `#e2f1fe;`
28
+ * `--exm-table-rows-expanded-color` | text color of row and expanded row detail | `#02182b;`
29
+ * `--exm-table-th-color` | header text color | `#0071dc;`
30
+ * `--exm-table-columns-background-color` | header background color | `#ffffff;`
31
+ * `--exm-table-th-sortable-hover-color` | sortable header hover text color | `#02182b;`
32
+ * `--exm-table-th-height` | header height | `48px;`
33
+ * `--exm-table-th-sort-margin-left` | header margin after text but before icon | `0px;`
34
+ * `--exm-table-td-height` | row cell height | `48px;`
35
+ * `--exm-table-th-sort-icon-height` | sort icon height | `1em;`
36
+ * `--exm-table-th-sort-icon-width` | sort icon width | `1em;`
37
+ * `--exm-table-col-number-padding-right` | right padding of number column | `10px;`
38
+ * `--exm-table-checkbox-cell-width` | width of cell with checkbox | `24px;`
39
+ */
40
+ export declare class ExmGridBase extends ExmgElement {
41
+ /**
42
+ * Array of data which mapped to rows
43
+ */
44
+ items: unknown[];
45
+ /**
46
+ * Feature that turn on sort by column
47
+ */
48
+ sortable: boolean;
49
+ /**
50
+ * Name of sort column which should be sorted by default
51
+ */
52
+ defaultSortColumn?: string;
53
+ /**
54
+ * Default sort direction
55
+ */
56
+ defaultSortDirection?: SORT_DIRECTION;
57
+ /**
58
+ * Feature that allow sort rows
59
+ * If table has turn on feature `selectable` then it takes precedence and `rowSelectable` will be ignored
60
+ */
61
+ rowsSortable: boolean;
62
+ /**
63
+ * Feature that allow select rows
64
+ */
65
+ rowsSelectable: boolean;
66
+ /**
67
+ * By default a ros is also selactable by clicking anywhere inside the row when the rowSElectable option is enabled
68
+ */
69
+ disableRowClickSelection: boolean;
70
+ /**
71
+ * If rows are selectable you can also pass selector to checkboxes.
72
+ * We can have checkboxes in thead or / and tbody.
73
+ */
74
+ selectableCheckboxSelector?: string;
75
+ /**
76
+ * Map of column names that should be hidden
77
+ */
78
+ hiddenColumnNames: Record<string, string>;
79
+ /**
80
+ * Map of row id and selection state
81
+ * Useful for setup default selection or manipulating programmatically
82
+ */
83
+ selectedRowIds: Record<string, boolean>;
84
+ /**
85
+ * Map of row id and expandable row state
86
+ * Useful for setup default expanded rows or manipulating programmatically
87
+ */
88
+ expandedRowIds: Record<string, boolean>;
89
+ /**
90
+ * Selector to element inside row which will trigger expand / collapse action on related row detail
91
+ */
92
+ expandableToggleSelector?: string;
93
+ /**
94
+ * Set table layout. If fixed then text overflow will be hidden and ellipsis added.
95
+ */
96
+ tableLayout: 'fixed' | 'auto';
97
+ private querySelectors?;
98
+ withToolbar: boolean;
99
+ private rowSelectableFeature?;
100
+ private rowExpandableFeature?;
101
+ private rowSortableFeature?;
102
+ private columnSortableFeature?;
103
+ private componentReady;
104
+ private getQuerySelectors;
105
+ private getTable;
106
+ private getTableBody;
107
+ private findTableBody;
108
+ private getColumns;
109
+ private getBodyRowSelector;
110
+ private canSortRows;
111
+ private rowsOrderChange;
112
+ private updateColumnVisibility;
113
+ private updateAutoColspan;
114
+ private observeExpandedRowIds;
115
+ private observeSelectedRowIds;
116
+ private observeItems;
117
+ private initGridAttributes;
118
+ protected firstUpdated(): Promise<void>;
119
+ protected updated(changedProps: SmartPropertyValue): void;
120
+ private renderWithoutSortable;
121
+ private renderWithSortable;
122
+ protected render(): import("lit-html").TemplateResult<1>;
123
+ }
124
+ export {};