@lavalogic/scoria 0.0.26 → 0.0.27

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.
@@ -10,7 +10,7 @@
10
10
  import { Validity } from '../../../../../Types/Internal/Validity.js';
11
11
 
12
12
  export interface ActionsCellProps<T extends object> {
13
- cell: TableCell<T>;
13
+ cell: ActionsTableCell<T>;
14
14
  }
15
15
 
16
16
  export let shownPopup = refWrapper<symbol | undefined>(undefined);
@@ -18,7 +18,7 @@
18
18
 
19
19
  <script lang="ts" generics="T extends object">
20
20
  import { getContext, tick, untrack } from 'svelte';
21
- import TableAction from './TableAction.svelte';
21
+ import TableAction, { type ActionsTableCell } from './TableAction.svelte';
22
22
  import type { ActionsDef } from '../../../Types/Columns/Definitions/Actions/ActionsDef.svelte.js';
23
23
  import type { TableActionButton } from '../../../Types/Columns/TableActionButton.js';
24
24
  import type { TableCell } from '../../../Types/Columns/TableCell.js';
@@ -1,8 +1,8 @@
1
1
  export interface ActionsCellProps<T extends object> {
2
- cell: TableCell<T>;
2
+ cell: ActionsTableCell<T>;
3
3
  }
4
4
  export declare let shownPopup: import("../../../../../index.js").RefWrapper<symbol | undefined>;
5
- import type { TableCell } from '../../../Types/Columns/TableCell.js';
5
+ import { type ActionsTableCell } from './TableAction.svelte';
6
6
  declare function $$render<T extends object>(): {
7
7
  props: ActionsCellProps<T>;
8
8
  exports: {};
@@ -28,7 +28,11 @@
28
28
  const disabled = action.isDisabled?.(cell.row.original, cell.row.index);
29
29
 
30
30
  if (disabled != null) {
31
- return !disabled;
31
+ if (typeof disabled == 'boolean') {
32
+ return !disabled;
33
+ } else {
34
+ return disabled.then((it) => !it);
35
+ }
32
36
  }
33
37
  return (
34
38
  (cell.column.columnDef as ActionsDef<T>).isEnabled?.(
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.0.26",
4
+ "version": "0.0.27",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },