diff --git a/frontend/viewer/src/lib/components/editor/field/field-root.svelte b/frontend/viewer/src/lib/components/editor/field/field-root.svelte
index 8312c63cc7..d16579b508 100644
--- a/frontend/viewer/src/lib/components/editor/field/field-root.svelte
+++ b/frontend/viewer/src/lib/components/editor/field/field-root.svelte
@@ -1,6 +1,6 @@
-
-
-
+
+
+
onFieldChanged('lexemeForm')}
@@ -58,8 +60,8 @@
-
-
+
+
onFieldChanged('citationForm')}
@@ -70,8 +72,8 @@
{#if !modalMode}
-
-
+
+
onFieldChanged('complexForms')}
bind:value={entry.complexForms}
@@ -80,8 +82,8 @@
-
-
+
+
onFieldChanged('components')}
@@ -91,8 +93,8 @@
-
-
+
+
onFieldChanged('complexFormTypes')}
@@ -106,8 +108,8 @@
{/if}
-
-
+
+
onFieldChanged('literalMeaning')}
@@ -117,8 +119,8 @@
-
-
+
+
onFieldChanged('note')}
@@ -128,8 +130,8 @@
-
-
+
+
onFieldChanged('publishIn')}
diff --git a/frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte b/frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte
index bbae01813b..627e74f397 100644
--- a/frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte
+++ b/frontend/viewer/src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte
@@ -3,7 +3,7 @@
import {objectTemplateAreas, useCurrentView} from '$lib/views/view-service';
import * as Editor from '$lib/components/editor';
import {asString, useWritingSystemService} from '$project/data';
- import {fieldData, type FieldId} from '../field-data';
+ import {fieldData, type ExampleFieldId} from '../../views/fields';
import {cn, draftTranslation, isDraft} from '$lib/utils';
import {vt} from '$lib/views/view-text';
import {t} from 'svelte-i18n-lingui';
@@ -15,7 +15,7 @@
interface Props extends Omit {
example: IExampleSentence;
readonly?: boolean;
- onchange?: (sense: IExampleSentence, field: FieldId) => void;
+ onchange?: (sense: IExampleSentence, field: ExampleFieldId) => void;
}
const {
@@ -29,14 +29,16 @@
const currentView = useCurrentView();
initSubjectContext(() => example);
- function onFieldChanged(field: FieldId) {
+ function onFieldChanged(field: ExampleFieldId) {
onchange?.(example, field);
}
+
+ const fields = $derived($currentView.fields.example);
-
-
-
+
+
+
onFieldChanged('sentence')}
@@ -46,11 +48,11 @@
-
+
{#each (example.translations.length ? example.translations : [draftTranslation(example)]) as translation, i (translation.id)}
{@const title = example.translations.length > 1 ? vt($t`Translation ${i + 1}`) : vt($t`Translation`)}
-
+
{
@@ -68,8 +70,8 @@
{#if writingSystemService.defaultAnalysis}
-
-
+
+
onFieldChanged('reference')}
diff --git a/frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte b/frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte
index 8d9d54adcc..d2e20f0afb 100644
--- a/frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte
+++ b/frontend/viewer/src/lib/entry-editor/object-editors/SenseEditorPrimitive.svelte
@@ -11,12 +11,12 @@
import {mergeProps} from 'bits-ui';
import type {Snippet} from 'svelte';
import {t} from 'svelte-i18n-lingui';
- import {fieldData, type FieldId} from '../field-data';
+ import {fieldData, type SenseFieldId} from '../../views/fields';
interface Props extends Omit {
sense: ISense;
readonly?: boolean;
- onchange?: (sense: ISense, field: FieldId) => void;
+ onchange?: (sense: ISense, field: SenseFieldId) => void;
partOfSpeechDescription?: Snippet;
semanticDomainsDescription?: Snippet;
};
@@ -35,14 +35,16 @@
const semanticDomains = useSemanticDomains();
const currentView = useCurrentView();
initSubjectContext(() => sense);
- function onFieldChanged(field: FieldId) {
+ function onFieldChanged(field: SenseFieldId) {
onchange?.(sense, field);
}
+
+ const fields = $derived($currentView.fields.sense);
-
-
-
+
+
+
onFieldChanged('gloss')}
@@ -52,8 +54,8 @@
-
-
+
+
onFieldChanged('definition')}
@@ -63,8 +65,8 @@
-
-
+
+
-
-
+
+
onFieldChanged('semanticDomains')}
diff --git a/frontend/viewer/src/lib/sandbox/EditorSandbox.svelte b/frontend/viewer/src/lib/sandbox/EditorSandbox.svelte
index ff6c48f5db..5ac5d8b4c2 100644
--- a/frontend/viewer/src/lib/sandbox/EditorSandbox.svelte
+++ b/frontend/viewer/src/lib/sandbox/EditorSandbox.svelte
@@ -4,13 +4,13 @@
import MultiSelect from '$lib/components/field-editors/multi-select.svelte';
import Select from '$lib/components/field-editors/select.svelte';
import LcmRichTextEditor from '$lib/components/lcm-rich-text-editor/lcm-rich-text-editor.svelte';
- import { ResizablePaneGroup, ResizablePane, ResizableHandle } from '$lib/components/ui/resizable';
- import { Switch } from '$lib/components/ui/switch';
- import { Tabs, TabsList, TabsTrigger } from '$lib/components/ui/tabs';
+ import {ResizablePaneGroup, ResizablePane, ResizableHandle} from '$lib/components/ui/resizable';
+ import {Switch} from '$lib/components/ui/switch';
+ import {Tabs, TabsList, TabsTrigger} from '$lib/components/ui/tabs';
import {writingSystems} from '$project/demo/demo-entry-data';
import {type IMultiString} from '$lib/dotnet-types';
import {type IRichString} from '$lib/dotnet-types/generated-types/MiniLcm/Models/IRichString';
- import { fieldData } from '$lib/entry-editor/field-data';
+ import {fieldData} from '$lib/views/fields';
import ViewPicker from '../../project/browse/EditorViewOptions.svelte';
import WsInput from '$lib/components/field-editors/ws-input.svelte';
import {vt} from '$lib/views/view-text';
@@ -131,7 +131,7 @@
onChange('note')} />
@@ -160,7 +160,7 @@