@ithouse-bd/ngx-table 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +132 -0
- package/DOCUMENTATION.md +877 -0
- package/LICENSE +21 -0
- package/README.md +370 -2
- package/THEMING.md +272 -0
- package/docs/images/table-dark.svg +136 -0
- package/docs/images/table-overview.svg +140 -0
- package/docs/images/table-selection.svg +164 -0
- package/fesm2022/ithouse-bd-ngx-table.mjs +1988 -0
- package/fesm2022/ithouse-bd-ngx-table.mjs.map +1 -0
- package/index.d.ts +783 -0
- package/index.d.ts.map +1 -0
- package/package.json +51 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@ithouse-bd/ngx-table` are documented here.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [1.1.0] — 2026-11-26
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Column header menu** (`showColumnMenu`, default on): sort ascending/descending, clear
|
|
12
|
+
sort, pin to left/right, unpin, fit to content and hide column, per column.
|
|
13
|
+
- **`resizable`** — drag a header edge to resize (minimum 56 px); `autosizeColumn(key)` fits a
|
|
14
|
+
column to its content.
|
|
15
|
+
- **`reorderable`** — drag headers to reorder columns; hidden columns keep their slot.
|
|
16
|
+
- **Named views** (`showViews`) — save, apply and delete named layouts next to the automatic
|
|
17
|
+
preset.
|
|
18
|
+
- **`columnStateChange`** — emits `TablePresetState` (`{ hidden, density, order, widths,
|
|
19
|
+
pinned }`) whenever the layout changes.
|
|
20
|
+
- **Filter chips** (`showFilterChips`) — removable chips for the search term and every column
|
|
21
|
+
filter, plus "Clear all".
|
|
22
|
+
- **Selection bar** (`selectionActions`, `selectionAction`) — bulk actions once rows are
|
|
23
|
+
selected.
|
|
24
|
+
- **Row detail** (`#ithTableRowDetail`, `rowDetailTrigger: 'button' | 'row' | 'none'`) —
|
|
25
|
+
full-width expandable panel under a row.
|
|
26
|
+
- **CSV and Excel export** — the Export button opens a two-item menu. `.xlsx` is a real
|
|
27
|
+
workbook (bold frozen header row, autofilter, sized columns) produced by a new dependency-free
|
|
28
|
+
ZIP + OOXML writer (`buildXlsxBlob()`, exported publicly); `.csv` keeps the UTF-8 BOM. API:
|
|
29
|
+
`toCsv()`, `toExcel()`, `downloadCsv()`, `downloadExcel()`, `exportAs(format)`, outputs
|
|
30
|
+
`csvExport` and the new `exportFile` (`{ format, fileName, blob, rows }`).
|
|
31
|
+
- **Footer totals** — `TableColumn.aggregate` with `sum`, `avg`, `min`, `max`, `count`, plus
|
|
32
|
+
`label` and `format` overrides, rendered in a `<tfoot>` row.
|
|
33
|
+
- **Keyboard grid** (`keyboardNavigation`, default on) — single tab stop, arrow/Home/End/
|
|
34
|
+
PageUp/PageDown movement, `Space` selection, `Ctrl/Cmd+C` copy.
|
|
35
|
+
- **Sticky header depth** — the header casts a shadow once the body is scrolled.
|
|
36
|
+
- **Dark mode polish** — new semantic tokens (`--_on-accent`, `--_toolbar-tint`,
|
|
37
|
+
`--_popover-bg`, `--_elevation`, `--_scroll-thumb`, `--_danger`): readable text on accent
|
|
38
|
+
fills, calmer brand-tinted header, raised popovers/menus with a hairline ring, lighter row
|
|
39
|
+
separators, visible soft scrollbars and a lighter danger red. Light mode is unchanged apart
|
|
40
|
+
from the shared tokens.
|
|
41
|
+
- New models: `TablePresetState`, `TableSelectionAction`, `TableSelectionActionEvent`,
|
|
42
|
+
`TableAggregate`, `TableAggregateType`, `TablePin`, `TableRowDetailContext` and the
|
|
43
|
+
`TableRowDetailDirective`.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- **Column preset did not restore.** The preset (and its toolbar popover) was read in the
|
|
48
|
+
constructor, before `storageKey` was bound, and the empty state then overwrote the stored
|
|
49
|
+
value. The preset is now restored once, after inputs are bound, and only persisted
|
|
50
|
+
afterwards. Stored layouts are versioned (`v: 2`) and old 1.0.0 values are still read.
|
|
51
|
+
- **The Columns popover was unusable.** It was clipped by the toolbar's `overflow: auto`
|
|
52
|
+
scroll box, so it could be opened but not seen or clicked. Popovers (columns, views, header
|
|
53
|
+
menu) are now `position: fixed` and anchored to their trigger inside the viewport.
|
|
54
|
+
- **A single row collapsed the table.** New `minRows` input (default `4`) keeps the body at a
|
|
55
|
+
stable height with empty space below the last row; rows never stretch.
|
|
56
|
+
- **Pinned columns only pinned the header.** A later `.ith-table-td { position: relative }`
|
|
57
|
+
rule (used by the copy button) overrode `position: sticky` on body cells, so the header
|
|
58
|
+
stuck while the cells scrolled away. Body, filter and totals cells now stay pinned with the
|
|
59
|
+
header (verified at full horizontal scroll).
|
|
60
|
+
- **Compact density did nothing visible.** The `dense`/`compact` modifiers set the public
|
|
61
|
+
`--ith-table-cell-padding` on `.ith-table`, but `--_cell-padding` had already been resolved
|
|
62
|
+
on `:host`, so rows never changed. The modifiers now re-declare the private tokens:
|
|
63
|
+
comfortable rows are 51 px, compact 41 px (header 46 → 40 px).
|
|
64
|
+
- The density control is a two-state segmented switch (Comfortable / Compact) instead of a
|
|
65
|
+
single toggle, and `setDensity(density)` sets it explicitly.
|
|
66
|
+
- Compact density now tokenises row/header heights (`--ith-table-row-height`,
|
|
67
|
+
`--ith-table-head-height`) so sticky offsets and the minimum height stay correct.
|
|
68
|
+
|
|
69
|
+
## [1.0.0] — 2026-11-24
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- `<ith-table>` standalone component with signal inputs, `model()` inputs and outputs.
|
|
74
|
+
- `TableColumn<T>` configuration: dot-path fields, alignment, widths, formatters, custom
|
|
75
|
+
comparators, custom search/filter values, hidden columns, header/cell classes.
|
|
76
|
+
- Client-side mode with global search, per-column filters, sorting and pagination.
|
|
77
|
+
- Customizable filters on every column: `filterType` (`text`, `number`, `date`, `select`),
|
|
78
|
+
`filterOptions`, `filterPlaceholder`, `filterPredicate`, `filterAllLabel` and a custom
|
|
79
|
+
control template (`ithTableFilter="key"`).
|
|
80
|
+
- Server-side mode (`mode="server"`) with `total`, `loading`, `sortChange`, `searchChange`,
|
|
81
|
+
`filterChange`, `pageChange` and `pageSizeChange` outputs.
|
|
82
|
+
- Sorting: `asc → desc → unsorted` cycling, `aria-sort`, custom `sortFn`, table-wide and
|
|
83
|
+
per-column opt-out.
|
|
84
|
+
- Selection: `none` / `single` / `multi`, page or all-filtered select-all, indeterminate
|
|
85
|
+
header checkbox, selection preserved across pages by `keyField`.
|
|
86
|
+
- Row actions: declarative buttons (icon, class, disabled/hidden rules) and the
|
|
87
|
+
`ithTableRowActions` template.
|
|
88
|
+
- Custom templates: `ithTableCell`, `ithTableHeader`, `ithTableFilter`,
|
|
89
|
+
`ithTableRowActions`, `ithTableToolbar`, `ithTableFooter`, `ithTableEmpty`,
|
|
90
|
+
`ithTableRowMenu`.
|
|
91
|
+
- Copy to clipboard: `copyable`, a per-cell hover button, Ctrl/Cmd+C on a focused cell and
|
|
92
|
+
the `cellCopy` output.
|
|
93
|
+
- Right-click context menu: `rowContextMenu` output plus the projected `ithTableRowMenu`
|
|
94
|
+
template, rendered in a floating panel at the pointer (closes on outside click/Escape).
|
|
95
|
+
- Column visibility picker (`showColumnPicker`) with `columnsChange`, persisted together with
|
|
96
|
+
the comfortable/compact density (`showDensityToggle`) through `storageKey`.
|
|
97
|
+
- Sticky columns: `sticky: 'start' | 'end'` per column, plus `stickySelection` and
|
|
98
|
+
`stickyActions` for the checkbox/actions columns.
|
|
99
|
+
- Native cell tooltips (`TableColumn.tooltip`, default on) and skeleton rows while loading.
|
|
100
|
+
- Standalone-only: the `NgxTableModule` wrapper was removed; import the component and the
|
|
101
|
+
template directives directly.
|
|
102
|
+
- Brand theming: a single `--ith-table-brand` token now drives the header, hover, selected
|
|
103
|
+
rows, filters, footer, focus ring and toolbar accents via `color-mix()`, in light and dark
|
|
104
|
+
mode.
|
|
105
|
+
- Pagination footer: range summary, total label, centred page window, first/previous/next/last
|
|
106
|
+
buttons, rows-per-page selector.
|
|
107
|
+
- Presentation: `striped`, `bordered`, `dense`, `hoverable`, `stickyHeader`, `maxHeight`,
|
|
108
|
+
loading overlay and empty state.
|
|
109
|
+
- Theming with CSS variables for light, dark (`[data-theme="dark"]` / `.dark`) and system
|
|
110
|
+
(`[data-theme="auto"]`) modes.
|
|
111
|
+
- Accessibility: `aria-sort`, `aria-current`, labelled checkboxes and pagination, `aria-busy`,
|
|
112
|
+
`aria-selected` rows, and `Enter`/`Space` activation for clickable rows.
|
|
113
|
+
- Published package now ships `DOCUMENTATION.md`, `THEMING.md`, `CHANGELOG.md` and the SVG
|
|
114
|
+
previews next to the README.
|
|
115
|
+
- `NgxTableModule` wrapper for NgModule-based applications.
|
|
116
|
+
- Documentation (README, DOCUMENTATION, THEMING), SVG previews, MIT license.
|
|
117
|
+
|
|
118
|
+
### Fixed
|
|
119
|
+
|
|
120
|
+
- Server mode no longer resets `page` when `search`, `filters`, `sort` or `pageSize` change,
|
|
121
|
+
so one query change produces one request instead of two.
|
|
122
|
+
- `filterType: 'date'` compares the calendar date, so ISO strings are not shifted by the
|
|
123
|
+
browser time zone.
|
|
124
|
+
- `filterType: 'number'` compares numerically, so `12`, `12.0` and `012` all match `12`.
|
|
125
|
+
- Empty-state `colspan` falls back to `1` when the table has no visible columns.
|
|
126
|
+
- The host element is `display: block` by default, so the table no longer depends on the
|
|
127
|
+
page's CSS to lay out correctly.
|
|
128
|
+
|
|
129
|
+
### Requirements
|
|
130
|
+
|
|
131
|
+
- Angular **20 or newer** (`@angular/common`, `@angular/core` peer dependencies).
|
|
132
|
+
- No runtime dependencies except `tslib`.
|