mockaton 10.3.3 → 10.3.4
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.
- package/package.json +1 -1
- package/src/ApiConstants.js +3 -0
- package/src/Dashboard.js +6 -0
package/package.json
CHANGED
package/src/ApiConstants.js
CHANGED
|
@@ -28,8 +28,11 @@ export const DF = { // Dashboard Fields (XHR)
|
|
|
28
28
|
syncVersion: 'last_received_sync_version'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
// TODO @ThinkAbout these affecting partial matches when bulk-selecting
|
|
32
|
+
// e.g. 'ton' would match
|
|
31
33
|
export const AUTOGENERATED_500_COMMENT = '(Mockaton 500)'
|
|
32
34
|
export const DEFAULT_MOCK_COMMENT = '(default)'
|
|
35
|
+
|
|
33
36
|
export const EXT_FOR_UNKNOWN_MIME = 'unknown'
|
|
34
37
|
export const LONG_POLL_SERVER_TIMEOUT = 8_000
|
|
35
38
|
|
package/src/Dashboard.js
CHANGED
|
@@ -239,6 +239,7 @@ function BulkSelector() {
|
|
|
239
239
|
mockaton.bulkSelectByComment(value)
|
|
240
240
|
.then(parseError)
|
|
241
241
|
.then(updateState)
|
|
242
|
+
.then(() => focus(`.${CSS.BulkSelector}`))
|
|
242
243
|
.catch(onError)
|
|
243
244
|
}
|
|
244
245
|
const disabled = !comments.length
|
|
@@ -295,6 +296,7 @@ function ProxyFallbackField() {
|
|
|
295
296
|
mockaton.setProxyFallback(this.value.trim())
|
|
296
297
|
.then(parseError)
|
|
297
298
|
.then(updateState)
|
|
299
|
+
.then(() => focus(`.${CSS.FallbackBackend} input`))
|
|
298
300
|
.catch(onError)
|
|
299
301
|
}
|
|
300
302
|
return (
|
|
@@ -334,6 +336,7 @@ function ResetButton() {
|
|
|
334
336
|
mockaton.reset()
|
|
335
337
|
.then(parseError)
|
|
336
338
|
.then(updateState)
|
|
339
|
+
.then(() => focus(`.${CSS.ResetButton}`))
|
|
337
340
|
.catch(onError)
|
|
338
341
|
}
|
|
339
342
|
return (
|
|
@@ -800,6 +803,9 @@ function mockSelectorFor(method, urlMask) {
|
|
|
800
803
|
return trFor(method, urlMask)?.querySelector(`select.${CSS.MockSelector}`)
|
|
801
804
|
}
|
|
802
805
|
|
|
806
|
+
function focus(selector) {
|
|
807
|
+
document.querySelector(selector)?.focus()
|
|
808
|
+
}
|
|
803
809
|
|
|
804
810
|
/** # Misc */
|
|
805
811
|
|