runeforge 0.0.58 → 0.0.59

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.
Files changed (67) hide show
  1. package/dist/components/crud/EmbeddedField.svelte +33 -5
  2. package/dist/components/crud/EmbeddedField.svelte.d.ts +6 -1
  3. package/dist/components/crud/Field.svelte +76 -451
  4. package/dist/components/crud/Field.svelte.d.ts +5 -1
  5. package/dist/components/crud/GenericCRUD.svelte +4 -4
  6. package/dist/components/crud/GenericCRUD.svelte.d.ts +4 -1
  7. package/dist/components/crud/SearchInput.svelte +1 -1
  8. package/dist/components/crud/SearchInput.svelte.d.ts +1 -1
  9. package/dist/components/crud/fields/BooleanField.svelte +38 -0
  10. package/dist/components/crud/fields/BooleanField.svelte.d.ts +33 -0
  11. package/dist/components/crud/fields/DatetimeField.svelte +250 -0
  12. package/dist/components/crud/fields/DatetimeField.svelte.d.ts +34 -0
  13. package/dist/components/crud/fields/DefaultField.svelte +67 -0
  14. package/dist/components/crud/fields/DefaultField.svelte.d.ts +34 -0
  15. package/dist/components/crud/fields/FileField.svelte +70 -0
  16. package/dist/components/crud/fields/FileField.svelte.d.ts +34 -0
  17. package/dist/components/crud/fields/MultiSelectField.svelte +70 -0
  18. package/dist/components/crud/fields/MultiSelectField.svelte.d.ts +34 -0
  19. package/dist/components/crud/fields/SelectField.svelte +67 -0
  20. package/dist/components/crud/fields/SelectField.svelte.d.ts +34 -0
  21. package/dist/components/crud/fields/TextareaField.svelte +55 -0
  22. package/dist/components/crud/fields/TextareaField.svelte.d.ts +34 -0
  23. package/dist/components/crud/fields/TreeField.svelte +63 -0
  24. package/dist/components/crud/fields/TreeField.svelte.d.ts +33 -0
  25. package/dist/components/crud/utils/embedded.d.ts +1 -1
  26. package/dist/components/crud/utils/grouping.d.ts +1 -1
  27. package/dist/components/crud/utils/resolution.d.ts +1 -1
  28. package/dist/components/crud/utils/resolution.js +3 -1
  29. package/dist/components/crud/utils/validation.d.ts +1 -1
  30. package/dist/components/crud/views/Create.svelte +2 -1
  31. package/dist/components/crud/views/Create.svelte.d.ts +2 -1
  32. package/dist/components/crud/views/Read.svelte +6 -5
  33. package/dist/components/crud/views/Read.svelte.d.ts +2 -1
  34. package/dist/components/crud/views/Update.svelte +2 -1
  35. package/dist/components/crud/views/Update.svelte.d.ts +2 -1
  36. package/dist/components/crud/views/list/List.svelte +3 -3
  37. package/dist/components/crud/views/list/List.svelte.d.ts +3 -1
  38. package/dist/components/crud/views/list/Modals.svelte +1 -1
  39. package/dist/components/crud/views/list/Modals.svelte.d.ts +1 -1
  40. package/dist/components/crud/views/list/Table.svelte +3 -6
  41. package/dist/components/crud/views/list/Table.svelte.d.ts +3 -1
  42. package/dist/components/crud/views/list/Toolbar.svelte +3 -4
  43. package/dist/components/crud/views/list/Toolbar.svelte.d.ts +3 -1
  44. package/dist/components/table/ColumnFilter.svelte +1 -1
  45. package/dist/components/table/ColumnFilter.svelte.d.ts +1 -1
  46. package/dist/components/table/PaginatedTable.svelte +1 -1
  47. package/dist/components/table/PaginatedTable.svelte.d.ts +1 -1
  48. package/dist/components/table/TableBody.svelte +1 -1
  49. package/dist/components/table/TableBody.svelte.d.ts +1 -1
  50. package/dist/components/table/TableHeader.svelte +1 -1
  51. package/dist/components/table/TableHeader.svelte.d.ts +1 -1
  52. package/dist/components/table/export.d.ts +1 -1
  53. package/dist/components/table/state.svelte.d.ts +1 -1
  54. package/dist/components/table/utils.d.ts +1 -1
  55. package/dist/index.d.ts +5 -1
  56. package/dist/types/attribute.d.ts +25 -4
  57. package/dist/types/{crud.d.ts → crud/actions.d.ts} +0 -127
  58. package/dist/types/crud/columns.d.ts +23 -0
  59. package/dist/types/crud/columns.js +1 -0
  60. package/dist/types/crud/fields.d.ts +48 -0
  61. package/dist/types/crud/fields.js +1 -0
  62. package/dist/types/crud/list-config.d.ts +23 -0
  63. package/dist/types/crud/list-config.js +1 -0
  64. package/dist/types/crud/reorder.d.ts +45 -0
  65. package/dist/types/crud/reorder.js +1 -0
  66. package/package.json +1 -1
  67. /package/dist/types/{crud.js → crud/actions.js} +0 -0
@@ -0,0 +1,34 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
3
+ declare function $$render<T extends object = Record<string, unknown>>(): {
4
+ props: {
5
+ field: FieldDefinition<T>;
6
+ record?: Record<string, unknown>;
7
+ parentRecord?: Record<string, unknown>;
8
+ error?: string;
9
+ readonly?: boolean;
10
+ labelRow: Snippet;
11
+ errorRow: Snippet;
12
+ };
13
+ exports: {};
14
+ bindings: "record";
15
+ slots: {};
16
+ events: {};
17
+ };
18
+ declare class __sveltets_Render<T extends object = Record<string, unknown>> {
19
+ props(): ReturnType<typeof $$render<T>>['props'];
20
+ events(): ReturnType<typeof $$render<T>>['events'];
21
+ slots(): ReturnType<typeof $$render<T>>['slots'];
22
+ bindings(): "record";
23
+ exports(): {};
24
+ }
25
+ interface $$IsomorphicComponent {
26
+ new <T extends object = Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
27
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
28
+ } & ReturnType<__sveltets_Render<T>['exports']>;
29
+ <T extends object = Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
30
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
31
+ }
32
+ declare const MultiSelectField: $$IsomorphicComponent;
33
+ type MultiSelectField<T extends object = Record<string, unknown>> = InstanceType<typeof MultiSelectField<T>>;
34
+ export default MultiSelectField;
@@ -0,0 +1,67 @@
1
+ <script lang="ts" generics="T extends object = Record<string, unknown>">
2
+ import type { Snippet } from 'svelte';
3
+ import Select from '../../form/Select.svelte';
4
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
5
+
6
+ let {
7
+ field,
8
+ record = $bindable({} as Record<string, unknown>),
9
+ parentRecord = undefined,
10
+ error = '',
11
+ readonly = false,
12
+ labelRow,
13
+ errorRow
14
+ }: {
15
+ field: FieldDefinition<T>;
16
+ record?: Record<string, unknown>;
17
+ parentRecord?: Record<string, unknown>;
18
+ error?: string;
19
+ readonly?: boolean;
20
+ labelRow: Snippet;
21
+ errorRow: Snippet;
22
+ } = $props();
23
+
24
+ const saved = $derived(record[field.attribute]);
25
+ const displayValue = $derived(saved == null ? '' : String(saved));
26
+ const selectOptions = $derived(
27
+ field.dependentOptions ? field.dependentOptions(record, parentRecord) : (field.options ?? [])
28
+ );
29
+ const fieldDisabled = $derived(field.disabled ? field.disabled(record, parentRecord) : false);
30
+
31
+ // A previously-valid selection can fall outside a dependentOptions list
32
+ // that just changed (e.g. its options depend on a sibling/parent field) —
33
+ // clears it instead of silently keeping a value the user can no longer see
34
+ // or re-pick from the dropdown.
35
+ $effect(() => {
36
+ if (!field.dependentOptions) return;
37
+ const current = record[field.attribute];
38
+ if (current && !selectOptions.some((o) => o.value === String(current))) {
39
+ record[field.attribute] = '';
40
+ }
41
+ });
42
+ </script>
43
+
44
+ {@render labelRow()}
45
+
46
+ {#if readonly}
47
+ <input
48
+ type="text"
49
+ id={field.attribute}
50
+ class="input input-bordered w-full"
51
+ value={selectOptions.find((o) => o.value === String(saved))?.label ?? displayValue}
52
+ disabled
53
+ />
54
+ {:else}
55
+ <Select
56
+ id={field.attribute}
57
+ name={field.attribute}
58
+ bind:value={record[field.attribute] as string}
59
+ options={selectOptions}
60
+ search={field.search}
61
+ placeholder={field.placeholder}
62
+ disabled={fieldDisabled}
63
+ {error}
64
+ />
65
+ {/if}
66
+
67
+ {@render errorRow()}
@@ -0,0 +1,34 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
3
+ declare function $$render<T extends object = Record<string, unknown>>(): {
4
+ props: {
5
+ field: FieldDefinition<T>;
6
+ record?: Record<string, unknown>;
7
+ parentRecord?: Record<string, unknown>;
8
+ error?: string;
9
+ readonly?: boolean;
10
+ labelRow: Snippet;
11
+ errorRow: Snippet;
12
+ };
13
+ exports: {};
14
+ bindings: "record";
15
+ slots: {};
16
+ events: {};
17
+ };
18
+ declare class __sveltets_Render<T extends object = Record<string, unknown>> {
19
+ props(): ReturnType<typeof $$render<T>>['props'];
20
+ events(): ReturnType<typeof $$render<T>>['events'];
21
+ slots(): ReturnType<typeof $$render<T>>['slots'];
22
+ bindings(): "record";
23
+ exports(): {};
24
+ }
25
+ interface $$IsomorphicComponent {
26
+ new <T extends object = Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
27
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
28
+ } & ReturnType<__sveltets_Render<T>['exports']>;
29
+ <T extends object = Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
30
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
31
+ }
32
+ declare const SelectField: $$IsomorphicComponent;
33
+ type SelectField<T extends object = Record<string, unknown>> = InstanceType<typeof SelectField<T>>;
34
+ export default SelectField;
@@ -0,0 +1,55 @@
1
+ <script lang="ts" generics="T extends object = Record<string, unknown>">
2
+ import type { Snippet } from 'svelte';
3
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
4
+
5
+ let {
6
+ field,
7
+ record = $bindable({} as Record<string, unknown>),
8
+ parentRecord = undefined,
9
+ error = '',
10
+ readonly = false,
11
+ labelRow,
12
+ errorRow
13
+ }: {
14
+ field: FieldDefinition<T>;
15
+ record?: Record<string, unknown>;
16
+ parentRecord?: Record<string, unknown>;
17
+ error?: string;
18
+ readonly?: boolean;
19
+ labelRow: Snippet;
20
+ errorRow: Snippet;
21
+ } = $props();
22
+
23
+ const name = $derived(readonly ? undefined : field.attribute);
24
+ const saved = $derived(record[field.attribute]);
25
+ const displayValue = $derived(saved == null ? '' : String(saved));
26
+ const formattedValue = $derived(
27
+ readonly && field.formatter ? field.formatter(saved, record) : displayValue
28
+ );
29
+ const fieldDisabled = $derived(field.disabled ? field.disabled(record, parentRecord) : false);
30
+ </script>
31
+
32
+ {@render labelRow()}
33
+
34
+ {#if readonly}
35
+ <textarea
36
+ id={field.attribute}
37
+ rows={field.rows}
38
+ class="textarea textarea-bordered bg-base-100 w-full"
39
+ value={formattedValue}
40
+ disabled
41
+ ></textarea>
42
+ {:else}
43
+ <textarea
44
+ id={field.attribute}
45
+ {name}
46
+ rows={field.rows}
47
+ placeholder={field.placeholder ?? ''}
48
+ bind:value={record[field.attribute]}
49
+ class="textarea textarea-bordered bg-base-100 w-full"
50
+ class:textarea-error={!!error}
51
+ disabled={fieldDisabled}
52
+ ></textarea>
53
+ {/if}
54
+
55
+ {@render errorRow()}
@@ -0,0 +1,34 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
3
+ declare function $$render<T extends object = Record<string, unknown>>(): {
4
+ props: {
5
+ field: FieldDefinition<T>;
6
+ record?: Record<string, unknown>;
7
+ parentRecord?: Record<string, unknown>;
8
+ error?: string;
9
+ readonly?: boolean;
10
+ labelRow: Snippet;
11
+ errorRow: Snippet;
12
+ };
13
+ exports: {};
14
+ bindings: "record";
15
+ slots: {};
16
+ events: {};
17
+ };
18
+ declare class __sveltets_Render<T extends object = Record<string, unknown>> {
19
+ props(): ReturnType<typeof $$render<T>>['props'];
20
+ events(): ReturnType<typeof $$render<T>>['events'];
21
+ slots(): ReturnType<typeof $$render<T>>['slots'];
22
+ bindings(): "record";
23
+ exports(): {};
24
+ }
25
+ interface $$IsomorphicComponent {
26
+ new <T extends object = Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
27
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
28
+ } & ReturnType<__sveltets_Render<T>['exports']>;
29
+ <T extends object = Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
30
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
31
+ }
32
+ declare const TextareaField: $$IsomorphicComponent;
33
+ type TextareaField<T extends object = Record<string, unknown>> = InstanceType<typeof TextareaField<T>>;
34
+ export default TextareaField;
@@ -0,0 +1,63 @@
1
+ <script lang="ts" generics="T extends object = Record<string, unknown>">
2
+ import type { Snippet } from 'svelte';
3
+ import Tree from '../../form/Tree.svelte';
4
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
5
+
6
+ let {
7
+ field,
8
+ record = $bindable({} as Record<string, unknown>),
9
+ parentRecord = undefined,
10
+ readonly = false,
11
+ labelRow,
12
+ errorRow
13
+ }: {
14
+ field: FieldDefinition<T>;
15
+ record?: Record<string, unknown>;
16
+ parentRecord?: Record<string, unknown>;
17
+ readonly?: boolean;
18
+ labelRow: Snippet;
19
+ errorRow: Snippet;
20
+ } = $props();
21
+
22
+ const saved = $derived(record[field.attribute]);
23
+ const selectOptions = $derived(
24
+ field.dependentOptions ? field.dependentOptions(record, parentRecord) : (field.options ?? [])
25
+ );
26
+ const fieldDisabled = $derived(field.disabled ? field.disabled(record, parentRecord) : false);
27
+
28
+ // See SelectField's equivalent effect.
29
+ $effect(() => {
30
+ if (!field.dependentOptions) return;
31
+ const current = record[field.attribute];
32
+ if (!Array.isArray(current)) return;
33
+ const validValues = new Set(selectOptions.map((o) => o.value));
34
+ const pruned = current.filter((v) => validValues.has(String(v)));
35
+ if (pruned.length !== current.length) {
36
+ record[field.attribute] = pruned;
37
+ }
38
+ });
39
+ </script>
40
+
41
+ {@render labelRow()}
42
+
43
+ {#if readonly}
44
+ <input
45
+ type="text"
46
+ id={field.attribute}
47
+ class="input input-bordered w-full"
48
+ value={(Array.isArray(saved) ? saved : [])
49
+ .map((v) => selectOptions.find((o) => o.value === String(v))?.label ?? String(v))
50
+ .join(', ')}
51
+ disabled
52
+ />
53
+ {:else}
54
+ <Tree
55
+ name={field.attribute}
56
+ bind:value={record[field.attribute] as string[]}
57
+ options={selectOptions}
58
+ disabled={fieldDisabled}
59
+ defaultExpanded={field.defaultExpanded ?? true}
60
+ />
61
+ {/if}
62
+
63
+ {@render errorRow()}
@@ -0,0 +1,33 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
3
+ declare function $$render<T extends object = Record<string, unknown>>(): {
4
+ props: {
5
+ field: FieldDefinition<T>;
6
+ record?: Record<string, unknown>;
7
+ parentRecord?: Record<string, unknown>;
8
+ readonly?: boolean;
9
+ labelRow: Snippet;
10
+ errorRow: Snippet;
11
+ };
12
+ exports: {};
13
+ bindings: "record";
14
+ slots: {};
15
+ events: {};
16
+ };
17
+ declare class __sveltets_Render<T extends object = Record<string, unknown>> {
18
+ props(): ReturnType<typeof $$render<T>>['props'];
19
+ events(): ReturnType<typeof $$render<T>>['events'];
20
+ slots(): ReturnType<typeof $$render<T>>['slots'];
21
+ bindings(): "record";
22
+ exports(): {};
23
+ }
24
+ interface $$IsomorphicComponent {
25
+ new <T extends object = Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
26
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
27
+ } & ReturnType<__sveltets_Render<T>['exports']>;
28
+ <T extends object = Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
29
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
30
+ }
31
+ declare const TreeField: $$IsomorphicComponent;
32
+ type TreeField<T extends object = Record<string, unknown>> = InstanceType<typeof TreeField<T>>;
33
+ export default TreeField;
@@ -1,4 +1,4 @@
1
- import type { FieldDefinition } from '../../../types/crud.js';
1
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
2
  export declare function seedField<T extends object = Record<string, unknown>>(f: FieldDefinition<T>, raw: unknown): unknown;
3
3
  export declare function emptyRecord<T extends object = Record<string, unknown>>(fields: FieldDefinition<T>[]): Record<string, unknown>;
4
4
  export declare function seedRecord<T extends object = Record<string, unknown>>(fields: FieldDefinition<T>[], source: Record<string, unknown>): Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import type { FieldDefinition } from '../../../types/crud.js';
1
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
2
  export type FieldRow<T extends object = Record<string, unknown>> = FieldDefinition<T>[];
3
3
  export type FieldGroup<T extends object = Record<string, unknown>> = {
4
4
  title?: string;
@@ -1,5 +1,5 @@
1
1
  import type { AttributeMetadata, AttributeType, SelectOption } from '../../../types/attribute.js';
2
- import type { FieldDefinition } from '../../../types/crud.js';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
3
3
  export declare function resolveOptions(m: AttributeMetadata, d: unknown): SelectOption[] | undefined;
4
4
  export declare function resolveDefault(m: AttributeMetadata, d: unknown): unknown;
5
5
  export declare function resolveFormatter(m: AttributeMetadata, d: unknown): import("../../../index.ts").CellFormatter<any, any> | undefined;
@@ -54,7 +54,7 @@ export function buildFieldDefinitions(meta, data, excludedFlag, excluded) {
54
54
  default: resolveDefault(m, data),
55
55
  options: resolveOptions(m, data),
56
56
  dependentOptions: m.dependentOptions
57
- ? (record) => m.dependentOptions(data, record)
57
+ ? (record, parent) => m.dependentOptions(data, record, parent)
58
58
  : undefined,
59
59
  search: m.search,
60
60
  disabled: m.disabled,
@@ -72,6 +72,8 @@ export function buildFieldDefinitions(meta, data, excludedFlag, excluded) {
72
72
  rows: m.rows,
73
73
  fields: m.fields ? buildFieldDefinitions(m.fields, data, excludedFlag, new Set()) : undefined,
74
74
  itemLabel: m.itemLabel,
75
+ revalidate: m.revalidate,
76
+ dependsOn: m.dependsOn,
75
77
  defaultExpanded: m.defaultExpanded,
76
78
  row: m.row,
77
79
  actions: m.actions
@@ -1,3 +1,3 @@
1
- import type { FieldDefinition } from '../../../types/crud.js';
1
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
2
  import type { RuneforgeStrings } from '../../../i18n/types.js';
3
3
  export declare function validateAll<T extends object = Record<string, unknown>>(fields: FieldDefinition<T>[], formData: FormData, strings: RuneforgeStrings): Record<string, string>;
@@ -9,7 +9,8 @@
9
9
  import { validateAll } from '../utils/validation.js';
10
10
  import { groupFields } from '../utils/grouping.js';
11
11
  import { applyDuplicateOmit, emptyRecord, seedRecord } from '../utils/embedded.js';
12
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
12
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
13
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
13
14
  import { getStrings } from '../../../i18n/context.js';
14
15
 
15
16
  const strings = getStrings();
@@ -1,4 +1,5 @@
1
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
1
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
3
  declare function $$render<T extends object = Record<string, unknown>>(): {
3
4
  props: {
4
5
  labelOne?: string;
@@ -7,7 +7,8 @@
7
7
  import { getIconSet } from '../../../icons/context.js';
8
8
  import { defaultIconSet } from '../../../icons/sets/default.js';
9
9
  import { groupFields } from '../utils/grouping.js';
10
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
10
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
11
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
11
12
  import { getStrings } from '../../../i18n/context.js';
12
13
 
13
14
  const strings = getStrings();
@@ -87,11 +88,11 @@
87
88
  {#if row.length > 1}
88
89
  <div class="flex flex-col gap-4 md:flex-row">
89
90
  {#each row as field (field.attribute)}
90
- <Field {field} {record} readonly class="md:min-w-0 md:flex-1" />
91
+ <Field {field} bind:record readonly class="md:min-w-0 md:flex-1" />
91
92
  {/each}
92
93
  </div>
93
94
  {:else}
94
- <Field field={row[0]} {record} readonly />
95
+ <Field field={row[0]} bind:record readonly />
95
96
  {/if}
96
97
  {/each}
97
98
  </div>
@@ -101,11 +102,11 @@
101
102
  {#if row.length > 1}
102
103
  <div class="flex flex-col gap-4 md:flex-row">
103
104
  {#each row as field (field.attribute)}
104
- <Field {field} {record} readonly class="md:min-w-0 md:flex-1" />
105
+ <Field {field} bind:record readonly class="md:min-w-0 md:flex-1" />
105
106
  {/each}
106
107
  </div>
107
108
  {:else}
108
- <Field field={row[0]} {record} readonly />
109
+ <Field field={row[0]} bind:record readonly />
109
110
  {/if}
110
111
  {/each}
111
112
  {/if}
@@ -1,4 +1,5 @@
1
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
1
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
3
  declare function $$render<T extends object = Record<string, unknown>>(): {
3
4
  props: {
4
5
  labelOne?: string;
@@ -9,7 +9,8 @@
9
9
  import { validateAll } from '../utils/validation.js';
10
10
  import { groupFields } from '../utils/grouping.js';
11
11
  import { applyDuplicateOmit, seedRecord } from '../utils/embedded.js';
12
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
12
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
13
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
13
14
  import { getStrings } from '../../../i18n/context.js';
14
15
 
15
16
  const strings = getStrings();
@@ -1,4 +1,5 @@
1
- import type { ActionConfiguration, FieldDefinition } from '../../../types/crud.js';
1
+ import type { ActionConfiguration } from '../../../types/crud/actions.js';
2
+ import type { FieldDefinition } from '../../../types/crud/fields.js';
2
3
  declare function $$render<T extends object = Record<string, unknown>>(): {
3
4
  props: {
4
5
  labelOne?: string;
@@ -7,13 +7,13 @@
7
7
  import { computeReorderChanges } from '../../utils/reorder.js';
8
8
  import type {
9
9
  ActionConfiguration,
10
- ColumnDefinition,
11
10
  CustomAction,
12
11
  CustomBulkAction,
13
12
  ListActions,
14
- ListConfig,
15
13
  ViewBasedCustomBulkAction
16
- } from '../../../../types/crud.js';
14
+ } from '../../../../types/crud/actions.js';
15
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
16
+ import type { ListConfig } from '../../../../types/crud/list-config.js';
17
17
  import type {
18
18
  FilterSnapshot,
19
19
  ServerPagination,
@@ -1,4 +1,6 @@
1
- import type { ActionConfiguration, ColumnDefinition, CustomAction, ListActions, ListConfig, ViewBasedCustomBulkAction } from '../../../../types/crud.js';
1
+ import type { ActionConfiguration, CustomAction, ListActions, ViewBasedCustomBulkAction } from '../../../../types/crud/actions.js';
2
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
3
+ import type { ListConfig } from '../../../../types/crud/list-config.js';
2
4
  import type { FilterSnapshot, ServerPagination, SortDirection, TableQuery } from '../../../../types/table.js';
3
5
  declare function $$render<T extends object = Record<string, unknown>>(): {
4
6
  props: {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" generics="T extends object = Record<string, unknown>">
2
2
  import Button from '../../../form/Button.svelte';
3
3
  import Modal from '../../../Modal.svelte';
4
- import type { CustomBulkAction } from '../../../../types/crud.js';
4
+ import type { CustomBulkAction } from '../../../../types/crud/actions.js';
5
5
  import { getStrings } from '../../../../i18n/context.js';
6
6
 
7
7
  const strings = getStrings();
@@ -1,4 +1,4 @@
1
- import type { CustomBulkAction } from '../../../../types/crud.js';
1
+ import type { CustomBulkAction } from '../../../../types/crud/actions.js';
2
2
  declare function $$render<T extends object = Record<string, unknown>>(): {
3
3
  props: {
4
4
  deleteLabel?: string;
@@ -4,12 +4,9 @@
4
4
  import PaginatedTable from '../../../table/PaginatedTable.svelte';
5
5
  import { getIconSet } from '../../../../icons/context.js';
6
6
  import { defaultIconSet } from '../../../../icons/sets/default.js';
7
- import type {
8
- ColumnDefinition,
9
- CustomAction,
10
- ReorderConfiguration,
11
- RowAction
12
- } from '../../../../types/crud.js';
7
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
8
+ import type { CustomAction, RowAction } from '../../../../types/crud/actions.js';
9
+ import type { ReorderConfiguration } from '../../../../types/crud/reorder.js';
13
10
  import type {
14
11
  FilterSnapshot,
15
12
  ServerPagination,
@@ -1,5 +1,7 @@
1
1
  import { SvelteSet } from 'svelte/reactivity';
2
- import type { ColumnDefinition, CustomAction, ReorderConfiguration } from '../../../../types/crud.js';
2
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
3
+ import type { CustomAction } from '../../../../types/crud/actions.js';
4
+ import type { ReorderConfiguration } from '../../../../types/crud/reorder.js';
3
5
  import type { FilterSnapshot, ServerPagination, SortDirection, TableQuery } from '../../../../types/table.js';
4
6
  declare function $$render<T extends object = Record<string, unknown>>(): {
5
7
  props: {
@@ -6,12 +6,11 @@
6
6
  import { defaultIconSet } from '../../../../icons/sets/default.js';
7
7
  import type {
8
8
  ActionConfiguration,
9
- ColumnDefinition,
10
9
  CustomBulkAction,
11
- ExportConfiguration,
12
- SearchConfiguration,
13
10
  ViewBasedCustomBulkAction
14
- } from '../../../../types/crud.js';
11
+ } from '../../../../types/crud/actions.js';
12
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
13
+ import type { ExportConfiguration, SearchConfiguration } from '../../../../types/crud/list-config.js';
15
14
  import type { ServerPagination, TableQuery } from '../../../../types/table.js';
16
15
  import { getStrings } from '../../../../i18n/context.js';
17
16
  import SearchInput from '../../SearchInput.svelte';
@@ -1,4 +1,6 @@
1
- import type { ActionConfiguration, ColumnDefinition, CustomBulkAction, ExportConfiguration, SearchConfiguration } from '../../../../types/crud.js';
1
+ import type { ActionConfiguration, CustomBulkAction } from '../../../../types/crud/actions.js';
2
+ import type { ColumnDefinition } from '../../../../types/crud/columns.js';
3
+ import type { ExportConfiguration, SearchConfiguration } from '../../../../types/crud/list-config.js';
2
4
  import type { ServerPagination, TableQuery } from '../../../../types/table.js';
3
5
  declare function $$render<T extends object = Record<string, unknown>>(): {
4
6
  props: {
@@ -13,7 +13,7 @@
13
13
  });
14
14
  import type { DistinctEntry } from '../../types/table.js';
15
15
  import type { FilterState } from './state.svelte.js';
16
- import type { ColumnDefinition } from '../../types/crud.js';
16
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
17
17
 
18
18
  let {
19
19
  column,
@@ -1,6 +1,6 @@
1
1
  import type { DistinctEntry } from '../../types/table.js';
2
2
  import type { FilterState } from './state.svelte.js';
3
- import type { ColumnDefinition } from '../../types/crud.js';
3
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
4
4
  declare function $$render<T extends object>(): {
5
5
  props: {
6
6
  column: ColumnDefinition<T>;
@@ -17,7 +17,7 @@
17
17
  TableQuery
18
18
  } from '../../types/table.js';
19
19
  import { tick, type Snippet } from 'svelte';
20
- import type { ColumnDefinition } from '../../types/crud.js';
20
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
21
21
  import { getStrings } from '../../i18n/context.js';
22
22
 
23
23
  const strings = getStrings();
@@ -1,7 +1,7 @@
1
1
  import { SvelteSet } from 'svelte/reactivity';
2
2
  import type { FilterSnapshot, ReorderOptions, ServerPagination, SortDirection, TableQuery } from '../../types/table.js';
3
3
  import { type Snippet } from 'svelte';
4
- import type { ColumnDefinition } from '../../types/crud.js';
4
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
5
5
  declare function $$render<T extends object = Record<string, unknown>>(): {
6
6
  props: {
7
7
  data?: T[];
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" generics="T extends object">
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { SvelteSet } from 'svelte/reactivity';
4
- import type { ColumnDefinition } from '../../types/crud.js';
4
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
5
5
  import type { IndexedRow, ReorderOptions } from '../../types/table.js';
6
6
  import { sortableRows, type SortEndIndices } from './sortable.js';
7
7
  import { moveIndexedRows } from './utils.js';
@@ -1,6 +1,6 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { SvelteSet } from 'svelte/reactivity';
3
- import type { ColumnDefinition } from '../../types/crud.js';
3
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
4
4
  import type { IndexedRow, ReorderOptions } from '../../types/table.js';
5
5
  declare function $$render<T extends object>(): {
6
6
  props: {
@@ -3,7 +3,7 @@
3
3
  import ColumnFilter from './ColumnFilter.svelte';
4
4
  import { isSortable, isFilterable } from './utils.js';
5
5
  import type { DistinctEntry } from '../../types/table.js';
6
- import type { ColumnDefinition } from '../../types/crud.js';
6
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
7
7
  import type { SortState, FilterState } from './state.svelte.js';
8
8
  import { getStrings } from '../../i18n/context.js';
9
9
 
@@ -1,5 +1,5 @@
1
1
  import type { DistinctEntry } from '../../types/table.js';
2
- import type { ColumnDefinition } from '../../types/crud.js';
2
+ import type { ColumnDefinition } from '../../types/crud/columns.js';
3
3
  import type { SortState, FilterState } from './state.svelte.js';
4
4
  declare function $$render<T extends object>(): {
5
5
  props: {