2 * Copyright © 2016-2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 import { connect } from 'react-redux';
18 import React from 'react';
19 import PropTypes from 'prop-types';
20 import { tabsMapping as onboardTabsMapping } from '../OnboardConstants.js';
21 import { actionTypes } from './FilterConstants.js';
23 import Panel from 'sdc-ui/lib/react/Panel.js';
30 } from './FilterComponents.jsx';
32 const mapStateToProps = ({ onboard: { filter, activeTab } }) => {
39 const mapActionsToProps = dispatch => {
41 onDataChanged: deltaData => {
43 type: actionTypes.FILTER_DATA_CHANGED,
50 const Filter = ({ onDataChanged, data, activeTab }) => {
52 <Panel className="catalog-filter">
53 <ItemStatus data={data} onDataChanged={onDataChanged} />
54 <EntityType data={data} onDataChanged={onDataChanged} />
55 <Permissions data={data} onDataChanged={onDataChanged} />
56 <OnboardingProcedure data={data} onDataChanged={onDataChanged} />
57 {activeTab === onboardTabsMapping.CATALOG && (
58 <ByVendorView data={data} onDataChanged={onDataChanged} />
65 onDataChanged: PropTypes.func,
66 data: PropTypes.object,
67 activeTab: PropTypes.number
70 export default connect(mapStateToProps, mapActionsToProps)(Filter);