Blog/Components/Pages/Query.razor 2 K · 62 lines · raw · history

1 @page "/Query"
2 <PageTitle>Query</PageTitle>
3 <PageScript Src="./Components/Pages/Query.razor.js"/>
4
5 <main>
6 <div class="scroll-nav">
7 <button id="scrollTopButton" type="button" aria-label="Scroll to top">↑</button>
8 <button id="scrollFavoritesButton" type="button" aria-label="Scroll to favorites">↓</button>
9 </div>
10
11 <div class="flex-row">
12 <label for="lang">Query language</label>
13 <select id="lang">
14 <option value="jsonql" selected>jsonql-js</option>
15 <option value="dactal">DACTAL</option>
16 </select>
17 <button id="favoriteButton" type="button">Save as favorite</button>
18 </div>
19 <textarea id="input" class="editor" autofocus>SELECT *
20 FROM personen AS p
21 WHERE 'EenhoofdigOuderlijkGezag' IN p.gezag[].type</textarea>
22 <div id="results">
23 </div>
24 <Log/>
25
26 <dialog id="favoriteNameDialog">
27 <Panel Legend="Save as favorite">
28 <form method="dialog" id="favoriteNameForm">
29 <p>
30 <input id="favoriteNameInput" type="text" placeholder="Name"/>
31 </p>
32 <div class="flex-row">
33 <button type="submit">Save</button>
34 <button id="cancelFavoriteNameButton" type="reset">Cancel</button>
35 </div>
36 </form>
37 </Panel>
38 </dialog>
39
40 <Panel Legend="Favorites">
41 <div id="favoritesList" class="grid-stores">
42 </div>
43 </Panel>
44
45 <Panel Legend="History">
46 <div id="historyList" class="grid-stores">
47 </div>
48 </Panel>
49
50 <Panel Legend="Credits">
51 <div>
52 jsonql-js, a pure-JS SQL-like query language for JSON
53 </div>
54 <div>
55 <a href="https://dactal.org">DACTAL</a> by <a href="https://furia.com">glenn mcdonald</a>
56 </div>
57 <div>
58 personen dataset from <a href="https://github.com/BRP-API/Haal-Centraal-BRP-bevragen">Haal-Centraal-BRP-bevragen
59 mock-data</a>
60 </div>
61 </Panel>
62 </main>