fuma 0.3.24 → 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.
package/dist/ui/context.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<script>import { createEventDispatcher, onMount } from "svelte";
|
|
2
2
|
import { mdiClose } from "@mdi/js";
|
|
3
3
|
import { Icon } from "../icon/index.js";
|
|
4
|
+
import { contextContainer } from "../context.js";
|
|
4
5
|
export let dialog;
|
|
5
6
|
export let hideCloseButton = false;
|
|
6
7
|
let klass = "";
|
|
7
8
|
export { klass as class };
|
|
8
9
|
const dispatch = createEventDispatcher();
|
|
10
|
+
contextContainer.set("dialog");
|
|
9
11
|
onMount(() => {
|
|
10
12
|
const inputsSelector = 'input:not([type=hidden], [tabindex="-1"])';
|
|
11
13
|
const inputs = dialog.querySelectorAll(inputsSelector);
|
package/dist/ui/form/Form.svelte
CHANGED
|
@@ -81,6 +81,8 @@ function getActionPadding() {
|
|
|
81
81
|
return "-mx-2 sm:-mx-8 px-2 sm:px-8";
|
|
82
82
|
if (container === "drawer")
|
|
83
83
|
return "-ml-8 -mr-4 pl-8 pr-4";
|
|
84
|
+
if (container === "dialog")
|
|
85
|
+
return "-bottom-4 -mx-4 px-4";
|
|
84
86
|
return "";
|
|
85
87
|
}
|
|
86
88
|
const getBoolean = (bool) => (_data) => typeof bool === "boolean" || bool === void 0 ? !!bool : !!bool(_data);
|
package/dist/ui/table/field.d.ts
CHANGED
|
@@ -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
|
-
.
|
|
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
|
}
|