@iyulab/flex-table 0.60.0 → 0.61.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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.61.0] - 2026-10-07
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`sortCriteria` is settable.** It was a getter only, so the sort a data source holds — the initial sort, or one
|
|
8
|
+
restored from a saved view — could not be shown on a server-paged table (`u-rich-table` takes it as a property).
|
|
9
|
+
Setting it shows that sort on the headers and re-sorts in client mode; it does not fire `sort-change`, which stays
|
|
10
|
+
the user's act. A binding that writes a source's state to the table (`bindSource` of `@iyulab/enterprise`) needs it.
|
|
11
|
+
|
|
3
12
|
## [0.60.0] - 2026-10-07
|
|
4
13
|
|
|
5
14
|
### Added
|
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ guarantee about a *constrained* host. `height-model.browser.test.ts` pins both s
|
|
|
127
127
|
| `canRedo` | `boolean` | Whether redo is available |
|
|
128
128
|
| `activeCell` | `CellPosition \| null` | Currently focused cell `{ row, col }` |
|
|
129
129
|
| `editingCell` | `CellPosition \| null` | Currently editing cell `{ row, col }` |
|
|
130
|
-
| `sortCriteria` | `SortCriteria[]` | Active sort criteria `[{ key, direction }]` |
|
|
130
|
+
| `sortCriteria` | `SortCriteria[]` | Active sort criteria `[{ key, direction }]`. Also settable: shows that sort on the headers and re-sorts in client mode, without firing `sort-change` — give it a data source's `sortCriteria` (the initial or restored sort of a server-paged list) |
|
|
131
131
|
| `filterKeys` | `string[]` | Column keys with active filters |
|
|
132
132
|
|
|
133
133
|
## Column Definition
|
|
@@ -1841,6 +1841,9 @@ var K = {
|
|
|
1841
1841
|
get sortCriteria() {
|
|
1842
1842
|
return [...this._sortCriteria];
|
|
1843
1843
|
}
|
|
1844
|
+
set sortCriteria(e) {
|
|
1845
|
+
this._sortCriteria = [...e ?? []], this.dataMode !== "server" && this._recomputeView(), this.requestUpdate();
|
|
1846
|
+
}
|
|
1844
1847
|
get filteredRowCount() {
|
|
1845
1848
|
return this._filteredIndices.length;
|
|
1846
1849
|
}
|
package/dist/flex-table.d.ts
CHANGED
|
@@ -199,7 +199,14 @@ export declare class FlexTable extends LitElement {
|
|
|
199
199
|
get canRedo(): boolean;
|
|
200
200
|
get activeCell(): CellPosition | null;
|
|
201
201
|
get editingCell(): CellPosition | null;
|
|
202
|
+
/**
|
|
203
|
+
* The active sort — `[{ key, direction }]`, the first is the primary. Setting it shows that sort (the header
|
|
204
|
+
* indicators) and, in client mode, re-sorts; it does not fire `sort-change`, which is the user's act. A data
|
|
205
|
+
* source's `sortCriteria` goes here as is — the initial or restored sort of a server-paged list, the same as
|
|
206
|
+
* `u-rich-table`'s `sortCriteria`.
|
|
207
|
+
*/
|
|
202
208
|
get sortCriteria(): SortCriteria[];
|
|
209
|
+
set sortCriteria(criteria: SortCriteria[]);
|
|
203
210
|
/** Number of rows after filtering (before pagination). */
|
|
204
211
|
get filteredRowCount(): number;
|
|
205
212
|
/**
|
package/dist/flex-table.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./flex-table-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./flex-table-BD_T3SqO.js";
|
|
2
2
|
import { t as c } from "./locale-D9g0ksXq.js";
|
|
3
3
|
export { s as FlexTable, o as RowSelectionState, i as UndoStack, a as downloadBlob, r as effectiveAlign, n as exportData, e as exportDataBlob, c as flexTableLocale, t as renderCell };
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./flex-table-
|
|
1
|
+
import { t as e } from "./flex-table-BD_T3SqO.js";
|
|
2
2
|
import { n as t, r as n, u as r } from "./fetch-all-J37bOtgc.js";
|
|
3
3
|
import { t as i } from "./source-DNPtWmC3.js";
|
|
4
4
|
import { n as a, t as o } from "./view-BtoXdUGF.js";
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@ Replacing `data` with the same array reference does not trigger the clear-on-cha
|
|
|
40
40
|
| `visibleColumns` | `ColumnDefinition[]` (non-hidden) |
|
|
41
41
|
| `filteredRowCount` | `number` |
|
|
42
42
|
| `filterKeys` | `string[]` |
|
|
43
|
-
| `sortCriteria` | `SortCriteria[]` — `{ key, direction: 'asc' \| 'desc' }` |
|
|
43
|
+
| `sortCriteria` | `SortCriteria[]` — `{ key, direction: 'asc' \| 'desc' }`. Settable too (no `sort-change`): a source's sort goes in as is |
|
|
44
44
|
| `activeCell` / `editingCell` | `CellPosition \| null` — `{ row, col }` |
|
|
45
45
|
| `canUndo` / `canRedo` | `boolean` |
|
|
46
46
|
|