Skip to content

Commit ff0d4c2

Browse files
web-forms (Vue UI): move shared-state dir into lib
This addresses the type errors without making more baffling changes to the even more baffling TypeScript config for this package. Obviously even if we want a change like this, we want more thought into how it’s structured than “lib/shared-state” but… gotta make progress!
1 parent edf3b48 commit ff0d4c2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

packages/web-forms/src/components/OdkWebForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
initializeFormResultState,
44
initializeInstanceState,
55
instanceState,
6-
} from '@/shared-state/form-state.ts';
6+
} from '@/lib/shared-state/form-state.ts';
77
import type {
88
ChunkedInstancePayload,
99
FetchFormAttachment,

packages/web-forms/src/demo/FormPreview.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { resetInstanceState } from '@/shared-state/form-state.ts';
2+
import { resetInstanceState } from '@/lib/shared-state/form-state.ts';
33
import { xformFixturesByCategory, XFormResource } from '@getodk/common/fixtures/xforms.ts';
44
import type {
55
ChunkedInstancePayload,
@@ -11,7 +11,7 @@ import { constants as ENGINE_CONSTANTS } from '@getodk/xforms-engine';
1111
import { ref } from 'vue';
1212
import { useRoute } from 'vue-router';
1313
import OdkWebForm from '../components/OdkWebForm.vue';
14-
import { cacheInstance } from '../shared-state/instance-cache-state.ts';
14+
import { cacheInstance } from '../lib/shared-state/instance-cache-state.ts';
1515
import FeedbackButton from './FeedbackButton.vue';
1616
import InstanceCache from './InstanceCache.vue';
1717

packages/web-forms/src/demo/InstanceCache.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<script setup lang="ts">
22
import PrimeButton from 'primevue/button';
3-
import type { AnyInstance, InstantiableFormResult } from '../shared-state/form-state.ts';
4-
import { instantiableFormResult, restoreInstanceState } from '../shared-state/form-state.ts';
5-
import type { InstanceCacheItem } from '../shared-state/instance-cache-state.ts';
3+
import type { AnyInstance, InstantiableFormResult } from '../lib/shared-state/form-state.ts';
4+
import { instantiableFormResult, restoreInstanceState } from '../lib/shared-state/form-state.ts';
5+
import type { InstanceCacheItem } from '../lib/shared-state/instance-cache-state.ts';
66
import {
77
clearCache,
88
evictCachedInstance,
99
instanceCache,
10-
} from '../shared-state/instance-cache-state.ts';
10+
} from '../lib/shared-state/instance-cache-state.ts';
1111
1212
const formatTimeUnit = (timeUnit: number): string => {
1313
return timeUnit.toString().padStart(2, '0');

0 commit comments

Comments
 (0)