@dosgato/dialog 0.0.43 → 0.0.44

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.
@@ -1,12 +1,15 @@
1
- <script>import { Field, nullableSerialize, nullableDeserialize, FormStore, FORM_CONTEXT } from '@txstate-mws/svelte-forms';
1
+ <script>import { Field, nullableSerialize, nullableDeserialize, FormStore, FORM_CONTEXT, FORM_INHERITED_PATH } from '@txstate-mws/svelte-forms';
2
2
  import { getContext } from 'svelte';
3
+ import { isNotBlank } from 'txstate-utils';
3
4
  export let id = undefined;
4
5
  export let path;
5
6
  export let value = '';
6
7
  export let notNull = false;
7
8
  export let conditional = undefined;
8
9
  const store = getContext(FORM_CONTEXT);
9
- $: store.setField(path, value);
10
+ const inheritedPath = getContext(FORM_INHERITED_PATH);
11
+ const finalPath = [inheritedPath, path].filter(isNotBlank).join('.');
12
+ $: store.setField(finalPath, value);
10
13
  </script>
11
14
 
12
15
  <Field {path} {conditional} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "0.0.43",
4
+ "version": "0.0.44",
5
5
  "dependencies": {
6
6
  "@txstate-mws/svelte-components": "^1.3.9",
7
7
  "@txstate-mws/svelte-forms": "^1.3.4",