-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathdemo.html
More file actions
253 lines (224 loc) · 6.65 KB
/
Copy pathdemo.html
File metadata and controls
253 lines (224 loc) · 6.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org"/>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Form fields</title>
<link type="text/css" rel="stylesheet" href="../style/demo-style.css" />
<!-- used for production ready documentation -->
<!-- note: one does not need whole mashlib, solid-ui is sufficient also -->
<script type="text/javascript" src="https://solidos.github.io/mashlib/dist/mashlib.js"></script>
<!-- to use only solid-ui -->
<!--<script type="text/javascript" src="https://solidos.github.io/solid-ui/dist/solid-ui.js"></script>-->
<!-- used for local development -->
<!-- make sure to use the latest build version by running npm run build-form-examples first -->
<!-- <script type="text/javascript" src="solid-ui.js"></script> -->
<script type="text/javascript" src="test-form.js"></script>
</head>
<body>
<h1>Form fields</h1>
<pre id="Prolog" style="display: none">
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix sched: <http://www.w3.org/ns/pim/schedule#>.
@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ui: <http://www.w3.org/ns/ui#>.
@prefix trip: <http://www.w3.org/ns/pim/trip#>.
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix ex: <#>. # Things in the examples
@prefix : <#>.
</pre
>
<div>
<table
style="border-collapse: collapse; border: 0.1em solid gray"
summary="Table of input data values and UI outputs generated"
>
<tbody>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one text field
ex:form
a ui:SingleLineTextField; ui:label "name";
ui:property vcard:fn .
</pre
>
</td>
<td class="target">
<pre>
ex:this vcard:fn "Alice" .
</pre
>
</td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one text field
ex:form
a ui:MultiLineTextField ;
ui:property rdfs:comment .
</pre
>
</td>
<td class="target">
<pre>
ex:this rdfs:comment "Here we made a comment" .
</pre
>
</td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one boolean field
ex:form
a ui:BooleanField ;
ui:property ex:allDay .
</pre
>
</td>
<td class="target">
<pre>
ex:this ex:allDay true .
</pre
>
</td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# one Tristate field
ex:form
a ui:TristateField ;
ui:property ex:allDay .
</pre
>
</td>
<td class="target">
<pre>
# Commented oout so there is no value true or false:
# ex:this ex:allDay true .</pre
>
</td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one integer field
ex:form
a ui:IntegerField ;
ui:property foaf:age .
</pre
>
</td>
<td class="target"><pre>ex:this foaf:age 6 .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one decimal field
ex:form
a ui:DecimalField ;
ui:property ex:price .
</pre
>
</td>
<td class="target"><pre>ex:this ex:price 12.47 .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one floating point field
ex:form
a ui:FloatField ;
ui:property ex:weight .
</pre
>
</td>
<td class="target"><pre> ex:this ex:weight 1.56769e23 .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one color field
ex:form
a ui:ColorField ;
ui:property ui:backgroundColor .
</pre
>
</td>
<td class="target"><pre>ex:this ui:backgroundColor "#ffccff" .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one date field
ex:form
a ui:DateField;
ui:property cal:starts .
</pre
>
</td>
<td class="target"><pre>ex:this cal:starts "2021-10-12"^^xsd:date .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A date-time field
ex:form
a ui:DateTimeField ;
ui:property cal:starts .
</pre
>
</td>
<td class="target">
<pre> ex:this cal:starts "2021-10-12T12:34:23Z"^^xsd:dateTime .</pre>
</td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one phone field
ex:form
a ui:PhoneField ;
ui:property vcard:hasPhone . # @@ check
</pre
>
</td>
<td class="target"><pre>ex:this vcard:hasPhone <tel:+1-55-555-1212> .</pre></td>
<td class="output"></td>
</tr>
<tr class="form-demo">
<td class="input">
<pre>
# A simple form with one email address field
ex:form
a ui:EmailField ;
ui:property vcard:hasEmail . # @@ chcek
</pre
>
</td>
<td class="target">
<pre>ex:this vcard:hasEmail <mailto:info@example.com> .</pre>
</td>
<td class="output"></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>