runeforge 0.0.61 → 0.0.63
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/LICENSE +21 -21
- package/README.md +1410 -1407
- package/dist/components/Avatar.svelte +31 -31
- package/dist/components/IconRenderer.svelte +73 -73
- package/dist/components/Modal.svelte +75 -75
- package/dist/components/common/Header.svelte +40 -40
- package/dist/components/crud/EmbeddedField.svelte +203 -203
- package/dist/components/crud/Field.svelte +122 -122
- package/dist/components/crud/GenericCRUD.svelte +426 -426
- package/dist/components/crud/SearchInput.svelte +53 -53
- package/dist/components/crud/columns/Avatar.svelte +15 -15
- package/dist/components/crud/columns/Icon.svelte +8 -8
- package/dist/components/crud/fields/BooleanField.svelte +38 -38
- package/dist/components/crud/fields/DatetimeField.svelte +250 -250
- package/dist/components/crud/fields/DefaultField.svelte +67 -67
- package/dist/components/crud/fields/FileField.svelte +70 -70
- package/dist/components/crud/fields/MultiSelectField.svelte +70 -70
- package/dist/components/crud/fields/SelectField.svelte +67 -67
- package/dist/components/crud/fields/TextareaField.svelte +55 -55
- package/dist/components/crud/fields/TreeField.svelte +1 -0
- package/dist/components/crud/utils/resolution.js +1 -0
- package/dist/components/crud/utils/tree.d.ts +5 -0
- package/dist/components/crud/utils/tree.js +29 -0
- package/dist/components/crud/views/Create.svelte +239 -239
- package/dist/components/crud/views/Read.svelte +131 -131
- package/dist/components/crud/views/Update.svelte +215 -215
- package/dist/components/crud/views/list/List.svelte +291 -291
- package/dist/components/crud/views/list/Modals.svelte +56 -56
- package/dist/components/crud/views/list/Table.svelte +173 -173
- package/dist/components/crud/views/list/Toolbar.svelte +340 -340
- package/dist/components/form/Button.svelte +27 -27
- package/dist/components/form/Label.svelte +37 -37
- package/dist/components/form/MultiSelect.svelte +248 -248
- package/dist/components/form/PasswordInput.svelte +68 -68
- package/dist/components/form/Required.svelte +1 -1
- package/dist/components/form/Select.svelte +209 -209
- package/dist/components/form/Tree.svelte +43 -4
- package/dist/components/form/Tree.svelte.d.ts +1 -0
- package/dist/components/form/TreeNode.svelte +31 -2
- package/dist/components/form/TreeNode.svelte.d.ts +2 -0
- package/dist/components/navigation/Breadcrumbs.svelte +111 -111
- package/dist/components/table/ColumnFilter.svelte +168 -168
- package/dist/components/table/PaginatedTable.svelte +542 -542
- package/dist/components/table/Paginator.svelte +113 -113
- package/dist/components/table/SortHeader.svelte +43 -43
- package/dist/components/table/TableBody.svelte +150 -150
- package/dist/components/table/TableHeader.svelte +88 -88
- package/dist/components/table/state.svelte.js +7 -2
- package/dist/icons/defaults/Clear.svelte +6 -6
- package/dist/icons/defaults/Create.svelte +6 -6
- package/dist/icons/defaults/Delete.svelte +6 -6
- package/dist/icons/defaults/Download.svelte +7 -7
- package/dist/icons/defaults/Edit.svelte +7 -7
- package/dist/icons/defaults/Filter.svelte +6 -6
- package/dist/icons/defaults/FilterActive.svelte +6 -6
- package/dist/icons/defaults/Folder.svelte +6 -6
- package/dist/icons/defaults/Grip.svelte +7 -7
- package/dist/icons/defaults/Home.svelte +6 -6
- package/dist/icons/defaults/PasswordHide.svelte +9 -9
- package/dist/icons/defaults/PasswordShow.svelte +7 -7
- package/dist/icons/defaults/SortAsc.svelte +6 -6
- package/dist/icons/defaults/SortDesc.svelte +6 -6
- package/dist/icons/defaults/SortNone.svelte +6 -6
- package/dist/icons/defaults/View.svelte +7 -7
- package/dist/types/attribute.d.ts +3 -0
- package/dist/types/crud/fields.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
<script lang="ts" generics="T extends object">
|
|
2
|
-
import SortHeader from './SortHeader.svelte';
|
|
3
|
-
import ColumnFilter from './ColumnFilter.svelte';
|
|
4
|
-
import { isSortable, isFilterable } from './utils.js';
|
|
5
|
-
import type { DistinctEntry } from '../../types/table.js';
|
|
6
|
-
import type { ColumnDefinition } from '../../types/crud/columns.js';
|
|
7
|
-
import type { SortState, FilterState } from './state.svelte.js';
|
|
8
|
-
import { getStrings } from '../../i18n/context.js';
|
|
9
|
-
|
|
10
|
-
const strings = getStrings();
|
|
11
|
-
|
|
12
|
-
let {
|
|
13
|
-
columns,
|
|
14
|
-
selectable,
|
|
15
|
-
allChecked,
|
|
16
|
-
someChecked,
|
|
17
|
-
onToggleAll,
|
|
18
|
-
sort,
|
|
19
|
-
filter,
|
|
20
|
-
distinctValues,
|
|
21
|
-
hasRowActions = false,
|
|
22
|
-
actionsLabel = strings.actions,
|
|
23
|
-
reorderActive = false,
|
|
24
|
-
onchange,
|
|
25
|
-
}: {
|
|
26
|
-
columns: ColumnDefinition<T>[];
|
|
27
|
-
selectable: boolean;
|
|
28
|
-
allChecked: boolean;
|
|
29
|
-
someChecked: boolean;
|
|
30
|
-
onToggleAll: () => void;
|
|
31
|
-
sort: SortState;
|
|
32
|
-
filter: FilterState;
|
|
33
|
-
distinctValues: Record<string, DistinctEntry<T>[]>;
|
|
34
|
-
hasRowActions?: boolean;
|
|
35
|
-
actionsLabel?: string;
|
|
36
|
-
reorderActive?: boolean;
|
|
37
|
-
onchange?: () => void;
|
|
38
|
-
} = $props();
|
|
39
|
-
|
|
40
|
-
function sortBy(col: ColumnDefinition<T>) {
|
|
41
|
-
if (reorderActive || !isSortable(col)) return;
|
|
42
|
-
sort.cycle(col.attribute);
|
|
43
|
-
onchange?.();
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<thead class="bg-base-200">
|
|
48
|
-
<tr>
|
|
49
|
-
{#if reorderActive}
|
|
50
|
-
<th class="w-10"></th>
|
|
51
|
-
{/if}
|
|
52
|
-
{#if selectable}
|
|
53
|
-
<th>
|
|
54
|
-
<input
|
|
55
|
-
type="checkbox"
|
|
56
|
-
class="checkbox checkbox-sm"
|
|
57
|
-
checked={allChecked}
|
|
58
|
-
indeterminate={someChecked && !allChecked}
|
|
59
|
-
onchange={onToggleAll}
|
|
60
|
-
/>
|
|
61
|
-
</th>
|
|
62
|
-
{/if}
|
|
63
|
-
{#each columns as col (col.attribute)}
|
|
64
|
-
{@const title = (col.title ?? col.attribute).replace(/_/g, ' ')}
|
|
65
|
-
<th>
|
|
66
|
-
<div class="flex items-center gap-1">
|
|
67
|
-
<SortHeader
|
|
68
|
-
{title}
|
|
69
|
-
sortable={isSortable(col) && !reorderActive}
|
|
70
|
-
direction={reorderActive ? null : sort.directionFor(col.attribute)}
|
|
71
|
-
onsort={() => sortBy(col)}
|
|
72
|
-
/>
|
|
73
|
-
{#if isFilterable(col)}
|
|
74
|
-
<ColumnFilter
|
|
75
|
-
column={col}
|
|
76
|
-
entries={distinctValues[col.attribute] ?? []}
|
|
77
|
-
{filter}
|
|
78
|
-
{onchange}
|
|
79
|
-
/>
|
|
80
|
-
{/if}
|
|
81
|
-
</div>
|
|
82
|
-
</th>
|
|
83
|
-
{/each}
|
|
84
|
-
{#if hasRowActions}
|
|
85
|
-
<th class="text-right">{actionsLabel}</th>
|
|
86
|
-
{/if}
|
|
87
|
-
</tr>
|
|
88
|
-
</thead>
|
|
1
|
+
<script lang="ts" generics="T extends object">
|
|
2
|
+
import SortHeader from './SortHeader.svelte';
|
|
3
|
+
import ColumnFilter from './ColumnFilter.svelte';
|
|
4
|
+
import { isSortable, isFilterable } from './utils.js';
|
|
5
|
+
import type { DistinctEntry } from '../../types/table.js';
|
|
6
|
+
import type { ColumnDefinition } from '../../types/crud/columns.js';
|
|
7
|
+
import type { SortState, FilterState } from './state.svelte.js';
|
|
8
|
+
import { getStrings } from '../../i18n/context.js';
|
|
9
|
+
|
|
10
|
+
const strings = getStrings();
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
columns,
|
|
14
|
+
selectable,
|
|
15
|
+
allChecked,
|
|
16
|
+
someChecked,
|
|
17
|
+
onToggleAll,
|
|
18
|
+
sort,
|
|
19
|
+
filter,
|
|
20
|
+
distinctValues,
|
|
21
|
+
hasRowActions = false,
|
|
22
|
+
actionsLabel = strings.actions,
|
|
23
|
+
reorderActive = false,
|
|
24
|
+
onchange,
|
|
25
|
+
}: {
|
|
26
|
+
columns: ColumnDefinition<T>[];
|
|
27
|
+
selectable: boolean;
|
|
28
|
+
allChecked: boolean;
|
|
29
|
+
someChecked: boolean;
|
|
30
|
+
onToggleAll: () => void;
|
|
31
|
+
sort: SortState;
|
|
32
|
+
filter: FilterState;
|
|
33
|
+
distinctValues: Record<string, DistinctEntry<T>[]>;
|
|
34
|
+
hasRowActions?: boolean;
|
|
35
|
+
actionsLabel?: string;
|
|
36
|
+
reorderActive?: boolean;
|
|
37
|
+
onchange?: () => void;
|
|
38
|
+
} = $props();
|
|
39
|
+
|
|
40
|
+
function sortBy(col: ColumnDefinition<T>) {
|
|
41
|
+
if (reorderActive || !isSortable(col)) return;
|
|
42
|
+
sort.cycle(col.attribute);
|
|
43
|
+
onchange?.();
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<thead class="bg-base-200">
|
|
48
|
+
<tr>
|
|
49
|
+
{#if reorderActive}
|
|
50
|
+
<th class="w-10"></th>
|
|
51
|
+
{/if}
|
|
52
|
+
{#if selectable}
|
|
53
|
+
<th>
|
|
54
|
+
<input
|
|
55
|
+
type="checkbox"
|
|
56
|
+
class="checkbox checkbox-sm"
|
|
57
|
+
checked={allChecked}
|
|
58
|
+
indeterminate={someChecked && !allChecked}
|
|
59
|
+
onchange={onToggleAll}
|
|
60
|
+
/>
|
|
61
|
+
</th>
|
|
62
|
+
{/if}
|
|
63
|
+
{#each columns as col (col.attribute)}
|
|
64
|
+
{@const title = (col.title ?? col.attribute).replace(/_/g, ' ')}
|
|
65
|
+
<th>
|
|
66
|
+
<div class="flex items-center gap-1">
|
|
67
|
+
<SortHeader
|
|
68
|
+
{title}
|
|
69
|
+
sortable={isSortable(col) && !reorderActive}
|
|
70
|
+
direction={reorderActive ? null : sort.directionFor(col.attribute)}
|
|
71
|
+
onsort={() => sortBy(col)}
|
|
72
|
+
/>
|
|
73
|
+
{#if isFilterable(col)}
|
|
74
|
+
<ColumnFilter
|
|
75
|
+
column={col}
|
|
76
|
+
entries={distinctValues[col.attribute] ?? []}
|
|
77
|
+
{filter}
|
|
78
|
+
{onchange}
|
|
79
|
+
/>
|
|
80
|
+
{/if}
|
|
81
|
+
</div>
|
|
82
|
+
</th>
|
|
83
|
+
{/each}
|
|
84
|
+
{#if hasRowActions}
|
|
85
|
+
<th class="text-right">{actionsLabel}</th>
|
|
86
|
+
{/if}
|
|
87
|
+
</tr>
|
|
88
|
+
</thead>
|
|
@@ -137,8 +137,13 @@ export class FilterState {
|
|
|
137
137
|
if (text && !cell.toLowerCase().includes(text.toLowerCase()))
|
|
138
138
|
return false;
|
|
139
139
|
const selected = this.values.get(col.attribute);
|
|
140
|
-
if (selected && selected.size > 0
|
|
141
|
-
|
|
140
|
+
if (selected && selected.size > 0) {
|
|
141
|
+
const key = col.type === 'boolean'
|
|
142
|
+
? String(!!row[col.attribute])
|
|
143
|
+
: cell;
|
|
144
|
+
if (!selected.has(key))
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
142
147
|
return true;
|
|
143
148
|
});
|
|
144
149
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 1 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 1 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5M11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 0 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47M8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5M11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 0 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47M8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
-
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
6
|
+
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
7
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12z"/>
|
|
6
|
-
<path d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12z"/>
|
|
6
|
+
<path d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3m-8.322.12q.322-.119.684-.12h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a2 2 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3m-8.322.12q.322-.119.684-.12h5.396l-.707-.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
6
|
-
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
6
|
+
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755l.708.709z"/>
|
|
6
|
-
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
7
|
-
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238z"/>
|
|
8
|
-
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
|
9
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755l.708.709z"/>
|
|
6
|
+
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
7
|
+
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238z"/>
|
|
8
|
+
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
|
9
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
-
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
+
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/>
|
|
6
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M3.646 9.146a.5.5 0 0 1 .708 0L8 12.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zm0-2.292a.5.5 0 0 0 .708 0L8 3.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M3.646 9.146a.5.5 0 0 1 .708 0L8 12.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zm0-2.292a.5.5 0 0 0 .708 0L8 3.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708"/>
|
|
6
|
+
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
-
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
-
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
-
</svg>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { size = '1em', class: cls = '' }: { size?: string | number; class?: string } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 16 16" fill="currentColor" class={cls}>
|
|
5
|
+
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z"/>
|
|
6
|
+
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"/>
|
|
7
|
+
</svg>
|
|
@@ -147,6 +147,9 @@ export type AttributeMetadata = {
|
|
|
147
147
|
dependsOn?: string;
|
|
148
148
|
/** Tree fields only: whether parent nodes start expanded. Defaults to `true`. */
|
|
149
149
|
defaultExpanded?: boolean;
|
|
150
|
+
/** Tree fields only: whether a search-by-name box is shown above the tree.
|
|
151
|
+
* Defaults to `true`; set `false` for trees short enough not to need it. */
|
|
152
|
+
searchable?: boolean;
|
|
150
153
|
/** Fields sharing the same `row` string render side by side on desktop and
|
|
151
154
|
* stacked on mobile — see the Field rows section. Only merges fields that
|
|
152
155
|
* are also in the same `groupedAs` bucket (or both ungrouped). */
|
|
@@ -41,6 +41,9 @@ export interface FieldDefinition<T extends object = Record<string, unknown>> {
|
|
|
41
41
|
dependsOn?: string;
|
|
42
42
|
/** Tree fields only: whether parent nodes start expanded. Defaults to `true`. */
|
|
43
43
|
defaultExpanded?: boolean;
|
|
44
|
+
/** Tree fields only: whether a search-by-name box is shown above the tree.
|
|
45
|
+
* Defaults to `true`; set `false` for trees short enough not to need it. */
|
|
46
|
+
searchable?: boolean;
|
|
44
47
|
/** Fields sharing the same `row` string render side by side. */
|
|
45
48
|
row?: string;
|
|
46
49
|
/** See `AttributeMetadata.actions`. */
|