@lavalogic/scoria 0.37.3 → 0.37.4

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.
@@ -31,5 +31,5 @@ export interface ColumnFactory<TRow extends object> {
31
31
  rowSelection(options?: RowSelectionColumnOptions<TRow>): ColumnSpec<TRow, 'rowSelection'>;
32
32
  actions(options: ActionsColumnOptions<TRow>): ColumnSpec<TRow, 'actions'>;
33
33
  expand<TInner extends object, TInnerId extends Primitive = string>(options: ExpandColumnOptions<TRow, TInner, TInnerId>): ColumnSpec<TRow, 'expand'>;
34
- filterOnly<K extends keyof TRow & string, TValue = TRow[K]>(options: FilterOnlyColumnOptions<TRow, K, TValue>): ColumnSpec<TRow, 'filterOnly'>;
34
+ filterOnly<K extends string = string, TValue = K extends keyof TRow & string ? TRow[K] : unknown>(options: FilterOnlyColumnOptions<TRow, K, TValue>): ColumnSpec<TRow, 'filterOnly'>;
35
35
  }
@@ -302,10 +302,19 @@ export interface ExpandColumnOptions<TRow extends object, TInner extends object,
302
302
  */
303
303
  inner?: ExpandInnerTableOptions;
304
304
  }
305
- /** Options for `col.filterOnly({ id, header, ... })`. Renders in the filter
306
- * panel only; does not produce a body cell. Useful for surfacing a
307
- * filterable field that should not occupy a column. */
308
- export interface FilterOnlyColumnOptions<TRow extends object, K extends keyof TRow & string, TValue = TRow[K]> extends Omit<BaseColumnOptions, 'allowSorting' | 'resizable' | 'minWidth' | 'width'> {
305
+ /**
306
+ * Options for `col.filterOnly({ id, header, ... })`. Renders in the filter
307
+ * panel only; does not produce a body cell. Useful for surfacing a
308
+ * filterable field that should not occupy a column.
309
+ *
310
+ * `K` defaults to `string` so consumers can pass nested-path / server-only
311
+ * filter ids (e.g. `'orderLines.products.productTags.value'`) that are not
312
+ * direct keys of `TRow`. When `K` does narrow to a `keyof TRow & string`,
313
+ * `TValue` infers the corresponding row value type for the `customFilter`
314
+ * predicate; otherwise `TValue` defaults to `unknown`, which is the right
315
+ * shape for remote-only filters where the server resolves the field.
316
+ */
317
+ export interface FilterOnlyColumnOptions<TRow extends object, K extends string = string, TValue = K extends keyof TRow & string ? TRow[K] : unknown> extends Omit<BaseColumnOptions, 'allowSorting' | 'resizable' | 'minWidth' | 'width'> {
309
318
  id: K;
310
319
  /** Filter value kind; drives which filter input is rendered. */
311
320
  filterValueType: FilterValueType;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.37.3",
4
+ "version": "0.37.4",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },