@getodk/xforms-engine 0.8.0 → 0.10.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.
Files changed (47) hide show
  1. package/dist/client/InputNode.d.ts +4 -2
  2. package/dist/client/NoteNode.d.ts +4 -2
  3. package/dist/client/SelectNode.d.ts +1 -0
  4. package/dist/client/TextRange.d.ts +4 -0
  5. package/dist/index.js +14474 -28463
  6. package/dist/index.js.map +1 -1
  7. package/dist/instance/SelectControl.d.ts +1 -0
  8. package/dist/instance/text/TextRange.d.ts +11 -1
  9. package/dist/integration/xpath/adapter/traversal.d.ts +2 -2
  10. package/dist/lib/codecs/DateValueCodec.d.ts +7 -0
  11. package/dist/lib/codecs/getSharedValueCodec.d.ts +3 -2
  12. package/dist/lib/reactivity/text/createTextRange.d.ts +1 -2
  13. package/dist/parse/expression/TextChunkExpression.d.ts +16 -0
  14. package/dist/parse/text/ItemsetLabelDefinition.d.ts +2 -4
  15. package/dist/parse/text/MessageDefinition.d.ts +3 -7
  16. package/dist/parse/text/abstract/TextElementDefinition.d.ts +2 -8
  17. package/dist/parse/text/abstract/TextRangeDefinition.d.ts +2 -2
  18. package/dist/solid.js +14474 -28463
  19. package/dist/solid.js.map +1 -1
  20. package/package.json +4 -3
  21. package/src/client/InputNode.ts +4 -0
  22. package/src/client/NoteNode.ts +4 -0
  23. package/src/client/SelectNode.ts +2 -0
  24. package/src/client/TextRange.ts +5 -1
  25. package/src/instance/SelectControl.ts +6 -0
  26. package/src/instance/text/TextRange.ts +21 -1
  27. package/src/integration/xpath/adapter/traversal.ts +4 -2
  28. package/src/lib/codecs/DateValueCodec.ts +94 -0
  29. package/src/lib/codecs/getSharedValueCodec.ts +5 -3
  30. package/src/lib/reactivity/text/createTextRange.ts +56 -43
  31. package/src/lib/reactivity/validation/createValidation.ts +1 -3
  32. package/src/parse/expression/TextChunkExpression.ts +78 -0
  33. package/src/parse/text/ItemsetLabelDefinition.ts +8 -12
  34. package/src/parse/text/MessageDefinition.ts +9 -16
  35. package/src/parse/text/abstract/TextElementDefinition.ts +10 -26
  36. package/src/parse/text/abstract/TextRangeDefinition.ts +2 -2
  37. package/src/parse/xpath/semantic-analysis.ts +7 -2
  38. package/dist/parse/expression/TextLiteralExpression.d.ts +0 -9
  39. package/dist/parse/expression/TextOutputExpression.d.ts +0 -7
  40. package/dist/parse/expression/TextReferenceExpression.d.ts +0 -7
  41. package/dist/parse/expression/TextTranslationExpression.d.ts +0 -8
  42. package/dist/parse/expression/abstract/TextChunkExpression.d.ts +0 -17
  43. package/src/parse/expression/TextLiteralExpression.ts +0 -19
  44. package/src/parse/expression/TextOutputExpression.ts +0 -25
  45. package/src/parse/expression/TextReferenceExpression.ts +0 -14
  46. package/src/parse/expression/TextTranslationExpression.ts +0 -38
  47. package/src/parse/expression/abstract/TextChunkExpression.ts +0 -38
@@ -70,13 +70,15 @@ export interface InputNode<V extends ValueType = ValueType> extends BaseValueNod
70
70
  export type StringInputValue = InputValue<'string'>;
71
71
  export type IntInputValue = InputValue<'int'>;
72
72
  export type DecimalInputValue = InputValue<'decimal'>;
73
+ export type DateInputValue = InputValue<'date'>;
73
74
  export type GeopointInputValue = InputValue<'geopoint'>;
74
75
  export type StringInputNode = InputNode<'string'>;
75
76
  export type IntInputNode = InputNode<'int'>;
76
77
  export type DecimalInputNode = InputNode<'decimal'>;
78
+ export type DateInputNode = InputNode<'date'>;
77
79
  export type GeopointInputNode = InputNode<'geopoint'>;
78
- type SupportedInputValueType = 'string' | 'int' | 'decimal' | 'geopoint';
80
+ type SupportedInputValueType = 'string' | 'int' | 'decimal' | 'date' | 'geopoint';
79
81
  type TemporaryStringValueType = Exclude<ValueType, SupportedInputValueType>;
80
82
  export type TemporaryStringValueInputNode = InputNode<TemporaryStringValueType>;
81
- export type AnyInputNode = StringInputNode | IntInputNode | DecimalInputNode | GeopointInputNode | TemporaryStringValueInputNode;
83
+ export type AnyInputNode = StringInputNode | IntInputNode | DecimalInputNode | DateInputNode | GeopointInputNode | TemporaryStringValueInputNode;
82
84
  export {};
@@ -57,13 +57,15 @@ export interface NoteNode<V extends ValueType = ValueType> extends BaseValueNode
57
57
  export type StringNoteValue = NoteValue<'string'>;
58
58
  export type IntNoteValue = NoteValue<'int'>;
59
59
  export type DecimalNoteValue = NoteValue<'decimal'>;
60
+ export type DateNoteValue = NoteValue<'date'>;
60
61
  export type GeopointNoteValue = NoteValue<'geopoint'>;
61
62
  export type StringNoteNode = NoteNode<'string'>;
62
63
  export type IntNoteNode = NoteNode<'int'>;
63
64
  export type DecimalNoteNode = NoteNode<'decimal'>;
65
+ export type DateNoteNode = NoteNode<'date'>;
64
66
  export type GeopointNoteNode = NoteNode<'geopoint'>;
65
- type SupportedNoteValueType = 'string' | 'int' | 'decimal' | 'geopoint';
67
+ type SupportedNoteValueType = 'string' | 'int' | 'decimal' | 'date' | 'geopoint';
66
68
  type TemporaryStringValueType = Exclude<ValueType, SupportedNoteValueType>;
67
69
  export type TemporaryStringValueNoteNode = NoteNode<TemporaryStringValueType>;
68
- export type AnyNoteNode = StringNoteNode | IntNoteNode | DecimalNoteNode | GeopointNoteNode | TemporaryStringValueNoteNode;
70
+ export type AnyNoteNode = StringNoteNode | IntNoteNode | DecimalNoteNode | DateNoteNode | GeopointNoteNode | TemporaryStringValueNoteNode;
69
71
  export {};
@@ -13,6 +13,7 @@ export interface SelectItem {
13
13
  }
14
14
  export type SelectValueOptions = readonly SelectItem[];
15
15
  export interface SelectNodeState extends BaseValueNodeState<readonly string[]> {
16
+ get isSelectWithImages(): boolean;
16
17
  get children(): null;
17
18
  get valueOptions(): readonly SelectItem[];
18
19
  /**
@@ -1,3 +1,4 @@
1
+ import { JRResourceURL } from '../../../common/src/jr-resources/JRResourceURL.ts';
1
2
  import { ActiveLanguage } from './FormLanguage.ts';
2
3
  /**
3
4
  * **COMMENTARY**
@@ -135,4 +136,7 @@ export interface TextRange<Role extends TextRole, Origin extends TextOrigin = Te
135
136
  [Symbol.iterator](): Iterable<TextChunk>;
136
137
  get asString(): string;
137
138
  get formatted(): unknown;
139
+ get imageSource(): JRResourceURL | undefined;
140
+ get audioSource(): JRResourceURL | undefined;
141
+ get videoSource(): JRResourceURL | undefined;
138
142
  }