@electerm/electerm-react 1.37.121 → 1.37.126

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.
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { Input } from 'antd'
6
+ import InputNative from './native-input'
6
7
  import React from 'react'
7
8
  import { findLastIndex } from 'lodash-es'
8
9
  import uid from '../../common/uid'
@@ -57,7 +58,7 @@ export default class InputAutoFocus extends React.PureComponent {
57
58
  const { type, ...rest } = this.props
58
59
  const Dom = type === 'password'
59
60
  ? Input.Password
60
- : Input
61
+ : type === 'native' ? InputNative : Input
61
62
  return (
62
63
  <Dom
63
64
  {...rest}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * input with auto focus
3
+ */
4
+
5
+ import React from 'react'
6
+ import './native-input.styl'
7
+
8
+ export default function InputNative (props) {
9
+ const { value, type, onChange, onPressEnter, addonAfter = null, ...rest } = props
10
+ return (
11
+ <span
12
+ className='ant-input-group-wrapper'
13
+ data-id={props['data-id']}
14
+ >
15
+ <span className='ant-input-wrapper ant-input-group'>
16
+ <input
17
+ class='ant-input native-input'
18
+ type='text'
19
+ value={value}
20
+ onChange={onChange}
21
+ onPressEnter={onPressEnter}
22
+ {...rest}
23
+ />
24
+ </span>
25
+ <span class='ant-input-group-addon'>
26
+ {addonAfter}
27
+ </span>
28
+ </span>
29
+ )
30
+ }
@@ -0,0 +1,7 @@
1
+ @require '../../css/includes/theme-default'
2
+ .native-input
3
+ color text
4
+ background-color main-light
5
+ border-color main-light
6
+ &:focus
7
+ border-color main-light
@@ -590,6 +590,7 @@ export default class ItemListTree extends Component {
590
590
  onChange={this.handleChangeEdit}
591
591
  onPressEnter={this.handleSubmitEdit}
592
592
  addonAfter={confirm}
593
+ type='native'
593
594
  />
594
595
  )
595
596
  }
@@ -902,6 +903,7 @@ export default class ItemListTree extends Component {
902
903
  onPressEnter={this.handleSubmitSub}
903
904
  onChange={this.handleChangeBookmarkGroupTitleSub}
904
905
  addonAfter={confirm}
906
+ type='native'
905
907
  />
906
908
  )}
907
909
  />
@@ -295,7 +295,6 @@ export default class FileSection extends React.Component {
295
295
  } = toFile
296
296
 
297
297
  let operation = ''
298
-
299
298
  // same side and drop to file = drop to folder
300
299
  if (!fromFileManager && fromType === toType && !isDirectoryTo) {
301
300
  return
@@ -331,9 +330,9 @@ export default class FileSection extends React.Component {
331
330
  filterFiles = async (files) => {
332
331
  const res = []
333
332
  for (const file of files) {
334
- const { base, path } = file
333
+ const { name, path } = file
335
334
  const info = await getLocalFileInfo(
336
- resolve(path, base)
335
+ resolve(path, name)
337
336
  )
338
337
  if (info) {
339
338
  res.push(info)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.37.121",
3
+ "version": "1.37.126",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",