@@ -2,7 +2,7 @@ import { storiesOf } from '@storybook/html';
22import { action } from '@storybook/addon-actions' ;
33import { withHits , withLifecycle } from '../.storybook/decorators' ;
44import createInfoBox from '../.storybook/utils/create-info-box' ;
5- import instantsearchPlacesWidget from 'places.js/instantsearchWidget' ;
5+ // import instantsearchPlacesWidget from 'places.js/instantsearchWidget';
66import injectScript from 'scriptjs' ;
77
88const API_KEY = 'AIzaSyBawL8VbstJDdU5397SUX7pEt9DslAwWgQ' ;
@@ -93,37 +93,38 @@ stories
9393 ) ;
9494
9595// With Places
96- stories . add (
97- 'with position from Places' ,
98- withHitsAndConfigure ( ( { search, container, instantsearch } ) =>
99- injectGoogleMaps ( ( ) => {
100- const placesElement = document . createElement ( 'input' ) ;
101- const mapElement = document . createElement ( 'div' ) ;
102- mapElement . style . marginTop = '20px' ;
103-
104- container . appendChild ( placesElement ) ;
105- container . appendChild ( mapElement ) ;
106-
107- search . addWidgets ( [
108- instantsearch . widgets . configure ( {
109- aroundRadius : 20000 ,
110- } ) ,
111-
112- instantsearchPlacesWidget ( {
113- container : placesElement ,
114- defaultPosition : [ '37.7793' , '-122.419' ] ,
115- } ) ,
116-
117- instantsearch . widgets . geoSearch ( {
118- googleReference : window . google ,
119- container : mapElement ,
120- enableClearMapRefinement : false ,
121- initialZoom,
122- } ) ,
123- ] ) ;
124- } )
125- )
126- ) ;
96+ // @TODO reactivate story once the widget is compatible with 4.x.
97+ // stories.add(
98+ // 'with position from Places',
99+ // withHitsAndConfigure(({ search, container, instantsearch }) =>
100+ // injectGoogleMaps(() => {
101+ // const placesElement = document.createElement('input');
102+ // const mapElement = document.createElement('div');
103+ // mapElement.style.marginTop = '20px';
104+
105+ // container.appendChild(placesElement);
106+ // container.appendChild(mapElement);
107+
108+ // search.addWidgets([
109+ // instantsearch.widgets.configure({
110+ // aroundRadius: 20000,
111+ // }),
112+
113+ // instantsearchPlacesWidget({
114+ // container: placesElement,
115+ // defaultPosition: ['37.7793', '-122.419'],
116+ // }),
117+
118+ // instantsearch.widgets.geoSearch({
119+ // googleReference: window.google,
120+ // container: mapElement,
121+ // enableClearMapRefinement: false,
122+ // initialZoom,
123+ // }),
124+ // ]);
125+ // })
126+ // )
127+ // );
127128
128129// Only UI
129130stories
0 commit comments