@getodk/xforms-engine 0.1.0 → 0.1.1
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/dist/.vite/manifest.json +1 -0
- package/dist/XFormDOM.d.ts +1 -0
- package/dist/XFormDataType.d.ts +2 -1
- package/dist/XFormDefinition.d.ts +1 -0
- package/dist/body/BodyDefinition.d.ts +3 -2
- package/dist/body/BodyElementDefinition.d.ts +5 -4
- package/dist/body/RepeatDefinition.d.ts +4 -3
- package/dist/body/UnsupportedBodyElementDefinition.d.ts +3 -2
- package/dist/body/control/ControlDefinition.d.ts +3 -2
- package/dist/body/control/InputDefinition.d.ts +1 -0
- package/dist/body/control/select/ItemDefinition.d.ts +4 -3
- package/dist/body/control/select/ItemsetDefinition.d.ts +4 -3
- package/dist/body/control/select/ItemsetNodesetContext.d.ts +3 -2
- package/dist/body/control/select/ItemsetNodesetExpression.d.ts +2 -1
- package/dist/body/control/select/ItemsetValueExpression.d.ts +2 -1
- package/dist/body/control/select/SelectDefinition.d.ts +5 -4
- package/dist/body/group/BaseGroupDefinition.d.ts +5 -4
- package/dist/body/group/LogicalGroupDefinition.d.ts +1 -0
- package/dist/body/group/PresentationGroupDefinition.d.ts +3 -2
- package/dist/body/group/RepeatGroupDefinition.d.ts +3 -2
- package/dist/body/group/StructuralGroupDefinition.d.ts +1 -0
- package/dist/body/text/HintDefinition.d.ts +4 -4
- package/dist/body/text/LabelDefinition.d.ts +7 -7
- package/dist/body/text/TextElementDefinition.d.ts +8 -7
- package/dist/body/text/TextElementOutputPart.d.ts +2 -1
- package/dist/body/text/TextElementPart.d.ts +5 -4
- package/dist/body/text/TextElementReferencePart.d.ts +2 -1
- package/dist/body/text/TextElementStaticPart.d.ts +2 -1
- package/dist/client/BaseNode.d.ts +4 -3
- package/dist/client/EngineConfig.d.ts +2 -1
- package/dist/client/GroupNode.d.ts +6 -5
- package/dist/client/RepeatInstanceNode.d.ts +7 -6
- package/dist/client/RepeatRangeNode.d.ts +7 -6
- package/dist/client/RootNode.d.ts +5 -4
- package/dist/client/SelectNode.d.ts +7 -6
- package/dist/client/StringNode.d.ts +6 -5
- package/dist/client/SubtreeNode.d.ts +5 -4
- package/dist/client/TextRange.d.ts +2 -1
- package/dist/client/hierarchy.d.ts +9 -8
- package/dist/client/index.d.ts +3 -2
- package/dist/expression/DependencyContext.d.ts +2 -1
- package/dist/expression/DependentExpression.d.ts +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1263 -1394
- package/dist/index.js.map +1 -1
- package/dist/instance/Group.d.ts +13 -13
- package/dist/instance/RepeatInstance.d.ts +14 -14
- package/dist/instance/RepeatRange.d.ts +16 -17
- package/dist/instance/Root.d.ts +17 -16
- package/dist/instance/SelectField.d.ts +16 -16
- package/dist/instance/StringField.d.ts +16 -16
- package/dist/instance/Subtree.d.ts +12 -12
- package/dist/instance/abstract/DescendantNode.d.ts +14 -14
- package/dist/instance/abstract/InstanceNode.d.ts +18 -17
- package/dist/instance/children.d.ts +2 -1
- package/dist/instance/hierarchy.d.ts +8 -7
- package/dist/instance/index.d.ts +4 -3
- package/dist/instance/internal-api/EvaluationContext.d.ts +5 -4
- package/dist/instance/internal-api/InstanceConfig.d.ts +3 -2
- package/dist/instance/internal-api/SubscribableDependency.d.ts +2 -1
- package/dist/instance/internal-api/TranslationContext.d.ts +2 -1
- package/dist/instance/internal-api/ValueContext.d.ts +4 -3
- package/dist/instance/resource.d.ts +3 -2
- package/dist/instance/text/TextChunk.d.ts +4 -3
- package/dist/instance/text/TextRange.d.ts +2 -1
- package/dist/lib/dom/query.d.ts +3 -2
- package/dist/lib/reactivity/createChildrenState.d.ts +4 -3
- package/dist/lib/reactivity/createComputedExpression.d.ts +4 -3
- package/dist/lib/reactivity/createSelectItems.d.ts +4 -3
- package/dist/lib/reactivity/createValueState.d.ts +3 -2
- package/dist/lib/reactivity/materializeCurrentStateChildren.d.ts +4 -3
- package/dist/lib/reactivity/node-state/createClientState.d.ts +7 -6
- package/dist/lib/reactivity/node-state/createCurrentState.d.ts +5 -4
- package/dist/lib/reactivity/node-state/createEngineState.d.ts +4 -3
- package/dist/lib/reactivity/node-state/createSharedNodeState.d.ts +7 -6
- package/dist/lib/reactivity/node-state/createSpecifiedPropertyDescriptor.d.ts +2 -1
- package/dist/lib/reactivity/node-state/createSpecifiedState.d.ts +3 -2
- package/dist/lib/reactivity/node-state/representations.d.ts +2 -1
- package/dist/lib/reactivity/scope.d.ts +2 -1
- package/dist/lib/reactivity/text/createFieldHint.d.ts +4 -3
- package/dist/lib/reactivity/text/createNodeLabel.d.ts +4 -3
- package/dist/lib/reactivity/text/createTextRange.d.ts +6 -5
- package/dist/lib/reactivity/types.d.ts +2 -1
- package/dist/lib/xpath/analysis.d.ts +2 -1
- package/dist/model/BindComputation.d.ts +2 -1
- package/dist/model/BindDefinition.d.ts +6 -5
- package/dist/model/DescendentNodeDefinition.d.ts +6 -5
- package/dist/model/ModelBindMap.d.ts +4 -3
- package/dist/model/ModelDefinition.d.ts +2 -1
- package/dist/model/NodeDefinition.d.ts +10 -9
- package/dist/model/RepeatInstanceDefinition.d.ts +3 -2
- package/dist/model/RepeatSequenceDefinition.d.ts +3 -2
- package/dist/model/RepeatTemplateDefinition.d.ts +4 -3
- package/dist/model/RootDefinition.d.ts +5 -4
- package/dist/model/SubtreeDefinition.d.ts +4 -3
- package/dist/model/ValueNodeDefinition.d.ts +5 -4
- package/dist/solid.js +1253 -1387
- package/dist/solid.js.map +1 -1
- package/package.json +14 -18
package/dist/instance/Group.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { GroupDefinition, GroupNode } from '../client/GroupNode.ts';
|
|
3
|
+
import { TextRange } from '../index.ts';
|
|
4
|
+
import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateChildren.ts';
|
|
5
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
6
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
7
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
8
|
+
import { DescendantNodeSharedStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
9
|
+
import { GeneralChildNode, GeneralParentNode } from './hierarchy.ts';
|
|
10
|
+
import { NodeID } from './identity.ts';
|
|
11
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
12
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
13
|
+
|
|
14
14
|
interface GroupStateSpec extends DescendantNodeSharedStateSpec {
|
|
15
15
|
readonly label: Accessor<TextRange<'label'> | null>;
|
|
16
16
|
readonly hint: null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { RepeatDefinition, RepeatInstanceNode } from '../client/RepeatInstanceNode.ts';
|
|
3
|
+
import { TextRange } from '../index.ts';
|
|
4
|
+
import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateChildren.ts';
|
|
5
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
6
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
7
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
8
|
+
import { RepeatRange } from './RepeatRange.ts';
|
|
9
|
+
import { DescendantNodeSharedStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
10
|
+
import { AnyChildNode, GeneralChildNode } from './hierarchy.ts';
|
|
11
|
+
import { NodeID } from './identity.ts';
|
|
12
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
13
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
14
|
+
|
|
15
15
|
export type { RepeatDefinition };
|
|
16
16
|
interface RepeatInstanceStateSpec extends DescendantNodeSharedStateSpec {
|
|
17
17
|
readonly label: Accessor<TextRange<'label'> | null>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
import type { TextRange } from './text/TextRange.ts';
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { RepeatRangeNode } from '../client/RepeatRangeNode.ts';
|
|
3
|
+
import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateChildren.ts';
|
|
4
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
5
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
6
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
7
|
+
import { RepeatSequenceDefinition } from '../model/RepeatSequenceDefinition.ts';
|
|
8
|
+
import { RepeatDefinition, RepeatInstance } from './RepeatInstance.ts';
|
|
9
|
+
import { Root } from './Root.ts';
|
|
10
|
+
import { DescendantNodeSharedStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
11
|
+
import { GeneralParentNode } from './hierarchy.ts';
|
|
12
|
+
import { NodeID } from './identity.ts';
|
|
13
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
14
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
15
|
+
import { TextRange } from './text/TextRange.ts';
|
|
16
|
+
|
|
18
17
|
interface RepeatRangeStateSpec extends DescendantNodeSharedStateSpec {
|
|
19
18
|
readonly hint: null;
|
|
20
19
|
readonly label: Accessor<TextRange<'label'> | null>;
|
package/dist/instance/Root.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
|
+
import { Accessor, Signal } from 'solid-js';
|
|
3
|
+
import { XFormDOM } from '../XFormDOM.ts';
|
|
4
|
+
import { ActiveLanguage, FormLanguage, FormLanguages } from '../client/FormLanguage.ts';
|
|
5
|
+
import { RootNode } from '../client/RootNode.ts';
|
|
6
|
+
import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateChildren.ts';
|
|
7
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
8
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
9
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
10
|
+
import { RootDefinition } from '../model/RootDefinition.ts';
|
|
11
11
|
import { InstanceNode } from './abstract/InstanceNode.ts';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
12
|
+
import { GeneralChildNode } from './hierarchy.ts';
|
|
13
|
+
import { NodeID } from './identity.ts';
|
|
14
|
+
import { EvaluationContext, EvaluationContextRoot } from './internal-api/EvaluationContext.ts';
|
|
15
|
+
import { InstanceConfig } from './internal-api/InstanceConfig.ts';
|
|
16
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
17
|
+
import { TranslationContext } from './internal-api/TranslationContext.ts';
|
|
18
|
+
|
|
18
19
|
interface RootStateSpec {
|
|
19
20
|
readonly reference: string;
|
|
20
21
|
readonly readonly: boolean;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { AnySelectDefinition } from '../body/control/select/SelectDefinition.ts';
|
|
3
|
+
import { SelectItem, SelectNode } from '../client/SelectNode.ts';
|
|
4
|
+
import { TextRange } from '../index.ts';
|
|
5
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
6
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
7
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
8
|
+
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
9
|
+
import { ValueNodeDefinition } from '../model/ValueNodeDefinition.ts';
|
|
10
|
+
import { Root } from './Root.ts';
|
|
11
|
+
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
12
|
+
import { GeneralParentNode } from './hierarchy.ts';
|
|
13
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
14
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
15
|
+
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
16
|
+
|
|
17
17
|
export interface SelectFieldDefinition extends ValueNodeDefinition {
|
|
18
18
|
readonly bodyElement: AnySelectDefinition;
|
|
19
19
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { InputDefinition } from '../body/control/InputDefinition.ts';
|
|
3
|
+
import { StringNode } from '../client/StringNode.ts';
|
|
4
|
+
import { TextRange } from '../index.ts';
|
|
5
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
6
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
7
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
8
|
+
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
9
|
+
import { ValueNodeDefinition } from '../model/ValueNodeDefinition.ts';
|
|
10
|
+
import { Root } from './Root.ts';
|
|
11
|
+
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
12
|
+
import { GeneralParentNode } from './hierarchy.ts';
|
|
13
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
14
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
15
|
+
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
16
|
+
|
|
17
17
|
export interface StringFieldDefinition extends ValueNodeDefinition {
|
|
18
18
|
readonly bodyElement: InputDefinition | null;
|
|
19
19
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { SubtreeDefinition, SubtreeNode } from '../client/SubtreeNode.ts';
|
|
3
|
+
import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateChildren.ts';
|
|
4
|
+
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
5
|
+
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
6
|
+
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
7
|
+
import { DescendantNodeSharedStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
8
|
+
import { GeneralChildNode, GeneralParentNode } from './hierarchy.ts';
|
|
9
|
+
import { NodeID } from './identity.ts';
|
|
10
|
+
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
11
|
+
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
12
|
+
|
|
13
13
|
interface SubtreeStateSpec extends DescendantNodeSharedStateSpec {
|
|
14
14
|
readonly label: null;
|
|
15
15
|
readonly hint: null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
|
+
import { Accessor } from 'solid-js';
|
|
3
|
+
import { BaseNode } from '../../client/BaseNode.ts';
|
|
4
|
+
import { AnyDescendantNodeDefinition } from '../../model/DescendentNodeDefinition.ts';
|
|
5
|
+
import { AnyNodeDefinition } from '../../model/NodeDefinition.ts';
|
|
6
|
+
import { RepeatInstanceDefinition } from '../../model/RepeatInstanceDefinition.ts';
|
|
7
|
+
import { ValueNodeDefinition } from '../../model/ValueNodeDefinition.ts';
|
|
8
|
+
import { RepeatRange } from '../RepeatRange.ts';
|
|
9
|
+
import { Root } from '../Root.ts';
|
|
10
|
+
import { AnyChildNode, GeneralParentNode } from '../hierarchy.ts';
|
|
11
|
+
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
12
|
+
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
13
|
+
import { InstanceNodeStateSpec, InstanceNode } from './InstanceNode.ts';
|
|
14
|
+
|
|
15
15
|
export interface DescendantNodeSharedStateSpec {
|
|
16
16
|
readonly reference: Accessor<string>;
|
|
17
17
|
readonly readonly: Accessor<boolean>;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
1
|
+
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
|
+
import { Accessor, Signal } from 'solid-js';
|
|
3
|
+
import { BaseNode } from '../../client/BaseNode.ts';
|
|
4
|
+
import { InstanceNodeType } from '../../client/node-types.ts';
|
|
5
|
+
import { TextRange } from '../../index.ts';
|
|
6
|
+
import { CurrentState } from '../../lib/reactivity/node-state/createCurrentState.ts';
|
|
7
|
+
import { EngineState } from '../../lib/reactivity/node-state/createEngineState.ts';
|
|
8
|
+
import { SharedNodeState } from '../../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
9
|
+
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
10
|
+
import { SimpleAtomicState } from '../../lib/reactivity/types.ts';
|
|
11
|
+
import { AnyNodeDefinition } from '../../model/NodeDefinition.ts';
|
|
12
|
+
import { Root } from '../Root.ts';
|
|
13
|
+
import { AnyChildNode, AnyNode, AnyParentNode } from '../hierarchy.ts';
|
|
14
|
+
import { NodeID } from '../identity.ts';
|
|
15
|
+
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
16
|
+
import { InstanceConfig } from '../internal-api/InstanceConfig.ts';
|
|
17
|
+
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
18
|
+
|
|
18
19
|
export interface InstanceNodeStateSpec<Value = never> {
|
|
19
20
|
readonly reference: Accessor<string> | string;
|
|
20
21
|
readonly readonly: Accessor<boolean> | boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { Group } from './Group.ts';
|
|
2
|
+
import { RepeatInstance } from './RepeatInstance.ts';
|
|
3
|
+
import { RepeatRange } from './RepeatRange.ts';
|
|
4
|
+
import { Root } from './Root.ts';
|
|
5
|
+
import { SelectField } from './SelectField.ts';
|
|
6
|
+
import { StringField } from './StringField.ts';
|
|
7
|
+
import { Subtree } from './Subtree.ts';
|
|
8
|
+
|
|
8
9
|
export type AnyNode = Root | Group | Subtree | RepeatRange | RepeatInstance | StringField | SelectField;
|
|
9
10
|
export type AnyParentNode = Root | Group | Subtree | RepeatRange | RepeatInstance;
|
|
10
11
|
export type GeneralParentNode = Root | Group | Subtree | RepeatInstance;
|
package/dist/instance/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { RootNode } from '../client/RootNode.ts';
|
|
2
|
+
import { InitializeFormOptions as BaseInitializeFormOptions, FormResource } from '../client/index.ts';
|
|
3
|
+
import { InstanceConfig } from './internal-api/InstanceConfig.ts';
|
|
4
|
+
|
|
4
5
|
interface InitializeFormOptions extends BaseInitializeFormOptions {
|
|
5
6
|
readonly config: Partial<InstanceConfig>;
|
|
6
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
|
+
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
3
|
+
import { SubscribableDependency } from './SubscribableDependency.ts';
|
|
4
|
+
import { TranslationContext } from './TranslationContext.ts';
|
|
5
|
+
|
|
5
6
|
export interface EvaluationContextRoot extends SubscribableDependency, TranslationContext {
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { EngineConfig } from '../../client/EngineConfig.ts';
|
|
2
|
+
import { CreateUniqueId } from '../../lib/unique-id.ts';
|
|
3
|
+
|
|
3
4
|
export interface InstanceConfig extends Required<EngineConfig> {
|
|
4
5
|
/**
|
|
5
6
|
* Uniqueness per form instance session (so e.g. persistence isn't necessary).
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Provides a common interface to explicitly establish a reactive subscription
|
|
4
5
|
* to a form node, regardless of which node-specific details might trigger
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
2
|
+
import { BindComputation } from '../../model/BindComputation.ts';
|
|
3
|
+
import { EvaluationContext } from './EvaluationContext.ts';
|
|
4
|
+
|
|
4
5
|
export type InstanceValue = string;
|
|
5
6
|
interface ValueContextDefinitionBind {
|
|
6
7
|
readonly calculate: BindComputation<'calculate'> | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { FetchResource, FetchResourceResponse } from '../client/EngineConfig.ts';
|
|
2
|
+
import { FormResource } from '../client/index.ts';
|
|
3
|
+
|
|
3
4
|
export type { FetchResource, FetchResourceResponse, FormResource };
|
|
4
5
|
export interface ResourceOptions {
|
|
5
6
|
readonly fetchResource: FetchResource;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ActiveLanguage } from '../../client/FormLanguage.ts';
|
|
2
|
+
import { TextChunk as ClientTextChunk, TextChunkSource } from '../../client/TextRange.ts';
|
|
3
|
+
import { TranslationContext } from '../internal-api/TranslationContext.ts';
|
|
4
|
+
|
|
4
5
|
export declare class TextChunk implements ClientTextChunk {
|
|
5
6
|
readonly context: TranslationContext;
|
|
6
7
|
readonly source: TextChunkSource;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TextRange as ClientTextRange, TextChunk } from '../../client/TextRange.ts';
|
|
2
|
+
|
|
2
3
|
export type TextRole = 'hint' | 'label';
|
|
3
4
|
export declare class TextRange<Role extends TextRole> implements ClientTextRange<Role> {
|
|
4
5
|
readonly role: Role;
|
package/dist/lib/dom/query.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { KnownAttributeLocalNamedElement, LocalNamedElement } from '../../../../common/types/dom.ts';
|
|
2
|
+
import { SelectElement } from '../../body/control/select/SelectDefinition';
|
|
3
|
+
|
|
3
4
|
export interface HintElement extends LocalNamedElement<'hint'> {
|
|
4
5
|
}
|
|
5
6
|
export interface ItemElement extends LocalNamedElement<'item'> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Accessor, Setter, Signal } from 'solid-js';
|
|
2
|
+
import { AnyChildNode, AnyParentNode } from '../../instance/hierarchy.ts';
|
|
3
|
+
import { NodeID } from '../../instance/identity.ts';
|
|
4
|
+
|
|
4
5
|
export interface ChildrenState<Child extends AnyChildNode> {
|
|
5
6
|
readonly children: Signal<readonly Child[]>;
|
|
6
7
|
readonly getChildren: Accessor<readonly Child[]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { DependentExpression, DependentExpressionResultType } from '../../expression/DependentExpression.ts';
|
|
3
|
+
import { EvaluationContext } from '../../instance/internal-api/EvaluationContext.ts';
|
|
4
|
+
|
|
4
5
|
interface ComputedExpressionResults {
|
|
5
6
|
readonly boolean: boolean;
|
|
6
7
|
readonly nodes: Node[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { SelectItem } from '../../index.ts';
|
|
3
|
+
import { SelectField } from '../../instance/SelectField.ts';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Creates a reactive computation of a {@link SelectField}'s
|
|
6
7
|
* {@link SelectItem}s, in support of the field's `valueOptions`.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ValueContext } from '../../instance/internal-api/ValueContext.ts';
|
|
2
|
+
import { SimpleAtomicState } from './types.ts';
|
|
3
|
+
|
|
3
4
|
type InitialValueSource = 'FORM_DEFAULT' | 'PRIMARY_INSTANCE';
|
|
4
5
|
export interface ValueStateOptions {
|
|
5
6
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { AnyChildNode } from '../../instance/hierarchy.ts';
|
|
2
|
+
import { NodeID } from '../../instance/identity.ts';
|
|
3
|
+
import { ChildrenState } from './createChildrenState.ts';
|
|
4
|
+
|
|
4
5
|
export interface EncodedParentState {
|
|
5
6
|
readonly children: readonly NodeID[];
|
|
6
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { ShallowMutable } from '../../../../../common/types/helpers.js';
|
|
2
|
+
import { OpaqueReactiveObjectFactory } from '../../../index.ts';
|
|
3
|
+
import { ReactiveScope } from '../scope.ts';
|
|
4
|
+
import { EngineState } from './createEngineState.ts';
|
|
5
|
+
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
6
|
+
import { InternalClientRepresentation } from './representations.ts';
|
|
7
|
+
|
|
7
8
|
export type SpecifiedClientStateFactory<Factory extends OpaqueReactiveObjectFactory, Spec extends StateSpec> = ShallowMutable<SpecifiedState<Spec>> extends Parameters<Factory>[0] ? Factory : never;
|
|
8
9
|
export type ClientState<Spec extends StateSpec> = InternalClientRepresentation<SpecifiedState<Spec>>;
|
|
9
10
|
export declare const createClientState: <Factory extends OpaqueReactiveObjectFactory, Spec extends StateSpec>(scope: ReactiveScope, engineState: EngineState<Spec>, clientStateFactory: SpecifiedClientStateFactory<Factory, Spec>) => ClientState<Spec>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ReactiveScope } from '../scope.ts';
|
|
2
|
+
import { ClientState } from './createClientState.ts';
|
|
3
|
+
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
4
|
+
import { ReadonlyClientRepresentation } from './representations.ts';
|
|
5
|
+
|
|
5
6
|
export type CurrentState<Spec extends StateSpec> = ReadonlyClientRepresentation<SpecifiedState<Spec>>;
|
|
6
7
|
export declare const createCurrentState: <Spec extends StateSpec>(scope: ReactiveScope, clientState: ClientState<Spec>) => CurrentState<Spec>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ReactiveScope } from '../scope.ts';
|
|
2
|
+
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
3
|
+
import { EngineRepresentation } from './representations.ts';
|
|
4
|
+
|
|
4
5
|
export type EngineState<Spec extends StateSpec> = EngineRepresentation<SpecifiedState<Spec>>;
|
|
5
6
|
export declare const createEngineState: <Spec extends StateSpec>(scope: ReactiveScope, spec: Spec) => EngineState<Spec>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { OpaqueReactiveObjectFactory } from '../../../index.ts';
|
|
2
|
+
import { ReactiveScope } from '../scope.ts';
|
|
3
|
+
import { ClientState, SpecifiedClientStateFactory } from './createClientState.ts';
|
|
4
|
+
import { CurrentState } from './createCurrentState.ts';
|
|
5
|
+
import { EngineState } from './createEngineState.ts';
|
|
6
|
+
import { MutablePropertySpec, SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
7
|
+
|
|
7
8
|
type MutableKeyOf<Spec extends StateSpec> = {
|
|
8
9
|
[K in string & keyof Spec]: Spec[K] extends MutablePropertySpec<any> ? K : never;
|
|
9
10
|
}[string & keyof Spec];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StatePropertySpec } from './createSpecifiedState.ts';
|
|
2
|
+
|
|
2
3
|
export interface SpecifiedPropertyDescriptor<T = any> extends TypedPropertyDescriptor<T> {
|
|
3
4
|
readonly configurable: true;
|
|
4
5
|
readonly enumerable: true;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Accessor, Signal } from 'solid-js';
|
|
2
|
+
import { SimpleAtomicState } from '../types.ts';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Specifies a state object's property as mutable. Basic usage:
|
|
5
6
|
*
|