@things-factory/api 7.0.1-alpha.64 → 7.0.1-alpha.70
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.
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { LitElement, html, css } from 'lit'
|
|
2
4
|
|
|
3
5
|
class ApiNavigator extends LitElement {
|
|
@@ -22,8 +24,8 @@ class ApiNavigator extends LitElement {
|
|
|
22
24
|
.nav-bar * {
|
|
23
25
|
vertical-align: middle;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
--
|
|
27
|
+
md-icon {
|
|
28
|
+
--md-icon-size: 14px;
|
|
27
29
|
padding-left: var(--padding-narrow);
|
|
28
30
|
position: relative;
|
|
29
31
|
margin-top: -2px;
|
|
@@ -47,7 +49,7 @@ class ApiNavigator extends LitElement {
|
|
|
47
49
|
width: 25px;
|
|
48
50
|
}
|
|
49
51
|
label,
|
|
50
|
-
|
|
52
|
+
md-icon {
|
|
51
53
|
display: none;
|
|
52
54
|
}
|
|
53
55
|
.nav-bar {
|
|
@@ -93,7 +95,7 @@ class ApiNavigator extends LitElement {
|
|
|
93
95
|
|
|
94
96
|
return html`
|
|
95
97
|
<div class="nav-bar" ?scrolling=${scrolling}>
|
|
96
|
-
<
|
|
98
|
+
<md-icon>anchor</md-icon> <label>Quick Find : </label>
|
|
97
99
|
${this.indexes.map(idx => {
|
|
98
100
|
const isActiveIndex = activeIndexes.indexOf(idx) >= 0
|
|
99
101
|
return html`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { html, css, LitElement } from 'lit'
|
|
2
4
|
|
|
3
5
|
const NOAPI = {
|
|
@@ -98,10 +100,10 @@ class APITester extends LitElement {
|
|
|
98
100
|
background-color: #f1f1f1;
|
|
99
101
|
padding: var(--padding-default);
|
|
100
102
|
border-left: 5px solid rgba(0, 0, 0, 0.2);
|
|
101
|
-
--
|
|
103
|
+
--md-icon-size: 18px;
|
|
102
104
|
color: var(--secondary-background-color);
|
|
103
105
|
}
|
|
104
|
-
[note]
|
|
106
|
+
[note] md-icon {
|
|
105
107
|
margin-right: 5px;
|
|
106
108
|
vertical-align: middle;
|
|
107
109
|
}
|
|
@@ -170,7 +172,7 @@ class APITester extends LitElement {
|
|
|
170
172
|
</tr>
|
|
171
173
|
`
|
|
172
174
|
)
|
|
173
|
-
: html`<div note><
|
|
175
|
+
: html`<div note><md-icon>content_paste</md-icon>no parameter</div>`}
|
|
174
176
|
</table>
|
|
175
177
|
</div>
|
|
176
178
|
|
|
@@ -192,25 +194,25 @@ class APITester extends LitElement {
|
|
|
192
194
|
</p>
|
|
193
195
|
`
|
|
194
196
|
: api.body == 'form-data' || api.body == 'x-www-form-urlencoded'
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
197
|
+
? html`
|
|
198
|
+
<label>form parameters</label>
|
|
199
|
+
<p>
|
|
200
|
+
${api.parameters && api.parameters.length > 0
|
|
201
|
+
? 'You should set following query parameters'
|
|
202
|
+
: 'No form parameters required'}
|
|
203
|
+
</p>
|
|
204
|
+
`
|
|
205
|
+
: api.body == 'raw'
|
|
206
|
+
? html`
|
|
207
|
+
<label>body</label>
|
|
208
|
+
<p>You can set body in JSON format</p>
|
|
209
|
+
`
|
|
210
|
+
: api.body == 'binary'
|
|
211
|
+
? html`
|
|
212
|
+
<label>attachment</label>
|
|
213
|
+
<p>attachment description..</p>
|
|
214
|
+
`
|
|
215
|
+
: html``}
|
|
214
216
|
|
|
215
217
|
<form parameters @submit=${e => this.onSubmit(e)}>
|
|
216
218
|
${api.method == 'get' || api.body == 'form-data' || api.body == 'x-www-form-urlencoded'
|
|
@@ -225,14 +227,14 @@ class APITester extends LitElement {
|
|
|
225
227
|
</tr>
|
|
226
228
|
`
|
|
227
229
|
)
|
|
228
|
-
: html`<div note><
|
|
230
|
+
: html`<div note><md-icon>content_paste</md-icon>no parameter</div>`}
|
|
229
231
|
</table>
|
|
230
232
|
`
|
|
231
233
|
: api.body == 'raw'
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
? html` <textarea name="body" token rows="4"></textarea> `
|
|
235
|
+
: api.body == 'binary'
|
|
236
|
+
? html` <input type="file" id="body" name="body" accept="*/*" /> `
|
|
237
|
+
: html``}
|
|
236
238
|
<input type="submit" value="Submit" button-primary />
|
|
237
239
|
</form>
|
|
238
240
|
|