@lavalogic/scoria 0.40.15 → 0.40.16

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.
@@ -484,6 +484,7 @@ export function createColumnFactory() {
484
484
  actions: wrapped,
485
485
  isEnabled: isEnabledFn ? (item) => isEnabledFn(item) : undefined,
486
486
  id: mintId('actions'),
487
+ header: opts.header,
487
488
  });
488
489
  // Actions has no public width option — apply the per-kind default.
489
490
  def.width = KIND_DEFAULT_WIDTHS.actions;
@@ -2,10 +2,10 @@ import type { ColourSet } from '../../../../../../scss/colours.js';
2
2
  import type { TableActionButton } from '../../TableActionButton.js';
3
3
  import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
4
4
  /**
5
- * Construction-time props for `ActionsDef`. Omits `header` (pinned to
6
- * `'Actions'`) and makes `id` optional: the typed column factory passes
7
- * a deterministic `actions-<n>` id, and a `generateUUID`-suffixed id is
8
- * minted only when none is supplied.
5
+ * Construction-time props for `ActionsDef`. `header` is optional and
6
+ * defaults to `'Actions'`; `id` is optional too: the typed column factory
7
+ * passes a deterministic `actions-<n>` id, and a `generateUUID`-suffixed id
8
+ * is minted only when none is supplied.
9
9
  *
10
10
  * Notes:
11
11
  * - `isEnabled` defaults to `true` for every button if omitted.
@@ -14,6 +14,8 @@ import { ColumnDef, type ColumnDefProps } from '../ColumnDef.svelte.js';
14
14
  * single `ActionsDef` can drive a row of differently-styled actions.
15
15
  */
16
16
  export interface ActionsDefProps<T extends object, in FilterValueType> extends Omit<ColumnDefProps<T, FilterValueType>, 'id' | 'header'> {
17
+ /** Optional column header; defaults to `'Actions'`. */
18
+ header?: ColumnDefProps<T, FilterValueType>['header'];
17
19
  /** The buttons rendered for every row. */
18
20
  actions: Array<TableActionButton<T>>;
19
21
  /** Per-row, per-button enable predicate; assumed `true` if missing. */
@@ -30,8 +32,8 @@ export interface ActionsDefProps<T extends object, in FilterValueType> extends O
30
32
  }
31
33
  /**
32
34
  * `ActionsDef<T, FilterValueType>` is a column whose cells render a
33
- * row of buttons. It is non-sortable, non-filterable, and pins its
34
- * header to `'Actions'`.
35
+ * row of buttons. It is non-sortable, non-filterable, and defaults its
36
+ * header to `'Actions'` (override via `props.header`).
35
37
  *
36
38
  * Note: when constructed without an explicit `id` the fallback id uses
37
39
  * `generateUUID()`, which is NOT stable across table rebuilds; consumers
@@ -3,8 +3,8 @@ import { ColumnType } from '../../ColumnType.js';
3
3
  import { ColumnDef } from '../ColumnDef.svelte.js';
4
4
  /**
5
5
  * `ActionsDef<T, FilterValueType>` is a column whose cells render a
6
- * row of buttons. It is non-sortable, non-filterable, and pins its
7
- * header to `'Actions'`.
6
+ * row of buttons. It is non-sortable, non-filterable, and defaults its
7
+ * header to `'Actions'` (override via `props.header`).
8
8
  *
9
9
  * Note: when constructed without an explicit `id` the fallback id uses
10
10
  * `generateUUID()`, which is NOT stable across table rebuilds; consumers
@@ -15,7 +15,7 @@ export class ActionsDef extends ColumnDef {
15
15
  constructor(props) {
16
16
  super({
17
17
  id: props.id ?? syntheticColumnId(`actions-${generateUUID()}`),
18
- header: 'Actions',
18
+ header: props.header ?? 'Actions',
19
19
  allowSorting: false,
20
20
  allowFiltering: false,
21
21
  });
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.40.15",
4
+ "version": "0.40.16",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },