| 
						
						
						
					 | 
					 | 
					@ -1,11 +1,11 @@
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import React, { PureComponent } from 'react';
 | 
					 | 
					 | 
					 | 
					import React, { memo, useState, useCallback, useEffect } from 'react';
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import PropTypes from 'prop-types';
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import {
 | 
					 | 
					 | 
					 | 
					import {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  sortableContainer,
 | 
					 | 
					 | 
					 | 
					  sortableContainer,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  sortableElement,
 | 
					 | 
					 | 
					 | 
					  sortableElement,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  arrayMove,
 | 
					 | 
					 | 
					 | 
					  arrayMove,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} from 'react-sortable-hoc';
 | 
					 | 
					 | 
					 | 
					} from 'react-sortable-hoc';
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import { basename } from 'path';
 | 
					 | 
					 | 
					 | 
					import { basename } from 'path';
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import { Checkbox } from 'evergreen-ui';
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					const rowStyle = {
 | 
					 | 
					 | 
					 | 
					const rowStyle = {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  padding: 5, fontSize: 14, margin: '7px 0', boxShadow: '0 0 5px 0px rgba(0,0,0,0.3)', overflowY: 'auto', whiteSpace: 'nowrap',
 | 
					 | 
					 | 
					 | 
					  padding: 5, fontSize: 14, margin: '7px 0', boxShadow: '0 0 5px 0px rgba(0,0,0,0.3)', overflowY: 'auto', whiteSpace: 'nowrap',
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -27,46 +27,36 @@ const SortableContainer = sortableContainer(({ items }) => (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  </div>
 | 
					 | 
					 | 
					 | 
					  </div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					));
 | 
					 | 
					 | 
					 | 
					));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class SortableFiles extends PureComponent {
 | 
					 | 
					 | 
					 | 
					const SortableFiles = memo(({
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  constructor(props) {
 | 
					 | 
					 | 
					 | 
					  items: itemsProp, onChange, helperContainer, onAllStreamsChange,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    super(props);
 | 
					 | 
					 | 
					 | 
					}) => {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  const [items, setItems] = useState(itemsProp);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  const [allStreams, setAllStreams] = useState(false);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.state = {
 | 
					 | 
					 | 
					 | 
					  useEffect(() => onAllStreamsChange(allStreams), [allStreams, onAllStreamsChange]);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      items: props.items,
 | 
					 | 
					 | 
					 | 
					  useEffect(() => onChange(items), [items, onChange]);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    };
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  onSortEnd = ({ oldIndex, newIndex }) => {
 | 
					 | 
					 | 
					 | 
					  const onSortEnd = useCallback(({ oldIndex, newIndex }) => {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const { items } = this.state;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const { onChange } = this.props;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const newItems = arrayMove(items, oldIndex, newIndex);
 | 
					 | 
					 | 
					 | 
					    const newItems = arrayMove(items, oldIndex, newIndex);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.setState({ items: newItems });
 | 
					 | 
					 | 
					 | 
					    setItems(newItems);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    onChange(newItems);
 | 
					 | 
					 | 
					 | 
					  }, [items]);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  };
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  render() {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const { helperContainer } = this.props;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const { items } = this.state;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  return (
 | 
					 | 
					 | 
					 | 
					  return (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    <div>
 | 
					 | 
					 | 
					 | 
					    <div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      <div><b>Sort your files for merge</b></div>
 | 
					 | 
					 | 
					 | 
					      <div><b>Sort your files for merge</b></div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      <SortableContainer
 | 
					 | 
					 | 
					 | 
					      <SortableContainer
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        items={items}
 | 
					 | 
					 | 
					 | 
					        items={items}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          onSortEnd={this.onSortEnd}
 | 
					 | 
					 | 
					 | 
					        onSortEnd={onSortEnd}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        helperContainer={helperContainer}
 | 
					 | 
					 | 
					 | 
					        helperContainer={helperContainer}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        getContainer={() => helperContainer().parentNode}
 | 
					 | 
					 | 
					 | 
					        getContainer={() => helperContainer().parentNode}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        helperClass="dragging-helper-class"
 | 
					 | 
					 | 
					 | 
					        helperClass="dragging-helper-class"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      />
 | 
					 | 
					 | 
					 | 
					      />
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      <div style={{ marginTop: 10 }}>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        <Checkbox checked={allStreams} onChange={e => setAllStreams(e.target.checked)} label="Include all streams?" />
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      </div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    </div>
 | 
					 | 
					 | 
					 | 
					    </div>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  );
 | 
					 | 
					 | 
					 | 
					  );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }
 | 
					 | 
					 | 
					 | 
					});
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					SortableFiles.propTypes = {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  onChange: PropTypes.func.isRequired,
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  helperContainer: PropTypes.func.isRequired,
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  items: PropTypes.array.isRequired,
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					};
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					export default SortableFiles;
 | 
					 | 
					 | 
					 | 
					export default SortableFiles;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
 
 |