Skip to content

Commit

Permalink
Imports updated
Browse files Browse the repository at this point in the history
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
  • Loading branch information
dariaterekhova-actionengine committed Sep 1, 2022
1 parent 1a9f725 commit 990ab41
Show file tree
Hide file tree
Showing 41 changed files with 143 additions and 140 deletions.
2 changes: 1 addition & 1 deletion src/connect/with-local-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import React, {Component} from 'react';
import {createSelector} from 'reselect';
import {KeplerGlContext} from 'components';
import {KeplerGlContext} from '@kepler.gl/components';
import {KeplerGlState} from '@kepler.gl/reducers';

const identity = state => state;
Expand Down
6 changes: 3 additions & 3 deletions test/browser-headless/component/map-container-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import {
MapContainerFactory,
EditorFactory,
MapControlFactory,
MapPopoverFactory
} from 'components';
MapPopoverFactory,
mapFieldsSelector
} from '@kepler.gl/components';
import MapboxGLMap from 'react-map-gl';
import Tippy from '@tippyjs/react/headless';
import {gl, InteractionTestRunner} from '@deck.gl/test-utils';

import {mapFieldsSelector} from 'components';
import {mockKeplerProps} from '../../helpers/mock-state';

const MapContainer = appInjector.get(MapContainerFactory);
Expand Down
8 changes: 6 additions & 2 deletions test/browser/components/bottom-widget-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
import React from 'react';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {BottomWidgetFactory, TimeWidgetFactory, AnimationControlFactory} from 'components';
import {appInjector} from 'components';
import {
BottomWidgetFactory,
TimeWidgetFactory,
AnimationControlFactory,
appInjector
} from '@kepler.gl/components';
import {VisStateActions} from '@kepler.gl/actions';

const BottomWidget = appInjector.get(BottomWidgetFactory);
Expand Down
8 changes: 4 additions & 4 deletions test/browser/components/common/animation-control-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import {mountWithTheme} from 'test/helpers/component-utils';
import {
AnimationControlFactory,
PlaybackControlsFactory,
FloatingTimeDisplayFactory
} from 'components';
import {appInjector} from 'components';
FloatingTimeDisplayFactory,
appInjector,
IconButton
} from '@kepler.gl/components';
import {StateWTripGeojson} from 'test/helpers/mock-state';
import {IconButton} from 'components';

import {visStateReducer as reducer} from '@kepler.gl/reducers';

Expand Down
2 changes: 1 addition & 1 deletion test/browser/components/common/color-legend-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import React from 'react';
import test from 'tape';
import {mountWithTheme} from 'test/helpers/component-utils';

import {ColorLegend, LegendRow} from 'components';
import {ColorLegend, LegendRow} from '@kepler.gl/components';

test('Components -> ColorLegend.render', t => {
t.doesNotThrow(() => {
Expand Down
4 changes: 1 addition & 3 deletions test/browser/components/common/file-uploader-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import test from 'tape';
import sinon from 'sinon';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';

import {FileUpload, WarningMsg} from 'components';
import {FileDrop} from 'components';
import {UploadButton} from 'components';
import {FileUpload, WarningMsg, FileDrop, UploadButton} from '@kepler.gl/components';

test('Components -> FileUploader.render', t => {
let wrapper;
Expand Down
4 changes: 1 addition & 3 deletions test/browser/components/common/item-selector-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ import React from 'react';
import test from 'tape';
import sinon from 'sinon';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {ItemSelector} from 'components';
import {Typeahead} from 'components';
import {DropdownList, ListItem} from 'components';
import {ItemSelector, Typeahead, DropdownList, ListItem} from '@kepler.gl/components';

test('Components -> ItemSelector.render', t => {
let wrapper;
Expand Down
3 changes: 1 addition & 2 deletions test/browser/components/common/range-plot-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import React from 'react';
import test from 'tape';
import {mountWithTheme} from 'test/helpers/component-utils';
import {appInjector} from 'components';
import {RangePlotFactory} from 'components';
import {appInjector, RangePlotFactory} from '@kepler.gl/components';

const RangePlot = appInjector.get(RangePlotFactory);

Expand Down
4 changes: 1 addition & 3 deletions test/browser/components/common/range-slider-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import React from 'react';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {RangeSlider, Slider} from 'components';
import {SliderHandle} from 'components';
import {SliderBarHandle} from 'components';
import {RangeSlider, Slider, SliderHandle, SliderBarHandle} from '@kepler.gl/components';

test('Components -> RangeSlider.render', t => {
let wrapper;
Expand Down
2 changes: 1 addition & 1 deletion test/browser/components/container-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
} from '@kepler.gl/reducers';
import {keplerGlInit} from '@kepler.gl/actions';

import Container, {ERROR_MSG} from 'components';
import Container, {ERROR_MSG} from '@kepler.gl/components';
import {DEFAULT_MAPBOX_API_URL} from '@kepler.gl/constants';
const initialCoreState = coreReducer(undefined, keplerGlInit());
const initialState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import React from 'react';
import test from 'tape';
import sinon from 'sinon';
import {PureFeatureActionPanelFactory} from 'components';
import {PureFeatureActionPanelFactory} from '@kepler.gl/components';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';

const FeatureActionPanel = PureFeatureActionPanelFactory();
Expand Down
2 changes: 1 addition & 1 deletion test/browser/components/editor/feature-styles-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import test from 'tape';
import {RenderStates, RenderTypes} from 'react-map-gl-draw';
import {getStyle} from 'components';
import {getStyle} from '@kepler.gl/components';

test('FeatureStyles - getStyles point', t => {
const feature = {
Expand Down
13 changes: 6 additions & 7 deletions test/browser/components/filters/time-widget-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ import {
AnimationSpeedSliderFactory,
Icons,
TimeSliderMarkerFactory,
TimeRangeSliderTimeTitleFactory
} from 'components';
import {IconButton} from 'components';
import {SliderHandle} from 'components';
import {Typeahead} from 'components';

import {appInjector} from 'components';
TimeRangeSliderTimeTitleFactory,
IconButton,
SliderHandle,
Typeahead,
appInjector
} from '@kepler.gl/components';

const TimeWidget = appInjector.get(TimeWidgetFactory);
const TimeRangeSlider = appInjector.get(TimeRangeSliderFactory);
Expand Down
4 changes: 1 addition & 3 deletions test/browser/components/geocoder-panel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import React from 'react';
import sinon from 'sinon';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {GeocoderPanelFactory} from 'components';
import {appInjector} from 'components';
import {testForCoordinates} from 'components';
import {GeocoderPanelFactory, appInjector, testForCoordinates} from '@kepler.gl/components';
import {cmpDatasetData, cmpObjectKeys} from '../../helpers/comparison-utils';

const GeocoderPanel = appInjector.get(GeocoderPanelFactory);
Expand Down
10 changes: 8 additions & 2 deletions test/browser/components/injector-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ import {Provider} from 'react-redux';
import sinon from 'sinon';
import {console as Console} from 'global/window';

import {withState, injectComponents, PanelHeaderFactory} from 'components';
import {withState, injectComponents, PanelHeaderFactory} from '@kepler.gl/components';

import {keplerGlInit} from '@kepler.gl/actions';
import {keplerGlReducerCore as coreReducer, visStateLens, uiStateLens, mapStateLens, mapStyleLens} from '@kepler.gl/reducers';
import {
keplerGlReducerCore as coreReducer,
visStateLens,
uiStateLens,
mapStateLens,
mapStyleLens
} from '@kepler.gl/reducers';

const mockStore = configureStore();
const initialCoreState = coreReducer(undefined, keplerGlInit({}));
Expand Down
6 changes: 3 additions & 3 deletions test/browser/components/kepler-gl-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import {
BottomWidgetFactory,
ModalContainerFactory,
PlotContainerFactory,
GeocoderPanelFactory
} from 'components';
import {NotificationPanelFactory} from 'components';
GeocoderPanelFactory,
NotificationPanelFactory
} from '@kepler.gl/components';
import {DEFAULT_MAP_STYLES, EXPORT_IMAGE_ID} from '@kepler.gl/constants';
import {GEOCODER_DATASET_NAME} from '@kepler.gl/constants';
// mock state
Expand Down
3 changes: 1 addition & 2 deletions test/browser/components/map-container-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';

import sinon from 'sinon';
import test from 'tape';
import {appInjector, MapContainerFactory} from 'components';
import {mapFieldsSelector} from 'components';
import {appInjector, MapContainerFactory, mapFieldsSelector} from '@kepler.gl/components';
import {mockKeplerProps} from '../../helpers/mock-state';

const MapContainer = appInjector.get(MapContainerFactory);
Expand Down
14 changes: 6 additions & 8 deletions test/browser/components/map/map-control-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,25 @@ import sinon from 'sinon';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from '../../../helpers/component-utils';

import {MapControlButton} from 'components';
import {ToolbarItem} from 'components';

import {mapFieldsSelector} from 'components';
import {
MapControlButton,
ToolbarItem,
mapFieldsSelector,
appInjector,
MapLayerSelector,
MapContainerFactory,
MapLegendFactory,
MapControlFactory,
MapControlToolbarFactory
} from 'components';
MapControlToolbarFactory,
Icons
} from '@kepler.gl/components';
import {
mockKeplerProps,
mockKeplerPropsWithState,
StateWSplitMaps,
StateWFiles
} from '../../../helpers/mock-state';

import {Icons} from 'components';

import {LOCALE_CODES, LOCALES} from '@kepler.gl/localization';
import {toggleMapControl} from '@kepler.gl/actions';
import {keplerGlReducerCore} from '@kepler.gl/reducers';
Expand Down
6 changes: 3 additions & 3 deletions test/browser/components/map/map-legend-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ import {
LayerColorLegend,
VisualChannelMetric,
LayerSizeLegend,
SingleColorLegend
} from 'components';
SingleColorLegend,
appInjector
} from '@kepler.gl/components';
import {
StateWFilesFiltersLayerColor,
expectedSavedLayer1 as pointLayer,
expectedSavedLayer0 as hexagonLayer,
expectedSavedLayer2 as geojsonLayer
} from 'test/helpers/mock-state';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {appInjector} from 'components';

const MapLegend = appInjector.get(MapLegendFactory);

Expand Down
3 changes: 1 addition & 2 deletions test/browser/components/map/map-popover-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import test from 'tape';

import {Pin} from '@kepler.gl/constants';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {MapPopoverFactory} from 'components';
import {appInjector} from 'components';
import {MapPopoverFactory, appInjector} from '@kepler.gl/components';

const MapPopover = appInjector.get(MapPopoverFactory);

Expand Down
16 changes: 10 additions & 6 deletions test/browser/components/modals/data-table-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ import CloneDeep from 'lodash.clonedeep';
import {VisStateActions} from '@kepler.gl/actions';
import {visStateReducer} from '@kepler.gl/reducers';

import {FieldTokenFactory} from 'components';
import {Icons} from 'components';
import {DataTableModalFactory, DatasetTabs, DatasetModalTab} from 'components';
import {DataTableFactory} from 'components';
import {OptionDropdown} from 'components';
import {
FieldTokenFactory,
Icons,
DataTableModalFactory,
DatasetTabs,
DatasetModalTab,
DataTableFactory,
OptionDropdown,
appInjector
} from '@kepler.gl/components';
import {testFields, testAllData} from 'test/fixtures/test-csv-data';
import {geoStyleFields, geoStyleRows} from 'test/fixtures/geojson';
import {StateWFiles, testCsvDataId, testGeoJsonDataId} from 'test/helpers/mock-state';
import {appInjector} from 'components/container';

import {createDataContainer} from '@kepler.gl/table';

Expand Down
10 changes: 6 additions & 4 deletions test/browser/components/modals/export-image-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import test from 'tape-catch';
import sinon from 'sinon';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';

import {ExportImageModalFactory} from 'components';
import {ImagePreview} from 'components';
import {appInjector} from 'components';
import {SelectionButton} from 'components';
import {
ExportImageModalFactory,
ImagePreview,
appInjector,
SelectionButton
} from '@kepler.gl/components';

import {INITIAL_UI_STATE} from '@kepler.gl/reducers';

Expand Down
11 changes: 6 additions & 5 deletions test/browser/components/modals/load-data-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
import React from 'react';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import {LoadDataModalFactory} from 'components';
import {ModalTabItem} from 'components';
import {LoadStorageMapFactory} from 'components';

import {appInjector} from 'components';
import {
LoadDataModalFactory,
ModalTabItem,
LoadStorageMapFactory,
appInjector
} from '@kepler.gl/components';

const LoadDataModal = appInjector.get(LoadDataModalFactory);
const LoadStorageMap = appInjector.get(LoadStorageMapFactory);
Expand Down
3 changes: 1 addition & 2 deletions test/browser/components/modals/load-storage-map-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ import React from 'react';
import test from 'tape';
import {mountWithTheme} from 'test/helpers/component-utils';
import sinon from 'sinon';
import {LoadStorageMapFactory} from 'components';
import {LoadStorageMapFactory, appInjector} from '@kepler.gl/components';

import MockProvider from 'test/helpers/mock-provider';
import {appInjector} from 'components';

const mockProvider = new MockProvider();

Expand Down
5 changes: 1 addition & 4 deletions test/browser/components/modals/save-map-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import React from 'react';
import test from 'tape';
import {mountWithTheme, IntlWrapper} from 'test/helpers/component-utils';
import sinon from 'sinon';
import {SaveMapModalFactory} from 'components';

import {CloudTile} from 'components';
import {ImagePreview} from 'components';
import {SaveMapModalFactory, CloudTile, ImagePreview} from '@kepler.gl/components';
import MockProvider from 'test/helpers/mock-provider';

const mockProvider = new MockProvider();
Expand Down
5 changes: 1 addition & 4 deletions test/browser/components/modals/share-map-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import React from 'react';
import test from 'tape';
import {IntlWrapper, mountWithTheme} from 'test/helpers/component-utils';
import sinon from 'sinon';
import {ShareMapUrlModalFactory, SharingUrl} from 'components';

import {CloudTile} from 'components';
import {StatusPanel} from 'components';
import {ShareMapUrlModalFactory, SharingUrl, CloudTile, StatusPanel} from '@kepler.gl/components';
const ShareMapUrlModal = ShareMapUrlModalFactory();

test('Components -> ShareMapUrlModal.mount', t => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import React from 'react';
import test from 'tape';
import {shallow} from 'enzyme';
import {NotificationItemFactory} from 'components';
import {NotificationItemFactory} from '@kepler.gl/components';
import {createNotification} from '@kepler.gl/utils';
import {theme} from '@kepler.gl/styles';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import React from 'react';
import test from 'tape';
import sinon from 'sinon';
import {shallow} from 'enzyme';
import {NotificationItemFactory} from 'components';
import {NotificationPanelFactory} from 'components';
import {NotificationItemFactory, NotificationPanelFactory} from '@kepler.gl/components';
import {createNotification} from '@kepler.gl/utils';
import {theme} from '@kepler.gl/styles';

Expand Down

0 comments on commit 990ab41

Please sign in to comment.