fuma 0.3.25 → 0.3.26

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.
@@ -77,7 +77,6 @@ function lookupValueFromParams() {
77
77
  const actionPadding = getActionPadding();
78
78
  function getActionPadding() {
79
79
  const container = contextContainer.get();
80
- console.log({ container });
81
80
  if (container === "card")
82
81
  return "-mx-2 sm:-mx-8 px-2 sm:px-8";
83
82
  if (container === "drawer")
@@ -18,7 +18,7 @@ $:
18
18
  <TableCellBoolean {value} />
19
19
  {:else if typeof value === 'string'}
20
20
  <TableCellString {value} {field} />
21
- {:else if value === undefined}
21
+ {:else if value === undefined || value === null}
22
22
  <td>-</td>
23
23
  {:else}
24
24
  <td>
@@ -14,21 +14,21 @@ type TableFieldCommon = {
14
14
  $visible?: boolean;
15
15
  };
16
16
  type TableFieldUntyped<Item = any> = {
17
- getCell: (item: Item) => ComponentAndProps | Primitive[] | Primitive | undefined;
17
+ getCell: (item: Item) => ComponentAndProps | Primitive[] | Primitive | undefined | null;
18
18
  head?: ComponentAndProps | ((field: TableField) => ComponentAndProps);
19
19
  };
20
20
  type TableFieldPrimitive<Item = any> = {
21
21
  type: Exclude<TableFieldType, 'select' | 'multiselect'>;
22
- getCell: (item: Item) => ComponentAndProps | Primitive | undefined;
22
+ getCell: (item: Item) => ComponentAndProps | Primitive | undefined | null;
23
23
  };
24
24
  type TableFieldSelect<Item = any> = {
25
25
  type: 'select';
26
- getCell: (item: Item) => Primitive;
26
+ getCell: (item: Item) => Primitive | undefined | null;
27
27
  options: Options;
28
28
  };
29
29
  type TableFieldMultiselect<Item = any> = {
30
30
  type: 'multiselect';
31
- getCell: (item: Item) => Primitive[];
31
+ getCell: (item: Item) => Primitive[] | undefined | null;
32
32
  options: Options;
33
33
  };
34
34
  /**
@@ -43,7 +43,7 @@ export declare function syncFieldsWithParams(tablekey: string, fields: TableFiel
43
43
  hint?: string | undefined;
44
44
  locked?: boolean | undefined;
45
45
  visible?: boolean | undefined;
46
- getCell: (item: any) => Primitive | ComponentAndProps | Primitive[] | undefined;
46
+ getCell: (item: any) => Primitive | ComponentAndProps | Primitive[] | null | undefined;
47
47
  head?: ComponentAndProps | ((field: TableField<any>) => ComponentAndProps) | undefined;
48
48
  } | {
49
49
  $visible: boolean;
@@ -54,7 +54,7 @@ export declare function syncFieldsWithParams(tablekey: string, fields: TableFiel
54
54
  hint?: string | undefined;
55
55
  locked?: boolean | undefined;
56
56
  visible?: boolean | undefined;
57
- getCell: (item: any) => Primitive | ComponentAndProps | undefined;
57
+ getCell: (item: any) => Primitive | ComponentAndProps | null | undefined;
58
58
  } | {
59
59
  $visible: boolean;
60
60
  key: string;
@@ -64,7 +64,7 @@ export declare function syncFieldsWithParams(tablekey: string, fields: TableFiel
64
64
  hint?: string | undefined;
65
65
  locked?: boolean | undefined;
66
66
  visible?: boolean | undefined;
67
- getCell: (item: any) => Primitive;
67
+ getCell: (item: any) => Primitive | null | undefined;
68
68
  } | {
69
69
  $visible: boolean;
70
70
  key: string;
@@ -74,6 +74,6 @@ export declare function syncFieldsWithParams(tablekey: string, fields: TableFiel
74
74
  hint?: string | undefined;
75
75
  locked?: boolean | undefined;
76
76
  visible?: boolean | undefined;
77
- getCell: (item: any) => Primitive[];
77
+ getCell: (item: any) => Primitive[] | null | undefined;
78
78
  })[];
79
79
  export {};
package/dist/utils/csv.js CHANGED
@@ -1,8 +1,7 @@
1
1
  export function getCSV(items, fields) {
2
2
  const headers = Object.keys(fields).join('\t');
3
3
  const rows = items.map((m) => Object.values(fields)
4
- .filter((getValue) => !!getValue)
5
- .map((getValue) => getValue(m))
4
+ .map((getValue) => !!getValue ? getValue(m) : '')
6
5
  .join('\t'));
7
6
  return [headers, rows.join('\r\n')].join('\r\n');
8
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",