fuma 2.0.3 → 2.0.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.
- package/dist/ui/button/ButtonCopy.svelte +5 -2
- package/dist/ui/button/ButtonCopy.svelte.d.ts +2 -0
- package/dist/ui/form/Form.svelte +2 -2
- package/dist/ui/input/FormControl.svelte +3 -3
- package/dist/ui/input/InputSearch.svelte +34 -22
- package/dist/ui/input/InputSearch.svelte.d.ts +10 -8
- package/dist/ui/input/InputText.svelte +22 -9
- package/dist/ui/input/InputText.svelte.d.ts +7 -21
- package/dist/ui/input/InputTime.svelte +3 -2
- package/dist/ui/input/InputTime.svelte.d.ts +25 -2
- package/dist/ui/input/textRich/InputTextRich.svelte +5 -0
- package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +11 -1
- package/dist/ui/input/textRich/ToolsBar.svelte +1 -4
- package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +2 -0
- package/dist/ui/menu/DropDown.svelte +5 -5
- package/dist/ui/menu/DropDown.svelte.d.ts +12 -4
- package/dist/ui/range/RangePicker.svelte +2 -2
- package/dist/ui/range/RangePicker.svelte.d.ts +2 -2
- package/dist/ui/range/RangePickerButton.svelte +7 -4
- package/dist/ui/range/RangePickerButton.svelte.d.ts +4 -2
- package/dist/ui/table/Table.svelte +27 -13
- package/dist/ui/table/Table.svelte.d.ts +20 -28
- package/dist/ui/table/TableBody.svelte +21 -21
- package/dist/ui/table/TableBody.svelte.d.ts +19 -25
- package/dist/ui/table/TableCell.svelte +14 -15
- package/dist/ui/table/TableCell.svelte.d.ts +16 -21
- package/dist/ui/table/TableFieldsEdition.svelte +2 -2
- package/dist/ui/table/TableHead.svelte +32 -20
- package/dist/ui/table/TableHead.svelte.d.ts +7 -32
- package/dist/ui/table/cell/TableCellArray.svelte +5 -8
- package/dist/ui/table/cell/TableCellArray.svelte.d.ts +5 -20
- package/dist/ui/table/cell/TableCellBoolean.svelte +3 -2
- package/dist/ui/table/cell/TableCellBoolean.svelte.d.ts +5 -19
- package/dist/ui/table/cell/TableCellNumber.svelte +2 -2
- package/dist/ui/table/cell/TableCellNumber.svelte.d.ts +5 -19
- package/dist/ui/table/cell/TableCellString.svelte +5 -5
- package/dist/ui/table/cell/TableCellString.svelte.d.ts +25 -19
- package/dist/ui/table/field.d.ts +25 -58
- package/dist/ui/table/field.js +6 -7
- package/dist/ui/table/head/OrderButtons.svelte +40 -0
- package/dist/ui/table/head/OrderButtons.svelte.d.ts +24 -0
- package/dist/ui/table/head/TableHeadBoolean.svelte +2 -2
- package/dist/ui/table/head/TableHeadBoolean.svelte.d.ts +28 -17
- package/dist/ui/table/head/TableHeadDate.svelte +91 -25
- package/dist/ui/table/head/TableHeadDate.svelte.d.ts +5 -19
- package/dist/ui/table/head/TableHeadDefault.svelte +1 -2
- package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +4 -18
- package/dist/ui/table/head/TableHeadNumber.svelte +33 -12
- package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +28 -17
- package/dist/ui/table/head/TableHeadSelect.svelte +2 -2
- package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +31 -20
- package/dist/ui/table/head/TableHeadString.svelte +9 -9
- package/dist/ui/table/head/TableHeadString.svelte.d.ts +4 -18
- package/dist/ui/table/head/index.d.ts +6 -0
- package/dist/ui/table/head/index.js +6 -22
- package/dist/validation/zod.d.ts +8 -0
- package/dist/validation/zod.js +4 -2
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts" generics="Item extends {id: string}">
|
|
2
2
|
import { derived } from 'svelte/store'
|
|
3
3
|
import { page } from '$app/stores'
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { urlParam } from '../../../store/param.js'
|
|
11
11
|
import { mdiOrderBoolAscendingVariant } from '@mdi/js'
|
|
12
12
|
|
|
13
|
-
export let field: TableField
|
|
13
|
+
export let field: TableField<Item>
|
|
14
14
|
export let options: Options
|
|
15
15
|
export let multiSelect = false
|
|
16
16
|
export let placeholder = 'No option'
|
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import type { TableField } from '../index.js';
|
|
2
2
|
import { type Options } from '../../../utils/options.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
3
|
+
declare class __sveltets_Render<Item extends {
|
|
4
|
+
id: string;
|
|
5
|
+
}> {
|
|
6
|
+
props(): {
|
|
7
|
+
field: TableField<Item>;
|
|
8
|
+
options: Options;
|
|
9
|
+
multiSelect?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
13
11
|
};
|
|
14
|
-
|
|
12
|
+
events(): {} & {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots(): {};
|
|
16
|
+
bindings(): string;
|
|
17
|
+
exports(): {};
|
|
18
|
+
}
|
|
19
|
+
interface $$IsomorphicComponent {
|
|
20
|
+
new <Item extends {
|
|
21
|
+
id: string;
|
|
22
|
+
}>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Item>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Item>['props']>, ReturnType<__sveltets_Render<Item>['events']>, ReturnType<__sveltets_Render<Item>['slots']>> & {
|
|
23
|
+
$$bindings?: ReturnType<__sveltets_Render<Item>['bindings']>;
|
|
24
|
+
} & ReturnType<__sveltets_Render<Item>['exports']>;
|
|
25
|
+
<Item extends {
|
|
26
|
+
id: string;
|
|
27
|
+
}>(internal: unknown, props: ReturnType<__sveltets_Render<Item>['props']> & {
|
|
28
|
+
$$events?: ReturnType<__sveltets_Render<Item>['events']>;
|
|
29
|
+
}): ReturnType<__sveltets_Render<Item>['exports']>;
|
|
30
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
15
31
|
}
|
|
16
|
-
declare const TableHeadSelect: $$
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
}, {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
}, {}, {}, string>;
|
|
24
|
-
type TableHeadSelect = InstanceType<typeof TableHeadSelect>;
|
|
32
|
+
declare const TableHeadSelect: $$IsomorphicComponent;
|
|
33
|
+
type TableHeadSelect<Item extends {
|
|
34
|
+
id: string;
|
|
35
|
+
}> = InstanceType<typeof TableHeadSelect<Item>>;
|
|
25
36
|
export default TableHeadSelect;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { TippyInstance } from '../../../utils/tippy.js'
|
|
3
2
|
import { mdiMagnify } from '@mdi/js'
|
|
4
|
-
import { page } from '$app/
|
|
3
|
+
import { page } from '$app/state'
|
|
5
4
|
|
|
6
5
|
import { DropDown } from '../../menu/index.js'
|
|
7
6
|
import { Icon } from '../../icon/index.js'
|
|
8
7
|
import { InputSearch } from '../../input/index.js'
|
|
9
8
|
import type { TableField } from '../index.js'
|
|
9
|
+
import { goto } from '$app/navigation'
|
|
10
|
+
import { urlParam } from '../../../store/param.js'
|
|
11
|
+
let { field }: { field: TableField } = $props()
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let tip: TippyInstance
|
|
14
|
-
let searchValue = $page.url.searchParams.get(field.key) || ''
|
|
13
|
+
let searchValue = $derived(page.url.searchParams.get(field.key) || '')
|
|
15
14
|
</script>
|
|
16
15
|
|
|
17
16
|
<th class="p-1">
|
|
18
17
|
<DropDown
|
|
19
|
-
|
|
18
|
+
let:tip
|
|
20
19
|
hideOnBlur
|
|
21
20
|
hideOnNav={false}
|
|
22
21
|
autofocus
|
|
@@ -41,8 +40,9 @@
|
|
|
41
40
|
<InputSearch
|
|
42
41
|
class="m-1"
|
|
43
42
|
key={field.key}
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
value={searchValue}
|
|
44
|
+
onkeydown={(e) => e.key === 'Enter' && tip?.hide()}
|
|
45
|
+
onclear={() => goto($urlParam.without(field.key))}
|
|
46
46
|
/>
|
|
47
47
|
</DropDown>
|
|
48
48
|
</th>
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import type { TableField } from '../index.js';
|
|
2
|
-
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const TableHeadString: $$__sveltets_2_IsomorphicComponent<{
|
|
2
|
+
type $$ComponentProps = {
|
|
16
3
|
field: TableField;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type TableHeadString = InstanceType<typeof TableHeadString>;
|
|
4
|
+
};
|
|
5
|
+
declare const TableHeadString: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type TableHeadString = ReturnType<typeof TableHeadString>;
|
|
21
7
|
export default TableHeadString;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as TableHeadSelect } from './TableHeadSelect.svelte';
|
|
2
|
+
export { default as TableHeadDate } from './TableHeadDate.svelte';
|
|
3
|
+
export { default as TableHeadBoolean } from './TableHeadBoolean.svelte';
|
|
4
|
+
export { default as TableHeadNumber } from './TableHeadNumber.svelte';
|
|
5
|
+
export { default as TableHeadString } from './TableHeadString.svelte';
|
|
6
|
+
export { default as TableHeadDefault } from './TableHeadDefault.svelte';
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
boolean: TableHeadBoolean,
|
|
8
|
-
string: TableHeadString,
|
|
9
|
-
textarea: TableHeadString,
|
|
10
|
-
number: TableHeadNumber,
|
|
11
|
-
multiselect: TableHeadSelect,
|
|
12
|
-
select: TableHeadSelect,
|
|
13
|
-
date: TableHeadDate
|
|
14
|
-
};
|
|
15
|
-
export function tableHeadComponent(type, props) {
|
|
16
|
-
return (field) => {
|
|
17
|
-
const component = tableHeadComponentRecord[type];
|
|
18
|
-
if (type !== 'multiselect')
|
|
19
|
-
return { component, props: { ...props, field } };
|
|
20
|
-
return { component, props: { ...props, field, multiSelect: true } };
|
|
21
|
-
};
|
|
22
|
-
}
|
|
1
|
+
export { default as TableHeadSelect } from './TableHeadSelect.svelte';
|
|
2
|
+
export { default as TableHeadDate } from './TableHeadDate.svelte';
|
|
3
|
+
export { default as TableHeadBoolean } from './TableHeadBoolean.svelte';
|
|
4
|
+
export { default as TableHeadNumber } from './TableHeadNumber.svelte';
|
|
5
|
+
export { default as TableHeadString } from './TableHeadString.svelte';
|
|
6
|
+
export { default as TableHeadDefault } from './TableHeadDefault.svelte';
|
package/dist/validation/zod.d.ts
CHANGED
|
@@ -83,11 +83,19 @@ export declare const z: {
|
|
|
83
83
|
number: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
84
84
|
min: zod.ZodOptional<zod.ZodNumber>;
|
|
85
85
|
max: zod.ZodOptional<zod.ZodNumber>;
|
|
86
|
+
order: zod.ZodOptional<zod.ZodEnum<{
|
|
87
|
+
desc: "desc";
|
|
88
|
+
asc: "asc";
|
|
89
|
+
}>>;
|
|
86
90
|
}, zod.z.core.$strip>, zod.ZodPipe<zod.ZodPipe<zod.ZodString, zod.ZodTransform<zod.z.core.$RefinementCtx<string>, string>>, zod.z.core.$ZodType<any, zod.z.core.$RefinementCtx<string>, zod.z.core.$ZodTypeInternals<any, zod.z.core.$RefinementCtx<string>>>>]>>;
|
|
87
91
|
multiselect: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodArray<zod.ZodString>, zod.ZodPipe<zod.ZodPipe<zod.ZodString, zod.ZodTransform<zod.z.core.$RefinementCtx<string>, string>>, zod.z.core.$ZodType<any, zod.z.core.$RefinementCtx<string>, zod.z.core.$ZodTypeInternals<any, zod.z.core.$RefinementCtx<string>>>>]>>;
|
|
88
92
|
range: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
89
93
|
start: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
|
|
90
94
|
end: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
|
|
95
|
+
order: zod.ZodOptional<zod.ZodEnum<{
|
|
96
|
+
desc: "desc";
|
|
97
|
+
asc: "asc";
|
|
98
|
+
}>>;
|
|
91
99
|
}, zod.z.core.$strip>, zod.ZodPipe<zod.ZodPipe<zod.ZodString, zod.ZodTransform<zod.z.core.$RefinementCtx<string>, string>>, zod.z.core.$ZodType<any, zod.z.core.$RefinementCtx<string>, zod.z.core.$ZodTypeInternals<any, zod.z.core.$RefinementCtx<string>>>>]>>;
|
|
92
100
|
boolean: zod.ZodOptional<zod.ZodPipe<zod.ZodEnum<{
|
|
93
101
|
true: "true";
|
package/dist/validation/zod.js
CHANGED
|
@@ -59,12 +59,14 @@ const relations = {
|
|
|
59
59
|
const filter = {
|
|
60
60
|
number: json({
|
|
61
61
|
min: zod.number().optional(),
|
|
62
|
-
max: zod.number().optional()
|
|
62
|
+
max: zod.number().optional(),
|
|
63
|
+
order: zod.enum(['asc', 'desc']).optional()
|
|
63
64
|
}).optional(),
|
|
64
65
|
multiselect: jsonArray(zod.string()).optional(),
|
|
65
66
|
range: json({
|
|
66
67
|
start: zod.coerce.date().optional(),
|
|
67
|
-
end: zod.coerce.date().optional()
|
|
68
|
+
end: zod.coerce.date().optional(),
|
|
69
|
+
order: zod.enum(['asc', 'desc']).optional()
|
|
68
70
|
}).optional(),
|
|
69
71
|
boolean: zod
|
|
70
72
|
.enum(['true', 'false'])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuma",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jonas Voisard",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
],
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@sveltejs/adapter-auto": "^3.3.1",
|
|
58
|
-
"@sveltejs/kit": "^2.43.
|
|
58
|
+
"@sveltejs/kit": "^2.43.8",
|
|
59
59
|
"@sveltejs/package": "^2.5.4",
|
|
60
60
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
61
61
|
"@tailwindcss/typography": "^0.5.19",
|
|
62
62
|
"@types/debounce": "^1.2.4",
|
|
63
63
|
"@types/eslint": "^8.56.12",
|
|
64
|
-
"@types/node": "^24.
|
|
64
|
+
"@types/node": "^24.6.2",
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
66
66
|
"@typescript-eslint/parser": "^7.18.0",
|
|
67
67
|
"autoprefixer": "^10.4.21",
|
|
@@ -77,16 +77,16 @@
|
|
|
77
77
|
"prisma": "^5.22.0",
|
|
78
78
|
"publint": "^0.1.16",
|
|
79
79
|
"svelte-check": "^3.8.6",
|
|
80
|
-
"tailwindcss": "^4.1.
|
|
80
|
+
"tailwindcss": "^4.1.14",
|
|
81
81
|
"tslib": "^2.8.1",
|
|
82
|
-
"typescript": "^5.9.
|
|
82
|
+
"typescript": "^5.9.3",
|
|
83
83
|
"vitest": "^1.6.1"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@lucia-auth/adapter-prisma": "^4.0.1",
|
|
87
87
|
"@mdi/js": "^7.4.47",
|
|
88
88
|
"@prisma/client": "5.22.0",
|
|
89
|
-
"@tailwindcss/vite": "^4.1.
|
|
89
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
90
90
|
"@tiptap/core": "^2.26.2",
|
|
91
91
|
"@tiptap/extension-color": "^2.26.2",
|
|
92
92
|
"@tiptap/extension-highlight": "^2.26.2",
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
"lucia": "^3.2.2",
|
|
110
110
|
"mode-watcher": "^0.5.1",
|
|
111
111
|
"oslo": "^1.2.1",
|
|
112
|
-
"svelte": "^5.39.
|
|
112
|
+
"svelte": "^5.39.8",
|
|
113
113
|
"svelte-easy-crop": "^3.0.1",
|
|
114
114
|
"svelte-sonner": "^0.3.28",
|
|
115
115
|
"tippy.js": "^6.3.7",
|
|
116
116
|
"ts-node": "^10.9.2",
|
|
117
|
-
"vite": "^7.1.
|
|
117
|
+
"vite": "^7.1.9",
|
|
118
118
|
"zod": "^4.1.11"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|