-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathexample.html
More file actions
200 lines (172 loc) · 4.45 KB
/
example.html
File metadata and controls
200 lines (172 loc) · 4.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="robots" content="noindex">
<!--
Example HTML app that uses the WASM or JS-only build of the GS1 Barcode Syntax Engine.
Copyright (c) 2022-2026 GS1 AISBL.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
The API reference for the native C library is available here:
https://gs1.github.io/gs1-syntax-engine/
-->
<title>GS1 Barcode Syntax Engine HTML demo | Loading ...</title>
<style>
body {
padding: 0;
margin: 0;
background-color: #f6f6f6;
background: #ccc;
background-repeat: no-repeat;
}
#container {
position: relative;
min-width: 900px;
max-width: 1000px;
min-height: 650px;
margin: 20px auto 0 auto;
padding: 8px;
background-color: #fff;
border-style: solid;
border-width: 0 1px 1px 1px;
border-color: #bbb;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.9em
}
#topbar {
position: absolute;
left: 0;
top: 0;
width: 100%;
line-height: 175%;
padding: 10px 0 0 30px;
}
#rightbar {
display: block;
position: absolute;
right: 25px;
top: 80px;
bottom: 0;
height: auto;
line-height: 250%;
text-align: right;
}
#contents {
padding: 65px 230px 20px 20px;
}
#maintable table {
width: 100%;
}
#messages {
padding: 10px;
}
.datatextarea {
width: 100%;
height: 50px;
margin: 5px 0 5px 0;
resize: vertical;
word-break: break-all;
}
.bigbox {
width: 100%;
height: 50px;
margin: 5px 0 5px 0;
resize: vertical;
word-break: break-all;
}
.smallbox {
width: 100%;
height: 25px;
margin: 5px 0 5px 0;
resize: none;
word-break: break-all;
}
.hritextarea {
width: 100%;
height: 100px;
margin: 5px 0 5px 0;
resize: vertical;
word-break: break-all;
}
.processbutton {
width: 175px;
height: 40px;
}
.infobox {
width: 100%;
border: none;
font-size: 1.2em;
}
.errbox {
width: 100%;
border: none;
font-size: 1.2em;
font-weight: bold;
}
</style>
</head>
<body onload="init();">
<div id="container">
<div id="topbar">
1. Enter bracketed AI syntax, unbracketed AI syntax ("^..."), GS1 Digital Link URI, plain or barcode scan data ("]Sm..."; "{GS}" for ASCII 29)
<br>
2. Click "Process input data"
</div><!-- topbar -->
<div id="contents">
<div id="rightbar">
<button id="process" type="button" onclick="process_clicked();" class="processbutton">Process input data</button>
<br><br>
<label for="unknownais">Permit unknown AIs</label><input id="unknownais" type="checkbox" onclick="unknownais_clicked();">
<br>
<label for="associations">Validate AI requisites</label><input id="associations" type="checkbox" onclick="associations_clicked();">
<br>
<label for="datatitles">Include data titles in HRI</label><input id="datatitles" type="checkbox" onclick="datatitles_clicked();">
<br>
<label for="zerosuppdl">Permit 0-supp (01) in DL</label><input id="zerosuppdl" type="checkbox" onclick="zerosuppdl_clicked();">
</div><!-- rightbar -->
<div id="maintable">
<table>
<tr>
<td style="width: 210px; font-weight: bold"><label for="data">Input data</label></td>
<td><textarea id="data" maxlength="2048" oninput="data_changed();" class="datatextarea"></textarea></td>
</tr>
<tr>
<td><label for="syntax">Detected syntax</label></td>
<td><textarea id="syntax" readonly class="smallbox"></textarea></td>
</tr>
<tr>
<td><label for="datastr">Barcode message (^ = FNC1)</label></td>
<td><textarea id="datastr" readonly class="bigbox"></textarea></td>
</tr>
<tr>
<td><label for="elementstring">GS1 AI Element String</label></td>
<td><textarea id="elementstring" readonly class="bigbox"></textarea></td>
</tr>
<tr>
<td><label for="dl">GS1 Digital Link URI<br>(canonical form)</label></td>
<td><textarea id="dl" readonly class="bigbox"></textarea></td>
</tr>
<tr>
<td><label for="hri">HRI text</label></td>
<td><textarea id="hri" readonly class="hritextarea"></textarea></td>
</tr>
</table>
</div><!-- maintable -->
</div><!-- contents -->
<div id="messages">
<input type="text" id="info" value="" readonly class="infobox">
<br><br>
<input type="text" id="errmsg" value="" readonly class="errbox">
</div><!-- messages -->
</div><!-- container -->
<script type="module" src="example.mjs"></script>
</body>
</html>