import { AnyAction } from 'redux' ; import { ThunkDispatch } from 'redux-thunk' ; import { connect } from 'react-redux' ; import { JoinEditor } from './join_editor' ; import { getSelectedLayerJoinDescriptors } from '../../../selectors/map_selectors' ; import { setJoinsForLayer } from '../../../actions' ; import { MapStoreState } from '../../../reducers/store' ; import { ILayer } from '../../../classes/layers/layer' ; import { JoinDescriptor } from '../../../../common/descriptor_types' ; function mapStateToProps ( state ) { return { joins : getSelectedLayerJoinDescriptors ( state ) , } ; } function mapDispatchToProps ( dispatch ) { return { onChange : ( layer , joins ) => { dispatch ( setJoinsForLayer ( layer , joins ) ) ; } , } ; } const connectedJoinEditor = connect ( mapStateToProps , mapDispatchToProps ) ( JoinEditor ) ; export { connectedJoinEditor as JoinEditor } ; export type { JoinField } from './join_editor' ;