-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from getodk/features/34_vue_components
Vue client of @odk-web-forms/xforms-engine to render Groups, Repeats and Text questions
- Loading branch information
Showing
51 changed files
with
2,342 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
packages/ui-solid/fixtures/xforms/repeats/08-complex-repeats.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>Groups and Repeats</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="groups_and_repeats" version="20240326122412"> | ||
<simple_text /> | ||
<group_without_label> | ||
<first_name /> | ||
</group_without_label> | ||
<repeat_without_anything_count /> | ||
<repeat_without_anything jr:template=""> | ||
<last_name /> | ||
</repeat_without_anything> | ||
<repeat_without_anything> | ||
<last_name /> | ||
</repeat_without_anything> | ||
<repeat_with_label jr:template=""> | ||
<middle_name /> | ||
</repeat_with_label> | ||
<repeat_with_label> | ||
<middle_name /> | ||
</repeat_with_label> | ||
<repeat_with_label> | ||
<middle_name /> | ||
</repeat_with_label> | ||
<nested_group_without_label_1> | ||
<nested_group_without_label_1_1> | ||
<a_name /> | ||
</nested_group_without_label_1_1> | ||
</nested_group_without_label_1> | ||
<repeat_with_child_group_1 jr:template=""> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
</repeat_with_child_group_1> | ||
<repeat_with_child_group_1> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
</repeat_with_child_group_1> | ||
<repeat_without_parent_group> | ||
<c_name /> | ||
</repeat_without_parent_group> | ||
<nested_group_1> | ||
<child_group_1_1> | ||
<d_name /> | ||
</child_group_1_1> | ||
</nested_group_1> | ||
<meta> | ||
<instanceID /> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/simple_text" type="string" /> | ||
<bind nodeset="/data/group_without_label/first_name" type="string" /> | ||
<bind nodeset="/data/repeat_without_anything_count" type="string" readonly="true()" | ||
calculate="3" /> | ||
<bind nodeset="/data/repeat_without_anything/last_name" type="string" /> | ||
<bind nodeset="/data/repeat_with_label/middle_name" type="string" /> | ||
<bind nodeset="/data/nested_group_without_label_1/nested_group_without_label_1_1/a_name" | ||
type="string" /> | ||
<bind nodeset="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name" | ||
type="string" /> | ||
<bind nodeset="/data/repeat_without_parent_group/c_name" type="string" /> | ||
<bind nodeset="/data/nested_group_1/child_group_1_1/d_name" type="string" /> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<input ref="/data/simple_text"> | ||
<label>Simple textbox</label> | ||
</input> | ||
<group ref="/data/group_without_label"> | ||
<input ref="/data/group_without_label/first_name"> | ||
<label>First Name</label> | ||
</input> | ||
</group> | ||
<group ref="/data/repeat_without_anything"> | ||
<label></label> | ||
<repeat nodeset="/data/repeat_without_anything" | ||
jr:count=" /data/repeat_without_anything_count "> | ||
<input ref="/data/repeat_without_anything/last_name"> | ||
<label>Last Name</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
<group ref="/data/repeat_with_label"> | ||
<label>Repeat with label</label> | ||
<repeat nodeset="/data/repeat_with_label"> | ||
<input ref="/data/repeat_with_label/middle_name"> | ||
<label>Middle Name</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
<group ref="/data/nested_group_without_label_1"> | ||
<group ref="/data/nested_group_without_label_1/nested_group_without_label_1_1"> | ||
<input | ||
ref="/data/nested_group_without_label_1/nested_group_without_label_1_1/a_name"> | ||
<label>A name (I have two group ancestors without labels)</label> | ||
</input> | ||
</group> | ||
</group> | ||
<group ref="/data/repeat_with_child_group_1"> | ||
<label>Repeat label</label> | ||
<repeat nodeset="/data/repeat_with_child_group_1"> | ||
<group ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1"> | ||
<label> | ||
<output | ||
value=" /data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name " /> | ||
</label> | ||
<input ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name"> | ||
<label>B Name</label> | ||
</input> | ||
</group> | ||
</repeat> | ||
</group> | ||
<repeat nodeset="/data/repeat_without_parent_group"> | ||
<input ref="/data/repeat_without_parent_group/c_name"> | ||
<label>C Name</label> | ||
</input> | ||
</repeat> | ||
|
||
<group ref="/data/nested_group_1"> | ||
<label>Top group label</label> | ||
<group ref="/data/nested_group_1/child_group_1_1"> | ||
<label>child group label</label> | ||
<input ref="/data/nested_group_1/child_group_1_1/d_name"> | ||
<label>D Name</label> | ||
</input> | ||
</group> | ||
</group> | ||
</h:body> | ||
</h:html> |
46 changes: 46 additions & 0 deletions
46
packages/ui-solid/fixtures/xforms/repeats/09-repeat-with-dynamic-label.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>Groups and Repeats</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="groups_and_repeats" version="20240328181053"> | ||
<repeat_with_child_group_1 jr:template=""> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
</repeat_with_child_group_1> | ||
<repeat_with_child_group_1> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
</repeat_with_child_group_1> | ||
<meta> | ||
<instanceID /> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name" | ||
type="string" /> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group ref="/data/repeat_with_child_group_1"> | ||
<label>Repeat label</label> | ||
<repeat nodeset="/data/repeat_with_child_group_1"> | ||
<group ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1"> | ||
<label> | ||
<output value=" ../repeat_with_child_group_1_1/b_name " /> | ||
</label> | ||
<input ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name"> | ||
<label>B Name</label> | ||
</input> | ||
</group> | ||
</repeat> | ||
</group> | ||
</h:body> | ||
</h:html> |
53 changes: 53 additions & 0 deletions
53
packages/ui-solid/fixtures/xforms/repeats/10-repeat-with-multiple-children.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>Groups and Repeats</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="groups_and_repeats" version="20240328181053"> | ||
<repeat_with_child_group_1 jr:template=""> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
<c_name /> | ||
</repeat_with_child_group_1> | ||
<repeat_with_child_group_1> | ||
<repeat_with_child_group_1_1> | ||
<b_name /> | ||
</repeat_with_child_group_1_1> | ||
<c_name /> | ||
</repeat_with_child_group_1> | ||
<meta> | ||
<instanceID /> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name" | ||
type="string" /> | ||
<bind nodeset="/data/repeat_with_child_group_1/c_name" | ||
type="string" /> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group ref="/data/repeat_with_child_group_1"> | ||
<label>Repeat label</label> | ||
<repeat nodeset="/data/repeat_with_child_group_1"> | ||
<group ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1"> | ||
<label> | ||
<output value=" ../repeat_with_child_group_1_1/b_name " /> | ||
</label> | ||
<input ref="/data/repeat_with_child_group_1/repeat_with_child_group_1_1/b_name"> | ||
<label>B Name</label> | ||
</input> | ||
</group> | ||
<input ref="/data/repeat_with_child_group_1/c_name"> | ||
<label>C Name</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
</h:body> | ||
</h:html> |
33 changes: 33 additions & 0 deletions
33
packages/ui-solid/fixtures/xforms/repeats/11-dynamic_label.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>dynamic_label</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="dynamic_label" version="20240404140744"> | ||
<the_group> | ||
<first_name /> | ||
</the_group> | ||
<meta> | ||
<instanceID /> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/the_group/first_name" type="string" /> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group ref="/data/the_group"> | ||
<label> | ||
<output value=" /data/the_group/first_name " /> | ||
</label> | ||
<input ref="/data/the_group/first_name"> | ||
<label>First Name</label> | ||
</input> | ||
</group> | ||
</h:body> | ||
</h:html> |
57 changes: 57 additions & 0 deletions
57
packages/ui-solid/fixtures/xforms/repeats/12-NestedRepeat.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0"?> | ||
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" | ||
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" | ||
xmlns:odk="http://www.opendatakit.org/xforms"> | ||
<h:head> | ||
<h:title>NestedRepeat</h:title> | ||
<model odk:xforms-version="1.0.0"> | ||
<instance> | ||
<data id="NestedRepeat" version="20240415142016"> | ||
<person_repeat jr:template=""> | ||
<person_name /> | ||
<language_repeat jr:template=""> | ||
<language /> | ||
</language_repeat> | ||
<country /> | ||
</person_repeat> | ||
<person_repeat> | ||
<person_name /> | ||
<language_repeat> | ||
<language /> | ||
</language_repeat> | ||
<country /> | ||
</person_repeat> | ||
<meta> | ||
<instanceID /> | ||
</meta> | ||
</data> | ||
</instance> | ||
<bind nodeset="/data/person_repeat/person_name" type="string" /> | ||
<bind nodeset="/data/person_repeat/language_repeat/language" type="string" /> | ||
<bind nodeset="/data/person_repeat/country" type="string" /> | ||
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid" /> | ||
</model> | ||
</h:head> | ||
<h:body> | ||
<group ref="/data/person_repeat"> | ||
<label>Persons</label> | ||
<repeat nodeset="/data/person_repeat"> | ||
<input ref="/data/person_repeat/person_name"> | ||
<label>Person Name</label> | ||
</input> | ||
<group ref="/data/person_repeat/language_repeat"> | ||
<label>Languages</label> | ||
<repeat nodeset="/data/person_repeat/language_repeat"> | ||
<input ref="/data/person_repeat/language_repeat/language"> | ||
<label>Language</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
<input ref="/data/person_repeat/country"> | ||
<label>Country</label> | ||
</input> | ||
</repeat> | ||
</group> | ||
</h:body> | ||
</h:html> |
Oops, something went wrong.