@getodk/xforms-engine 0.3.0 → 0.4.0
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/client/BaseNode.d.ts +1 -2
- package/dist/client/EngineConfig.d.ts +0 -1
- package/dist/client/GroupNode.d.ts +2 -3
- package/dist/client/ModelValueNode.d.ts +1 -2
- package/dist/client/NodeAppearances.d.ts +1 -2
- package/dist/client/NoteNode.d.ts +2 -3
- package/dist/client/RootNode.d.ts +2 -3
- package/dist/client/SelectNode.d.ts +2 -3
- package/dist/client/StringNode.d.ts +2 -3
- package/dist/client/SubtreeNode.d.ts +1 -2
- package/dist/client/TextRange.d.ts +3 -4
- package/dist/client/TriggerNode.d.ts +25 -0
- package/dist/client/constants.d.ts +0 -1
- package/dist/client/hierarchy.d.ts +7 -3
- package/dist/client/index.d.ts +0 -1
- package/dist/client/node-types.d.ts +2 -1
- package/dist/client/repeat/BaseRepeatRangeNode.d.ts +1 -2
- package/dist/client/repeat/RepeatInstanceNode.d.ts +2 -3
- package/dist/client/repeat/RepeatRangeControlledNode.d.ts +1 -2
- package/dist/client/repeat/RepeatRangeUncontrolledNode.d.ts +1 -2
- package/dist/client/unsupported/RangeNode.d.ts +9 -0
- package/dist/client/unsupported/RankNode.d.ts +9 -0
- package/dist/client/unsupported/UnsupportedControlNode.d.ts +32 -0
- package/dist/client/unsupported/UploadNode.d.ts +9 -0
- package/dist/client/validation.d.ts +0 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +39029 -37441
- package/dist/index.js.map +1 -1
- package/dist/instance/Group.d.ts +0 -1
- package/dist/instance/ModelValue.d.ts +1 -2
- package/dist/instance/Note.d.ts +1 -2
- package/dist/instance/Root.d.ts +3 -4
- package/dist/instance/SelectField.d.ts +3 -4
- package/dist/instance/StringField.d.ts +2 -3
- package/dist/instance/Subtree.d.ts +0 -1
- package/dist/instance/TriggerControl.d.ts +40 -0
- package/dist/instance/abstract/DescendantNode.d.ts +4 -5
- package/dist/instance/abstract/InstanceNode.d.ts +1 -2
- package/dist/instance/abstract/UnsupportedControl.d.ts +46 -0
- package/dist/instance/children.d.ts +0 -1
- package/dist/instance/hierarchy.d.ts +9 -5
- package/dist/instance/index.d.ts +0 -1
- package/dist/instance/internal-api/EvaluationContext.d.ts +0 -1
- package/dist/instance/internal-api/InstanceConfig.d.ts +0 -1
- package/dist/instance/internal-api/SubscribableDependency.d.ts +0 -1
- package/dist/instance/internal-api/TranslationContext.d.ts +0 -1
- package/dist/instance/internal-api/ValidationContext.d.ts +11 -4
- package/dist/instance/internal-api/ValueContext.d.ts +3 -4
- package/dist/instance/repeat/BaseRepeatRange.d.ts +1 -2
- package/dist/instance/repeat/RepeatInstance.d.ts +0 -1
- package/dist/instance/repeat/RepeatRangeControlled.d.ts +1 -2
- package/dist/instance/repeat/RepeatRangeUncontrolled.d.ts +1 -2
- package/dist/instance/resource.d.ts +0 -1
- package/dist/instance/text/TextChunk.d.ts +0 -1
- package/dist/instance/text/TextRange.d.ts +0 -1
- package/dist/instance/unsupported/RangeControl.d.ts +4 -0
- package/dist/instance/unsupported/RankControl.d.ts +4 -0
- package/dist/instance/unsupported/UploadControl.d.ts +4 -0
- package/dist/lib/TokenListParser.d.ts +3 -3
- package/dist/lib/dom/query.d.ts +1 -2
- package/dist/lib/reactivity/createChildrenState.d.ts +0 -1
- package/dist/lib/reactivity/createComputedExpression.d.ts +1 -2
- package/dist/lib/reactivity/createNoteReadonlyThunk.d.ts +2 -3
- package/dist/lib/reactivity/createSelectItems.d.ts +0 -1
- package/dist/lib/reactivity/createValueState.d.ts +0 -1
- package/dist/lib/reactivity/materializeCurrentStateChildren.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createClientState.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createCurrentState.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createEngineState.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createSharedNodeState.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createSpecifiedPropertyDescriptor.d.ts +0 -1
- package/dist/lib/reactivity/node-state/createSpecifiedState.d.ts +0 -1
- package/dist/lib/reactivity/node-state/representations.d.ts +0 -1
- package/dist/lib/reactivity/scope.d.ts +0 -1
- package/dist/lib/reactivity/text/createFieldHint.d.ts +1 -2
- package/dist/lib/reactivity/text/createNodeLabel.d.ts +1 -2
- package/dist/lib/reactivity/text/createNoteText.d.ts +1 -2
- package/dist/lib/reactivity/text/createTextRange.d.ts +0 -1
- package/dist/lib/reactivity/types.d.ts +0 -1
- package/dist/lib/reactivity/validation/createAggregatedViolations.d.ts +0 -1
- package/dist/lib/reactivity/validation/createValidation.d.ts +0 -1
- package/dist/{XFormDOM.d.ts → parse/XFormDOM.d.ts} +1 -2
- package/dist/{XFormDataType.d.ts → parse/XFormDataType.d.ts} +2 -4
- package/dist/{XFormDefinition.d.ts → parse/XFormDefinition.d.ts} +2 -3
- package/dist/{body → parse/body}/BodyDefinition.d.ts +15 -10
- package/dist/{body → parse/body}/BodyElementDefinition.d.ts +7 -7
- package/dist/{body → parse/body}/RepeatElementDefinition.d.ts +3 -4
- package/dist/{body → parse/body}/UnsupportedBodyElementDefinition.d.ts +0 -1
- package/dist/{body → parse/body}/appearance/inputAppearanceParser.d.ts +1 -2
- package/dist/{body → parse/body}/appearance/selectAppearanceParser.d.ts +1 -2
- package/dist/{body → parse/body}/appearance/structureElementAppearanceParser.d.ts +1 -2
- package/dist/parse/body/appearance/unknownAppearanceParser.d.ts +3 -0
- package/dist/{body → parse/body}/control/ControlDefinition.d.ts +3 -4
- package/dist/{body → parse/body}/control/InputDefinition.d.ts +1 -2
- package/dist/parse/body/control/RangeControlDefinition.d.ts +11 -0
- package/dist/parse/body/control/RankControlDefinition.d.ts +11 -0
- package/dist/parse/body/control/TriggerControlDefinition.d.ts +11 -0
- package/dist/parse/body/control/UploadControlDefinition.d.ts +11 -0
- package/dist/{body → parse/body}/control/select/ItemDefinition.d.ts +2 -3
- package/dist/{body → parse/body}/control/select/ItemsetDefinition.d.ts +4 -5
- package/dist/{body → parse/body}/control/select/ItemsetNodesetContext.d.ts +2 -3
- package/dist/{body → parse/body}/control/select/SelectDefinition.d.ts +3 -12
- package/dist/{body → parse/body}/group/BaseGroupDefinition.d.ts +3 -5
- package/dist/{body → parse/body}/group/LogicalGroupDefinition.d.ts +0 -1
- package/dist/{body → parse/body}/group/PresentationGroupDefinition.d.ts +1 -2
- package/dist/{body → parse/body}/group/StructuralGroupDefinition.d.ts +0 -1
- package/dist/{model/BindComputation.d.ts → parse/expression/BindComputationExpression.d.ts} +5 -6
- package/dist/{body/control/select → parse/expression}/ItemsetNodesetExpression.d.ts +2 -3
- package/dist/{body/control/select → parse/expression}/ItemsetValueExpression.d.ts +2 -3
- package/dist/parse/expression/RepeatCountControlExpression.d.ts +2 -3
- package/dist/parse/expression/TextLiteralExpression.d.ts +9 -0
- package/dist/parse/expression/TextOutputExpression.d.ts +7 -0
- package/dist/parse/expression/TextReferenceExpression.d.ts +7 -0
- package/dist/parse/expression/TextTranslationExpression.d.ts +8 -0
- package/dist/{expression → parse/expression/abstract}/DependencyContext.d.ts +0 -1
- package/dist/{expression → parse/expression/abstract}/DependentExpression.d.ts +2 -3
- package/dist/parse/expression/abstract/TextChunkExpression.d.ts +17 -0
- package/dist/parse/model/BindDefinition.d.ts +39 -0
- package/dist/{model → parse/model}/DescendentNodeDefinition.d.ts +0 -1
- package/dist/{model → parse/model}/LeafNodeDefinition.d.ts +1 -2
- package/dist/{model → parse/model}/ModelBindMap.d.ts +0 -1
- package/dist/{model → parse/model}/ModelDefinition.d.ts +1 -2
- package/dist/{model → parse/model}/NodeDefinition.d.ts +0 -1
- package/dist/parse/{NoteNodeDefinition.d.ts → model/NoteNodeDefinition.d.ts} +8 -9
- package/dist/{model → parse/model}/RepeatInstanceDefinition.d.ts +1 -2
- package/dist/{model → parse/model}/RepeatRangeDefinition.d.ts +2 -3
- package/dist/{model → parse/model}/RepeatTemplateDefinition.d.ts +2 -3
- package/dist/{model → parse/model}/RootDefinition.d.ts +2 -3
- package/dist/{model → parse/model}/SubtreeDefinition.d.ts +1 -2
- package/dist/parse/text/HintDefinition.d.ts +2 -3
- package/dist/parse/text/ItemLabelDefinition.d.ts +2 -3
- package/dist/parse/text/ItemsetLabelDefinition.d.ts +3 -4
- package/dist/parse/text/LabelDefinition.d.ts +5 -6
- package/dist/parse/text/MessageDefinition.d.ts +4 -5
- package/dist/parse/text/abstract/TextElementDefinition.d.ts +8 -9
- package/dist/parse/text/abstract/TextRangeDefinition.d.ts +5 -6
- package/dist/parse/xpath/path-resolution.d.ts +0 -1
- package/dist/parse/xpath/predicate-analysis.d.ts +0 -1
- package/dist/parse/xpath/reference-parsing.d.ts +0 -1
- package/dist/parse/xpath/semantic-analysis.d.ts +0 -1
- package/dist/parse/xpath/syntax-traversal.d.ts +0 -1
- package/dist/solid.js +6849 -5247
- package/dist/solid.js.map +1 -1
- package/package.json +11 -11
- package/src/client/BaseNode.ts +1 -1
- package/src/client/GroupNode.ts +2 -2
- package/src/client/ModelValueNode.ts +1 -1
- package/src/client/NodeAppearances.ts +1 -1
- package/src/client/NoteNode.ts +2 -2
- package/src/client/RootNode.ts +2 -2
- package/src/client/SelectNode.ts +2 -2
- package/src/client/StringNode.ts +2 -2
- package/src/client/SubtreeNode.ts +1 -1
- package/src/client/TextRange.ts +4 -5
- package/src/client/TriggerNode.ts +29 -0
- package/src/client/hierarchy.ts +13 -1
- package/src/client/node-types.ts +9 -1
- package/src/client/repeat/BaseRepeatRangeNode.ts +1 -1
- package/src/client/repeat/RepeatInstanceNode.ts +2 -2
- package/src/client/repeat/RepeatRangeControlledNode.ts +1 -1
- package/src/client/repeat/RepeatRangeUncontrolledNode.ts +1 -1
- package/src/client/unsupported/RangeNode.ts +14 -0
- package/src/client/unsupported/RankNode.ts +14 -0
- package/src/client/unsupported/UnsupportedControlNode.ts +40 -0
- package/src/client/unsupported/UploadNode.ts +14 -0
- package/src/index.ts +6 -1
- package/src/instance/ModelValue.ts +2 -2
- package/src/instance/Note.ts +2 -2
- package/src/instance/Root.ts +7 -3
- package/src/instance/SelectField.ts +6 -6
- package/src/instance/StringField.ts +3 -3
- package/src/instance/TriggerControl.ts +134 -0
- package/src/instance/abstract/DescendantNode.ts +4 -4
- package/src/instance/abstract/InstanceNode.ts +9 -1
- package/src/instance/abstract/UnsupportedControl.ts +151 -0
- package/src/instance/children.ts +75 -5
- package/src/instance/hierarchy.ts +22 -4
- package/src/instance/index.ts +1 -1
- package/src/instance/internal-api/EvaluationContext.ts +1 -1
- package/src/instance/internal-api/ValidationContext.ts +12 -3
- package/src/instance/internal-api/ValueContext.ts +3 -3
- package/src/instance/repeat/BaseRepeatRange.ts +1 -1
- package/src/instance/repeat/RepeatRangeControlled.ts +1 -1
- package/src/instance/repeat/RepeatRangeUncontrolled.ts +1 -1
- package/src/instance/unsupported/RangeControl.ts +5 -0
- package/src/instance/unsupported/RankControl.ts +5 -0
- package/src/instance/unsupported/UploadControl.ts +5 -0
- package/src/lib/TokenListParser.ts +11 -7
- package/src/lib/dom/query.ts +1 -1
- package/src/lib/reactivity/createComputedExpression.ts +3 -3
- package/src/lib/reactivity/createNoteReadonlyThunk.ts +2 -2
- package/src/lib/reactivity/createSelectItems.ts +3 -3
- package/src/lib/reactivity/createValueState.ts +3 -3
- package/src/lib/reactivity/node-state/createSpecifiedState.ts +1 -1
- package/src/lib/reactivity/text/createFieldHint.ts +1 -1
- package/src/lib/reactivity/text/createNodeLabel.ts +1 -1
- package/src/lib/reactivity/text/createNoteText.ts +1 -1
- package/src/lib/reactivity/text/createTextRange.ts +4 -4
- package/src/lib/reactivity/validation/createAggregatedViolations.ts +8 -3
- package/src/lib/reactivity/validation/createValidation.ts +1 -1
- package/src/{XFormDataType.ts → parse/XFormDataType.ts} +1 -3
- package/src/{XFormDefinition.ts → parse/XFormDefinition.ts} +2 -2
- package/src/{body → parse/body}/BodyDefinition.ts +44 -27
- package/src/{body → parse/body}/BodyElementDefinition.ts +12 -6
- package/src/{body → parse/body}/RepeatElementDefinition.ts +7 -5
- package/src/{body → parse/body}/appearance/inputAppearanceParser.ts +1 -1
- package/src/{body → parse/body}/appearance/selectAppearanceParser.ts +1 -1
- package/src/{body → parse/body}/appearance/structureElementAppearanceParser.ts +1 -1
- package/src/parse/body/appearance/unknownAppearanceParser.ts +5 -0
- package/src/{body → parse/body}/control/ControlDefinition.ts +4 -4
- package/src/parse/body/control/RangeControlDefinition.ts +26 -0
- package/src/parse/body/control/RankControlDefinition.ts +27 -0
- package/src/parse/body/control/TriggerControlDefinition.ts +26 -0
- package/src/parse/body/control/UploadControlDefinition.ts +26 -0
- package/src/{body → parse/body}/control/select/ItemDefinition.ts +2 -2
- package/src/{body → parse/body}/control/select/ItemsetDefinition.ts +5 -5
- package/src/{body → parse/body}/control/select/ItemsetNodesetContext.ts +2 -2
- package/src/{body → parse/body}/control/select/SelectDefinition.ts +3 -11
- package/src/{body → parse/body}/group/BaseGroupDefinition.ts +11 -22
- package/src/{body → parse/body}/group/PresentationGroupDefinition.ts +1 -1
- package/src/{model/BindComputation.ts → parse/expression/BindComputationExpression.ts} +8 -8
- package/src/{body/control/select → parse/expression}/ItemsetNodesetExpression.ts +2 -2
- package/src/{body/control/select → parse/expression}/ItemsetValueExpression.ts +2 -2
- package/src/parse/expression/RepeatCountControlExpression.ts +2 -2
- package/src/parse/expression/TextLiteralExpression.ts +19 -0
- package/src/parse/{text/OutputChunkDefinition.ts → expression/TextOutputExpression.ts} +4 -4
- package/src/parse/{text/ReferenceChunkDefinition.ts → expression/TextReferenceExpression.ts} +4 -4
- package/src/parse/{text/TranslationChunkDefinition.ts → expression/TextTranslationExpression.ts} +4 -4
- package/src/{expression → parse/expression/abstract}/DependentExpression.ts +4 -4
- package/src/parse/expression/abstract/TextChunkExpression.ts +38 -0
- package/src/{model → parse/model}/BindDefinition.ts +23 -22
- package/src/parse/{NoteNodeDefinition.ts → model/NoteNodeDefinition.ts} +9 -9
- package/src/{model → parse/model}/RepeatRangeDefinition.ts +1 -1
- package/src/{model → parse/model}/RootDefinition.ts +2 -2
- package/src/parse/text/HintDefinition.ts +2 -2
- package/src/parse/text/ItemLabelDefinition.ts +2 -2
- package/src/parse/text/ItemsetLabelDefinition.ts +7 -7
- package/src/parse/text/LabelDefinition.ts +5 -5
- package/src/parse/text/MessageDefinition.ts +7 -7
- package/src/parse/text/abstract/TextElementDefinition.ts +14 -14
- package/src/parse/text/abstract/TextRangeDefinition.ts +5 -5
- package/dist/model/BindDefinition.d.ts +0 -34
- package/dist/parse/text/OutputChunkDefinition.d.ts +0 -8
- package/dist/parse/text/ReferenceChunkDefinition.d.ts +0 -8
- package/dist/parse/text/StaticTextChunkDefinition.d.ts +0 -10
- package/dist/parse/text/TranslationChunkDefinition.d.ts +0 -9
- package/dist/parse/text/abstract/TextChunkDefinition.d.ts +0 -18
- package/src/parse/TODO.md +0 -3
- package/src/parse/text/StaticTextChunkDefinition.ts +0 -19
- package/src/parse/text/abstract/TextChunkDefinition.ts +0 -38
- package/dist/{model → parse/model}/BindElement.d.ts +0 -0
- package/src/{XFormDOM.ts → parse/XFormDOM.ts} +0 -0
- package/src/{body → parse/body}/UnsupportedBodyElementDefinition.ts +0 -0
- package/src/{body → parse/body}/control/InputDefinition.ts +1 -1
- /package/src/{body → parse/body}/group/LogicalGroupDefinition.ts +0 -0
- /package/src/{body → parse/body}/group/StructuralGroupDefinition.ts +0 -0
- /package/src/{expression → parse/expression/abstract}/DependencyContext.ts +0 -0
- /package/src/{model → parse/model}/BindElement.ts +0 -0
- /package/src/{model → parse/model}/DescendentNodeDefinition.ts +0 -0
- /package/src/{model → parse/model}/LeafNodeDefinition.ts +0 -0
- /package/src/{model → parse/model}/ModelBindMap.ts +0 -0
- /package/src/{model → parse/model}/ModelDefinition.ts +0 -0
- /package/src/{model → parse/model}/NodeDefinition.ts +0 -0
- /package/src/{model → parse/model}/RepeatInstanceDefinition.ts +0 -0
- /package/src/{model → parse/model}/RepeatTemplateDefinition.ts +0 -0
- /package/src/{model → parse/model}/SubtreeDefinition.ts +0 -0
package/dist/instance/Group.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { GeneralChildNode, GeneralParentNode } from './hierarchy.ts';
|
|
|
11
11
|
import { NodeID } from './identity.ts';
|
|
12
12
|
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
13
13
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
14
|
-
|
|
15
14
|
interface GroupStateSpec extends DescendantNodeSharedStateSpec {
|
|
16
15
|
readonly label: Accessor<TextRange<'label'> | null>;
|
|
17
16
|
readonly hint: null;
|
|
@@ -4,14 +4,13 @@ import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts
|
|
|
4
4
|
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
5
5
|
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
6
6
|
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
7
|
-
import { LeafNodeDefinition } from '../model/LeafNodeDefinition.ts';
|
|
7
|
+
import { LeafNodeDefinition } from '../parse/model/LeafNodeDefinition.ts';
|
|
8
8
|
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
9
9
|
import { GeneralParentNode } from './hierarchy.ts';
|
|
10
10
|
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
11
11
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
12
12
|
import { ValidationContext } from './internal-api/ValidationContext.ts';
|
|
13
13
|
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
14
|
-
|
|
15
14
|
export interface ModelValueDefinition extends LeafNodeDefinition {
|
|
16
15
|
readonly bodyElement: null;
|
|
17
16
|
}
|
package/dist/instance/Note.d.ts
CHANGED
|
@@ -7,14 +7,13 @@ import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
|
7
7
|
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
8
8
|
import { ComputedNoteText } from '../lib/reactivity/text/createNoteText.ts';
|
|
9
9
|
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
10
|
-
import { NoteNodeDefinition } from '../parse/NoteNodeDefinition.ts';
|
|
10
|
+
import { NoteNodeDefinition } from '../parse/model/NoteNodeDefinition.ts';
|
|
11
11
|
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
12
12
|
import { GeneralParentNode } from './hierarchy.ts';
|
|
13
13
|
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
14
14
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
15
15
|
import { ValidationContext } from './internal-api/ValidationContext.ts';
|
|
16
16
|
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
17
|
-
|
|
18
17
|
interface NoteStateSpec extends DescendantNodeStateSpec<string> {
|
|
19
18
|
readonly readonly: Accessor<true>;
|
|
20
19
|
readonly noteText: ComputedNoteText;
|
package/dist/instance/Root.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
2
|
import { Accessor, Signal } from 'solid-js';
|
|
3
|
-
import { XFormDOM } from '../XFormDOM.ts';
|
|
4
|
-
import { BodyClassList } from '../body/BodyDefinition.ts';
|
|
5
3
|
import { ActiveLanguage, FormLanguage, FormLanguages } from '../client/FormLanguage.ts';
|
|
6
4
|
import { RootNode } from '../client/RootNode.ts';
|
|
7
5
|
import { AncestorNodeValidationState } from '../client/validation.ts';
|
|
@@ -9,7 +7,9 @@ import { MaterializedChildren } from '../lib/reactivity/materializeCurrentStateC
|
|
|
9
7
|
import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts';
|
|
10
8
|
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
11
9
|
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
12
|
-
import {
|
|
10
|
+
import { BodyClassList } from '../parse/body/BodyDefinition.ts';
|
|
11
|
+
import { RootDefinition } from '../parse/model/RootDefinition.ts';
|
|
12
|
+
import { XFormDOM } from '../parse/XFormDOM.ts';
|
|
13
13
|
import { InstanceNode } from './abstract/InstanceNode.ts';
|
|
14
14
|
import { GeneralChildNode } from './hierarchy.ts';
|
|
15
15
|
import { NodeID } from './identity.ts';
|
|
@@ -17,7 +17,6 @@ import { EvaluationContext, EvaluationContextRoot } from './internal-api/Evaluat
|
|
|
17
17
|
import { InstanceConfig } from './internal-api/InstanceConfig.ts';
|
|
18
18
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
19
19
|
import { TranslationContext } from './internal-api/TranslationContext.ts';
|
|
20
|
-
|
|
21
20
|
interface RootStateSpec {
|
|
22
21
|
readonly reference: string;
|
|
23
22
|
readonly readonly: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
import { AnySelectDefinition } from '../body/control/select/SelectDefinition.ts';
|
|
3
2
|
import { SelectItem, SelectNode, SelectNodeAppearances } from '../client/SelectNode.ts';
|
|
4
3
|
import { TextRange } from '../client/TextRange.ts';
|
|
5
4
|
import { AnyViolation, LeafNodeValidationState } from '../client/validation.ts';
|
|
@@ -7,7 +6,8 @@ import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts
|
|
|
7
6
|
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
8
7
|
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
9
8
|
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
10
|
-
import {
|
|
9
|
+
import { AnySelectDefinition } from '../parse/body/control/select/SelectDefinition.ts';
|
|
10
|
+
import { LeafNodeDefinition } from '../parse/model/LeafNodeDefinition.ts';
|
|
11
11
|
import { Root } from './Root.ts';
|
|
12
12
|
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
13
13
|
import { GeneralParentNode } from './hierarchy.ts';
|
|
@@ -15,7 +15,6 @@ import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
|
15
15
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
16
16
|
import { ValidationContext } from './internal-api/ValidationContext.ts';
|
|
17
17
|
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
18
|
-
|
|
19
18
|
export interface SelectFieldDefinition extends LeafNodeDefinition {
|
|
20
19
|
readonly bodyElement: AnySelectDefinition;
|
|
21
20
|
}
|
|
@@ -39,13 +38,13 @@ export declare class SelectField extends DescendantNode<SelectFieldDefinition, S
|
|
|
39
38
|
readonly decodeValue: (instanceValue: string) => readonly SelectItem[];
|
|
40
39
|
protected readonly getValueOptions: Accessor<readonly SelectItem[]>;
|
|
41
40
|
constructor(parent: GeneralParentNode, definition: SelectFieldDefinition);
|
|
42
|
-
getViolation(): AnyViolation | null;
|
|
43
41
|
protected getSelectItemsByValue(valueOptions?: readonly SelectItem[]): ReadonlyMap<string, SelectItem>;
|
|
44
42
|
protected updateSelectedItemValues(values: readonly string[]): void;
|
|
45
43
|
protected setSelectedItemValue(value: string | null): void;
|
|
46
44
|
select(selectedItem: SelectItem): Root;
|
|
47
45
|
deselect(deselectedItem: SelectItem): Root;
|
|
48
46
|
getChildren(): readonly [];
|
|
47
|
+
getViolation(): AnyViolation | null;
|
|
49
48
|
isBlank(): boolean;
|
|
50
49
|
}
|
|
51
50
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
import { InputDefinition } from '../body/control/InputDefinition.ts';
|
|
3
2
|
import { StringNode, StringNodeAppearances } from '../client/StringNode.ts';
|
|
4
3
|
import { TextRange } from '../client/TextRange.ts';
|
|
5
4
|
import { AnyViolation, LeafNodeValidationState } from '../client/validation.ts';
|
|
@@ -7,7 +6,8 @@ import { CurrentState } from '../lib/reactivity/node-state/createCurrentState.ts
|
|
|
7
6
|
import { EngineState } from '../lib/reactivity/node-state/createEngineState.ts';
|
|
8
7
|
import { SharedNodeState } from '../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
9
8
|
import { SimpleAtomicState } from '../lib/reactivity/types.ts';
|
|
10
|
-
import {
|
|
9
|
+
import { InputDefinition } from '../parse/body/control/InputDefinition.ts';
|
|
10
|
+
import { LeafNodeDefinition } from '../parse/model/LeafNodeDefinition.ts';
|
|
11
11
|
import { Root } from './Root.ts';
|
|
12
12
|
import { DescendantNodeStateSpec, DescendantNode } from './abstract/DescendantNode.ts';
|
|
13
13
|
import { GeneralParentNode } from './hierarchy.ts';
|
|
@@ -15,7 +15,6 @@ import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
|
15
15
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
16
16
|
import { ValidationContext } from './internal-api/ValidationContext.ts';
|
|
17
17
|
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
18
|
-
|
|
19
18
|
export interface StringFieldDefinition extends LeafNodeDefinition {
|
|
20
19
|
readonly bodyElement: InputDefinition;
|
|
21
20
|
}
|
|
@@ -10,7 +10,6 @@ import { GeneralChildNode, GeneralParentNode } from './hierarchy.ts';
|
|
|
10
10
|
import { NodeID } from './identity.ts';
|
|
11
11
|
import { EvaluationContext } from './internal-api/EvaluationContext.ts';
|
|
12
12
|
import { SubscribableDependency } from './internal-api/SubscribableDependency.ts';
|
|
13
|
-
|
|
14
13
|
interface SubtreeStateSpec extends DescendantNodeSharedStateSpec {
|
|
15
14
|
readonly label: null;
|
|
16
15
|
readonly hint: null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { TextRange } from '../client/TextRange.ts';
|
|
3
|
+
import { TriggerNode, TriggerNodeDefinition } from '../client/TriggerNode.ts';
|
|
4
|
+
import { AnyViolation, LeafNodeValidationState } from '../client/validation.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 { UnknownAppearanceDefinition } from '../parse/body/appearance/unknownAppearanceParser.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 { ValidationContext } from './internal-api/ValidationContext.ts';
|
|
16
|
+
import { ValueContext } from './internal-api/ValueContext.ts';
|
|
17
|
+
interface TriggerControlStateSpec extends DescendantNodeStateSpec<boolean> {
|
|
18
|
+
readonly label: Accessor<TextRange<'label'> | null>;
|
|
19
|
+
readonly hint: Accessor<TextRange<'hint'> | null>;
|
|
20
|
+
readonly children: null;
|
|
21
|
+
readonly value: SimpleAtomicState<boolean>;
|
|
22
|
+
readonly valueOptions: null;
|
|
23
|
+
}
|
|
24
|
+
export declare class TriggerControl extends DescendantNode<TriggerNodeDefinition, TriggerControlStateSpec, null> implements TriggerNode, EvaluationContext, SubscribableDependency, ValidationContext, ValueContext<boolean> {
|
|
25
|
+
private readonly validation;
|
|
26
|
+
protected readonly state: SharedNodeState<TriggerControlStateSpec>;
|
|
27
|
+
protected engineState: EngineState<TriggerControlStateSpec>;
|
|
28
|
+
readonly nodeType = "trigger";
|
|
29
|
+
readonly appearances: UnknownAppearanceDefinition;
|
|
30
|
+
readonly currentState: CurrentState<TriggerControlStateSpec>;
|
|
31
|
+
get validationState(): LeafNodeValidationState;
|
|
32
|
+
readonly encodeValue: (runtimeValue: boolean) => string;
|
|
33
|
+
readonly decodeValue: (instanceValue: string) => boolean;
|
|
34
|
+
constructor(parent: GeneralParentNode, definition: TriggerNodeDefinition);
|
|
35
|
+
getViolation(): AnyViolation | null;
|
|
36
|
+
isBlank(): boolean;
|
|
37
|
+
getChildren(): readonly [];
|
|
38
|
+
setValue(value: boolean): Root;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { XFormsXPathEvaluator } from '@getodk/xpath';
|
|
2
2
|
import { Accessor } from 'solid-js';
|
|
3
3
|
import { BaseNode } from '../../client/BaseNode.ts';
|
|
4
|
-
import { AnyDescendantNodeDefinition } from '../../model/DescendentNodeDefinition.ts';
|
|
5
|
-
import { LeafNodeDefinition } from '../../model/LeafNodeDefinition.ts';
|
|
6
|
-
import { AnyNodeDefinition } from '../../model/NodeDefinition.ts';
|
|
7
|
-
import { RepeatInstanceDefinition } from '../../model/RepeatInstanceDefinition.ts';
|
|
4
|
+
import { AnyDescendantNodeDefinition } from '../../parse/model/DescendentNodeDefinition.ts';
|
|
5
|
+
import { LeafNodeDefinition } from '../../parse/model/LeafNodeDefinition.ts';
|
|
6
|
+
import { AnyNodeDefinition } from '../../parse/model/NodeDefinition.ts';
|
|
7
|
+
import { RepeatInstanceDefinition } from '../../parse/model/RepeatInstanceDefinition.ts';
|
|
8
8
|
import { AnyChildNode, GeneralParentNode, RepeatRange } from '../hierarchy.ts';
|
|
9
9
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
10
10
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
11
11
|
import { Root } from '../Root.ts';
|
|
12
12
|
import { InstanceNodeStateSpec, InstanceNode } from './InstanceNode.ts';
|
|
13
|
-
|
|
14
13
|
export interface DescendantNodeSharedStateSpec {
|
|
15
14
|
readonly reference: Accessor<string>;
|
|
16
15
|
readonly readonly: Accessor<boolean>;
|
|
@@ -10,14 +10,13 @@ import { EngineState } from '../../lib/reactivity/node-state/createEngineState.t
|
|
|
10
10
|
import { SharedNodeState } from '../../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
11
11
|
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
12
12
|
import { SimpleAtomicState } from '../../lib/reactivity/types.ts';
|
|
13
|
-
import { AnyNodeDefinition } from '../../model/NodeDefinition.ts';
|
|
13
|
+
import { AnyNodeDefinition } from '../../parse/model/NodeDefinition.ts';
|
|
14
14
|
import { Root } from '../Root.ts';
|
|
15
15
|
import { AnyChildNode, AnyNode, AnyParentNode } from '../hierarchy.ts';
|
|
16
16
|
import { NodeID } from '../identity.ts';
|
|
17
17
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
18
18
|
import { InstanceConfig } from '../internal-api/InstanceConfig.ts';
|
|
19
19
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
20
|
-
|
|
21
20
|
export interface InstanceNodeStateSpec<Value = never> {
|
|
22
21
|
readonly reference: Accessor<string> | string;
|
|
23
22
|
readonly readonly: Accessor<boolean> | boolean;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { UnsupportedControlNodeType } from '../../client/node-types.ts';
|
|
3
|
+
import { TextRange } from '../../client/TextRange.ts';
|
|
4
|
+
import { UnsupportedControlDefinition, UnsupportedControlElementDefinition, UnsupportedControlNode } from '../../client/unsupported/UnsupportedControlNode.ts';
|
|
5
|
+
import { AnyViolation, LeafNodeValidationState } from '../../client/validation.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 { SimpleAtomicState } from '../../lib/reactivity/types.ts';
|
|
10
|
+
import { UnknownAppearanceDefinition } from '../../parse/body/appearance/unknownAppearanceParser.ts';
|
|
11
|
+
import { GeneralParentNode } from '../hierarchy.ts';
|
|
12
|
+
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
13
|
+
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
14
|
+
import { ValidationContext } from '../internal-api/ValidationContext.ts';
|
|
15
|
+
import { ValueContext } from '../internal-api/ValueContext.ts';
|
|
16
|
+
import { DescendantNode, DescendantNodeStateSpec } from './DescendantNode.ts';
|
|
17
|
+
type TypedUnsupportedControlElementDefinition<Type extends UnsupportedControlNodeType> = Extract<UnsupportedControlElementDefinition, {
|
|
18
|
+
readonly type: Type;
|
|
19
|
+
}>;
|
|
20
|
+
interface TypedUnsupportedControlDefinition<Type extends UnsupportedControlNodeType> extends UnsupportedControlDefinition {
|
|
21
|
+
readonly bodyElement: TypedUnsupportedControlElementDefinition<Type>;
|
|
22
|
+
}
|
|
23
|
+
interface UnsupportedControlStateSpec extends DescendantNodeStateSpec<unknown> {
|
|
24
|
+
readonly label: Accessor<TextRange<'label'> | null>;
|
|
25
|
+
readonly hint: Accessor<TextRange<'hint'> | null>;
|
|
26
|
+
readonly children: null;
|
|
27
|
+
readonly value: SimpleAtomicState<unknown>;
|
|
28
|
+
readonly valueOptions: never;
|
|
29
|
+
}
|
|
30
|
+
export declare abstract class UnsupportedControl<Type extends UnsupportedControlNodeType> extends DescendantNode<TypedUnsupportedControlDefinition<Type>, UnsupportedControlStateSpec, null> implements UnsupportedControlNode, EvaluationContext, SubscribableDependency, ValidationContext, ValueContext<unknown> {
|
|
31
|
+
private readonly validation;
|
|
32
|
+
protected readonly state: SharedNodeState<UnsupportedControlStateSpec>;
|
|
33
|
+
protected readonly engineState: EngineState<UnsupportedControlStateSpec>;
|
|
34
|
+
abstract readonly nodeType: Type;
|
|
35
|
+
readonly appearances: UnknownAppearanceDefinition;
|
|
36
|
+
readonly currentState: CurrentState<UnsupportedControlStateSpec>;
|
|
37
|
+
get validationState(): LeafNodeValidationState;
|
|
38
|
+
readonly encodeValue: (instanceValue: unknown) => string;
|
|
39
|
+
readonly decodeValue: (instanceValue: unknown) => unknown;
|
|
40
|
+
constructor(parent: GeneralParentNode, definition: TypedUnsupportedControlDefinition<Type>);
|
|
41
|
+
getViolation(): AnyViolation | null;
|
|
42
|
+
isBlank(): boolean;
|
|
43
|
+
getChildren(): readonly [];
|
|
44
|
+
setValue(_: never): never;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -8,11 +8,15 @@ import { Root } from './Root.ts';
|
|
|
8
8
|
import { SelectField } from './SelectField.ts';
|
|
9
9
|
import { StringField } from './StringField.ts';
|
|
10
10
|
import { Subtree } from './Subtree.ts';
|
|
11
|
-
|
|
11
|
+
import { TriggerControl } from './TriggerControl.ts';
|
|
12
|
+
import { RangeControl } from './unsupported/RangeControl.ts';
|
|
13
|
+
import { RankControl } from './unsupported/RankControl.ts';
|
|
14
|
+
import { UploadControl } from './unsupported/UploadControl.ts';
|
|
12
15
|
export type RepeatRange = RepeatRangeControlled | RepeatRangeUncontrolled;
|
|
13
|
-
export type
|
|
16
|
+
export type UnsupportedControl = RangeControl | RankControl | UploadControl;
|
|
17
|
+
export type AnyNode = Root | Group | Subtree | RepeatRange | RepeatInstance | Note | ModelValue | StringField | SelectField | TriggerControl | UnsupportedControl;
|
|
14
18
|
export type AnyParentNode = Root | Group | Subtree | RepeatRange | RepeatInstance;
|
|
15
19
|
export type GeneralParentNode = Root | Group | Subtree | RepeatInstance;
|
|
16
|
-
export type AnyChildNode = Group | Subtree | RepeatRange | RepeatInstance | ModelValue | Note | StringField | SelectField;
|
|
17
|
-
export type GeneralChildNode = Group | Subtree | RepeatRange | ModelValue | Note | StringField | SelectField;
|
|
18
|
-
export type AnyValueNode = ModelValue | Note | StringField | SelectField;
|
|
20
|
+
export type AnyChildNode = Group | Subtree | RepeatRange | RepeatInstance | ModelValue | Note | StringField | SelectField | TriggerControl | UnsupportedControl;
|
|
21
|
+
export type GeneralChildNode = Group | Subtree | RepeatRange | ModelValue | Note | StringField | SelectField | TriggerControl | UnsupportedControl;
|
|
22
|
+
export type AnyValueNode = ModelValue | Note | StringField | SelectField | TriggerControl | UnsupportedControl;
|
package/dist/instance/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RootNode } from '../client/RootNode.ts';
|
|
2
2
|
import { InitializeFormOptions as BaseInitializeFormOptions, FormResource } from '../client/index.ts';
|
|
3
3
|
import { InstanceConfig } from './internal-api/InstanceConfig.ts';
|
|
4
|
-
|
|
5
4
|
interface InitializeFormOptions extends BaseInitializeFormOptions {
|
|
6
5
|
readonly config: Partial<InstanceConfig>;
|
|
7
6
|
}
|
|
@@ -3,7 +3,6 @@ import { Accessor } from 'solid-js';
|
|
|
3
3
|
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
4
4
|
import { SubscribableDependency } from './SubscribableDependency.ts';
|
|
5
5
|
import { TranslationContext } from './TranslationContext.ts';
|
|
6
|
-
|
|
7
6
|
export interface EvaluationContextRoot extends SubscribableDependency, TranslationContext {
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EngineConfig } from '../../client/EngineConfig.ts';
|
|
2
2
|
import { CreateUniqueId } from '../../lib/unique-id.ts';
|
|
3
|
-
|
|
4
3
|
export interface InstanceConfig extends Required<EngineConfig> {
|
|
5
4
|
/**
|
|
6
5
|
* Uniqueness per form instance session (so e.g. persistence isn't necessary).
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyViolation } from '../../client/validation.ts';
|
|
2
|
+
import { BindComputationExpression } from '../../parse/expression/BindComputationExpression.ts';
|
|
2
3
|
import { MessageDefinition } from '../../parse/text/MessageDefinition.ts';
|
|
4
|
+
import { NodeID } from '../identity.ts';
|
|
3
5
|
import { EvaluationContext } from './EvaluationContext.ts';
|
|
4
6
|
import { SubscribableDependency } from './SubscribableDependency.ts';
|
|
5
|
-
|
|
7
|
+
interface ValidationContextCurrentState {
|
|
8
|
+
get reference(): string;
|
|
9
|
+
}
|
|
6
10
|
interface ValidationContextDefinitionBind {
|
|
7
|
-
readonly constraint:
|
|
11
|
+
readonly constraint: BindComputationExpression<'constraint'>;
|
|
8
12
|
readonly constraintMsg: MessageDefinition<'constraintMsg'> | null;
|
|
9
|
-
readonly required:
|
|
13
|
+
readonly required: BindComputationExpression<'required'>;
|
|
10
14
|
readonly requiredMsg: MessageDefinition<'requiredMsg'> | null;
|
|
11
15
|
}
|
|
12
16
|
interface ValidationContextDefinition {
|
|
13
17
|
readonly bind: ValidationContextDefinitionBind;
|
|
14
18
|
}
|
|
15
19
|
export interface ValidationContext extends EvaluationContext, SubscribableDependency {
|
|
20
|
+
readonly nodeId: NodeID;
|
|
16
21
|
readonly definition: ValidationContextDefinition;
|
|
22
|
+
readonly currentState: ValidationContextCurrentState;
|
|
23
|
+
getViolation(): AnyViolation | null;
|
|
17
24
|
isRelevant(): boolean;
|
|
18
25
|
isRequired(): boolean;
|
|
19
26
|
isBlank(): boolean;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ReactiveScope } from '../../lib/reactivity/scope.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { BindComputationExpression } from '../../parse/expression/BindComputationExpression.ts';
|
|
3
3
|
import { EvaluationContext } from './EvaluationContext.ts';
|
|
4
|
-
|
|
5
4
|
export type InstanceValue = string;
|
|
6
5
|
interface ValueContextDefinitionBind {
|
|
7
|
-
readonly calculate:
|
|
8
|
-
readonly readonly:
|
|
6
|
+
readonly calculate: BindComputationExpression<'calculate'> | null;
|
|
7
|
+
readonly readonly: BindComputationExpression<'readonly'>;
|
|
9
8
|
}
|
|
10
9
|
export interface ValueContextDefinition {
|
|
11
10
|
readonly bind: ValueContextDefinitionBind;
|
|
@@ -8,13 +8,12 @@ import { MaterializedChildren } from '../../lib/reactivity/materializeCurrentSta
|
|
|
8
8
|
import { CurrentState } from '../../lib/reactivity/node-state/createCurrentState.ts';
|
|
9
9
|
import { EngineState } from '../../lib/reactivity/node-state/createEngineState.ts';
|
|
10
10
|
import { SharedNodeState } from '../../lib/reactivity/node-state/createSharedNodeState.ts';
|
|
11
|
-
import { AnyRepeatRangeDefinition, ControlledRepeatRangeDefinition } from '../../model/RepeatRangeDefinition.ts';
|
|
11
|
+
import { AnyRepeatRangeDefinition, ControlledRepeatRangeDefinition } from '../../parse/model/RepeatRangeDefinition.ts';
|
|
12
12
|
import { DescendantNodeParent, DescendantNodeSharedStateSpec, DescendantNode } from '../abstract/DescendantNode.ts';
|
|
13
13
|
import { NodeID } from '../identity.ts';
|
|
14
14
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
15
15
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
16
16
|
import { RepeatInstance, RepeatDefinition } from './RepeatInstance.ts';
|
|
17
|
-
|
|
18
17
|
interface RepeatRangeStateSpec extends DescendantNodeSharedStateSpec {
|
|
19
18
|
readonly hint: null;
|
|
20
19
|
readonly label: Accessor<TextRange<'label'> | null>;
|
|
@@ -11,7 +11,6 @@ import { AnyChildNode, GeneralChildNode, RepeatRange } from '../hierarchy.ts';
|
|
|
11
11
|
import { NodeID } from '../identity.ts';
|
|
12
12
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
13
13
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
14
|
-
|
|
15
14
|
export type { RepeatDefinition };
|
|
16
15
|
interface RepeatInstanceStateSpec extends DescendantNodeSharedStateSpec {
|
|
17
16
|
readonly label: Accessor<TextRange<'label'> | null>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { RepeatRangeNodeAppearances } from '../../client/repeat/BaseRepeatRangeNode.ts';
|
|
2
2
|
import { RepeatRangeControlledNode } from '../../client/repeat/RepeatRangeControlledNode.ts';
|
|
3
3
|
import { AncestorNodeValidationState } from '../../client/validation.ts';
|
|
4
|
-
import { ControlledRepeatRangeDefinition } from '../../model/RepeatRangeDefinition.ts';
|
|
4
|
+
import { ControlledRepeatRangeDefinition } from '../../parse/model/RepeatRangeDefinition.ts';
|
|
5
5
|
import { GeneralParentNode } from '../hierarchy.ts';
|
|
6
6
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
7
7
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
8
8
|
import { BaseRepeatRange } from './BaseRepeatRange.ts';
|
|
9
|
-
|
|
10
9
|
export declare class RepeatRangeControlled extends BaseRepeatRange<ControlledRepeatRangeDefinition> implements RepeatRangeControlledNode, EvaluationContext, SubscribableDependency {
|
|
11
10
|
readonly nodeType = "repeat-range:controlled";
|
|
12
11
|
readonly appearances: RepeatRangeNodeAppearances;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { RepeatRangeNodeAppearances } from '../../client/repeat/BaseRepeatRangeNode.ts';
|
|
2
2
|
import { RepeatRangeUncontrolledNode } from '../../client/repeat/RepeatRangeUncontrolledNode.ts';
|
|
3
3
|
import { AncestorNodeValidationState } from '../../client/validation.ts';
|
|
4
|
-
import { UncontrolledRepeatRangeDefinition } from '../../model/RepeatRangeDefinition.ts';
|
|
4
|
+
import { UncontrolledRepeatRangeDefinition } from '../../parse/model/RepeatRangeDefinition.ts';
|
|
5
5
|
import { GeneralParentNode } from '../hierarchy.ts';
|
|
6
6
|
import { EvaluationContext } from '../internal-api/EvaluationContext.ts';
|
|
7
7
|
import { SubscribableDependency } from '../internal-api/SubscribableDependency.ts';
|
|
8
8
|
import { Root } from '../Root.ts';
|
|
9
9
|
import { BaseRepeatRange } from './BaseRepeatRange.ts';
|
|
10
|
-
|
|
11
10
|
export declare class RepeatRangeUncontrolled extends BaseRepeatRange<UncontrolledRepeatRangeDefinition> implements RepeatRangeUncontrolledNode, EvaluationContext, SubscribableDependency {
|
|
12
11
|
readonly nodeType = "repeat-range:uncontrolled";
|
|
13
12
|
readonly appearances: RepeatRangeNodeAppearances;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FetchResource, FetchResourceResponse } from '../client/EngineConfig.ts';
|
|
2
2
|
import { FormResource } from '../client/index.ts';
|
|
3
|
-
|
|
4
3
|
export type { FetchResource, FetchResourceResponse, FormResource };
|
|
5
4
|
export interface ResourceOptions {
|
|
6
5
|
readonly fetchResource: FetchResource;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ActiveLanguage } from '../../client/FormLanguage.ts';
|
|
2
2
|
import { TextChunk as ClientTextChunk, TextChunkSource } from '../../client/TextRange.ts';
|
|
3
3
|
import { TranslationContext } from '../internal-api/TranslationContext.ts';
|
|
4
|
-
|
|
5
4
|
export declare class TextChunk implements ClientTextChunk {
|
|
6
5
|
readonly context: TranslationContext;
|
|
7
6
|
readonly source: TextChunkSource;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TextRange as ClientTextRange, TextChunk, TextOrigin, TextRole } from '../../client/TextRange.ts';
|
|
2
|
-
|
|
3
2
|
export declare class TextRange<Role extends TextRole, Origin extends TextOrigin> implements ClientTextRange<Role, Origin> {
|
|
4
3
|
readonly origin: Origin;
|
|
5
4
|
readonly role: Role;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PartiallyKnownString } from '../../../common/types/string/PartiallyKnownString.ts';
|
|
2
|
-
|
|
3
2
|
type SymbolIterator = typeof Symbol.iterator;
|
|
4
3
|
type TokenListKey<CanonicalToken extends string> = PartiallyKnownString<CanonicalToken> | SymbolIterator;
|
|
5
4
|
type TokenListIterator<CanonicalToken extends string> = IterableIterator<PartiallyKnownString<CanonicalToken>>;
|
|
5
|
+
type PassthroughTokenList = Readonly<Record<string, boolean>>;
|
|
6
6
|
/**
|
|
7
7
|
* @see {@link TokenListParser}
|
|
8
8
|
*/
|
|
9
|
-
export type TokenList<CanonicalToken extends string = string> = {
|
|
9
|
+
export type TokenList<CanonicalToken extends string = string> = PassthroughTokenList & {
|
|
10
10
|
readonly [Key in TokenListKey<CanonicalToken>]: Key extends SymbolIterator ? () => TokenListIterator<CanonicalToken> : boolean;
|
|
11
11
|
};
|
|
12
12
|
interface TokenListAlias<CanonicalToken extends string> {
|
|
@@ -77,7 +77,7 @@ type TokenListAttributeName = PartiallyKnownString<'appearance' | 'class'>;
|
|
|
77
77
|
export declare class TokenListParser<CanonicalToken extends string, TokenAlias extends CanonicalToken = CanonicalToken> {
|
|
78
78
|
readonly canonicalTokens: readonly CanonicalToken[];
|
|
79
79
|
private readonly aliases;
|
|
80
|
-
constructor(canonicalTokens
|
|
80
|
+
constructor(canonicalTokens?: readonly CanonicalToken[], options?: TokenListParserOptions<TokenAlias>);
|
|
81
81
|
parseFrom(element: Element, attributeName: TokenListAttributeName): TokenList<CanonicalToken>;
|
|
82
82
|
}
|
|
83
83
|
export type ParsedTokenList<Parser extends TokenListParser<any>> = Parser extends TokenListParser<infer CanonicalToken> ? TokenList<CanonicalToken> : never;
|
package/dist/lib/dom/query.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { KnownAttributeLocalNamedElement, LocalNamedElement } from '../../../../common/types/dom.ts';
|
|
2
|
-
import { SelectElement } from '../../body/control/select/SelectDefinition';
|
|
3
|
-
|
|
2
|
+
import { SelectElement } from '../../parse/body/control/select/SelectDefinition';
|
|
4
3
|
export interface HintElement extends LocalNamedElement<'hint'> {
|
|
5
4
|
}
|
|
6
5
|
export interface ItemElement extends LocalNamedElement<'item'> {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Accessor, Setter, Signal } from 'solid-js';
|
|
2
2
|
import { AnyChildNode, AnyParentNode } from '../../instance/hierarchy.ts';
|
|
3
3
|
import { NodeID } from '../../instance/identity.ts';
|
|
4
|
-
|
|
5
4
|
export interface ChildrenState<Child extends AnyChildNode> {
|
|
6
5
|
readonly children: Signal<readonly Child[]>;
|
|
7
6
|
readonly getChildren: Accessor<readonly Child[]>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
|
-
import { DependentExpression, DependentExpressionResultType } from '../../expression/DependentExpression.ts';
|
|
3
2
|
import { EvaluationContext } from '../../instance/internal-api/EvaluationContext.ts';
|
|
4
3
|
import { SubscribableDependency } from '../../instance/internal-api/SubscribableDependency.ts';
|
|
5
|
-
|
|
4
|
+
import { DependentExpression, DependentExpressionResultType } from '../../parse/expression/abstract/DependentExpression.ts';
|
|
6
5
|
interface ComputedExpressionResults {
|
|
7
6
|
readonly boolean: boolean;
|
|
8
7
|
readonly nodes: Node[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
2
|
import { EvaluationContext } from '../../instance/internal-api/EvaluationContext.ts';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare const createNoteReadonlyThunk: (context: EvaluationContext, readonlyDefinition: BindComputation<"readonly">) => Accessor<true>;
|
|
3
|
+
import { BindComputationExpression } from '../../parse/expression/BindComputationExpression.ts';
|
|
4
|
+
export declare const createNoteReadonlyThunk: (context: EvaluationContext, readonlyDefinition: BindComputationExpression<"readonly">) => Accessor<true>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Accessor } from 'solid-js';
|
|
2
2
|
import { SelectItem } from '../../index.ts';
|
|
3
3
|
import { SelectField } from '../../instance/SelectField.ts';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Creates a reactive computation of a {@link SelectField}'s
|
|
7
6
|
* {@link SelectItem}s, in support of the field's `valueOptions`.
|
|
@@ -2,7 +2,6 @@ import { AnyChildNode } from '../../instance/hierarchy.ts';
|
|
|
2
2
|
import { NodeID } from '../../instance/identity.ts';
|
|
3
3
|
import { ChildrenState } from './createChildrenState.ts';
|
|
4
4
|
import { ReactiveScope } from './scope.ts';
|
|
5
|
-
|
|
6
5
|
export interface EncodedParentState {
|
|
7
6
|
readonly children: readonly NodeID[];
|
|
8
7
|
}
|
|
@@ -4,7 +4,6 @@ import { ReactiveScope } from '../scope.ts';
|
|
|
4
4
|
import { EngineState } from './createEngineState.ts';
|
|
5
5
|
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
6
6
|
import { InternalClientRepresentation } from './representations.ts';
|
|
7
|
-
|
|
8
7
|
export type SpecifiedClientStateFactory<Factory extends OpaqueReactiveObjectFactory, Spec extends StateSpec> = ShallowMutable<SpecifiedState<Spec>> extends Parameters<Factory>[0] ? Factory : never;
|
|
9
8
|
export type ClientState<Spec extends StateSpec> = InternalClientRepresentation<SpecifiedState<Spec>>;
|
|
10
9
|
export declare const createClientState: <Factory extends OpaqueReactiveObjectFactory, Spec extends StateSpec>(scope: ReactiveScope, engineState: EngineState<Spec>, clientStateFactory: SpecifiedClientStateFactory<Factory, Spec>) => ClientState<Spec>;
|
|
@@ -2,6 +2,5 @@ import { ReactiveScope } from '../scope.ts';
|
|
|
2
2
|
import { ClientState } from './createClientState.ts';
|
|
3
3
|
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
4
4
|
import { ReadonlyClientRepresentation } from './representations.ts';
|
|
5
|
-
|
|
6
5
|
export type CurrentState<Spec extends StateSpec> = ReadonlyClientRepresentation<SpecifiedState<Spec>>;
|
|
7
6
|
export declare const createCurrentState: <Spec extends StateSpec>(scope: ReactiveScope, clientState: ClientState<Spec>) => CurrentState<Spec>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactiveScope } from '../scope.ts';
|
|
2
2
|
import { SpecifiedState, StateSpec } from './createSpecifiedState.ts';
|
|
3
3
|
import { EngineRepresentation } from './representations.ts';
|
|
4
|
-
|
|
5
4
|
export type EngineState<Spec extends StateSpec> = EngineRepresentation<SpecifiedState<Spec>>;
|
|
6
5
|
export declare const createEngineState: <Spec extends StateSpec>(scope: ReactiveScope, spec: Spec) => EngineState<Spec>;
|