@electerm/electerm-react 2.17.8 → 2.17.16
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.
|
@@ -58,7 +58,7 @@ export class KeywordHighlighterAddon {
|
|
|
58
58
|
const ESC = String.fromCharCode(27) // \x1b
|
|
59
59
|
const BEL = String.fromCharCode(7) // \x07
|
|
60
60
|
// eslint-disable-next-line no-control-regex
|
|
61
|
-
const ansiPattern = new RegExp('(' + ESC + '\\][^' + BEL + ESC + ']*(?:' + BEL + '|' + ESC + '\\\\)|' + ESC + '\\[[0-9;]*[A-Za-z])', 'g')
|
|
61
|
+
const ansiPattern = new RegExp('(' + ESC + '\\][^' + BEL + ESC + ']*(?:' + BEL + '|' + ESC + '\\\\)|' + ESC + '\\[\\??[0-9;]*[A-Za-z])', 'g')
|
|
62
62
|
|
|
63
63
|
const segments = []
|
|
64
64
|
let lastIndex = 0
|
|
@@ -31,7 +31,7 @@ export default function SimpleEditor (props) {
|
|
|
31
31
|
// Set selection range to select the matched text
|
|
32
32
|
textarea.setSelectionRange(match.start, match.end)
|
|
33
33
|
|
|
34
|
-
// Focus the textarea when explicitly navigating
|
|
34
|
+
// Focus the textarea when explicitly navigating to show highlight
|
|
35
35
|
textarea.focus()
|
|
36
36
|
|
|
37
37
|
// Scroll to the selection position
|
|
@@ -58,8 +58,6 @@ export default function SimpleEditor (props) {
|
|
|
58
58
|
|
|
59
59
|
// Auto-search when keyword changes (but not when text is being edited)
|
|
60
60
|
useEffect(() => {
|
|
61
|
-
// Set navigating to true so first match is highlighted when searching
|
|
62
|
-
setIsNavigating(true)
|
|
63
61
|
findMatches()
|
|
64
62
|
}, [searchKeyword])
|
|
65
63
|
|
|
@@ -99,10 +99,10 @@ export default function WidgetForm ({ widget, onSubmit, loading, hasRunningInsta
|
|
|
99
99
|
}
|
|
100
100
|
return (
|
|
101
101
|
<Alert
|
|
102
|
-
|
|
102
|
+
title='Downloading package may take some time on first use...'
|
|
103
103
|
type='warning'
|
|
104
104
|
showIcon
|
|
105
|
-
className='
|
|
105
|
+
className='mg1t'
|
|
106
106
|
/>
|
|
107
107
|
)
|
|
108
108
|
}
|
|
@@ -123,7 +123,7 @@ export default function WidgetForm ({ widget, onSubmit, loading, hasRunningInsta
|
|
|
123
123
|
</h4>
|
|
124
124
|
<p>{info.description}</p>
|
|
125
125
|
</div>
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
<Form
|
|
128
128
|
form={form}
|
|
129
129
|
onFinish={handleSubmit}
|
|
@@ -144,6 +144,7 @@ export default function WidgetForm ({ widget, onSubmit, loading, hasRunningInsta
|
|
|
144
144
|
{txt}
|
|
145
145
|
</Button>
|
|
146
146
|
</Tooltip>
|
|
147
|
+
{renderWarn()}
|
|
147
148
|
</Form.Item>
|
|
148
149
|
</Form>
|
|
149
150
|
</div>
|