File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
packages/instantsearch.js/src Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ export type AnswersConnector = Connector<
105
105
AnswersConnectorParams
106
106
> ;
107
107
108
+ /**
109
+ * @deprecated the answers service is no longer offered, and this widget will be removed in InstantSearch.js v5
110
+ */
108
111
const connectAnswers : AnswersConnector = function connectAnswers (
109
112
renderFn ,
110
113
unmountFn = noop
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { component } from '../../lib/suit';
9
9
import { prepareTemplateProps } from '../../lib/templating' ;
10
10
import {
11
11
createDocumentationMessageGenerator ,
12
+ deprecate ,
12
13
getContainerNode ,
13
14
} from '../../lib/utils' ;
14
15
@@ -139,6 +140,9 @@ export type AnswersWidget = WidgetFactory<
139
140
AnswersWidgetParams
140
141
> ;
141
142
143
+ /**
144
+ * @deprecated the answers service is no longer offered, and this widget will be removed in InstantSearch.js v5
145
+ */
142
146
const answersWidget : AnswersWidget = ( widgetParams ) => {
143
147
const {
144
148
container,
@@ -192,4 +196,7 @@ const answersWidget: AnswersWidget = (widgetParams) => {
192
196
} ;
193
197
} ;
194
198
195
- export default answersWidget ;
199
+ export default deprecate (
200
+ answersWidget ,
201
+ 'The answers widget is deprecated and will be removed in InstantSearch.js 5.0'
202
+ ) ;
Original file line number Diff line number Diff line change
1
+ import { deprecate } from '../../lib/utils' ;
2
+
1
3
import type { WidgetFactory , WidgetRenderState } from '../../types' ;
2
4
/* Places.js is an optional dependency, no error should be reported if the package is missing */
3
5
/** @ts -ignore */
@@ -54,6 +56,7 @@ export type PlacesWidget = WidgetFactory<
54
56
/**
55
57
* This widget sets the geolocation value for the search based on the selected
56
58
* result in the Algolia Places autocomplete.
59
+ * @deprecated the places service is no longer offered, and this widget will be removed in InstantSearch.js v5
57
60
*/
58
61
const placesWidget : PlacesWidget = ( widgetParams ) => {
59
62
const {
@@ -172,4 +175,7 @@ const placesWidget: PlacesWidget = (widgetParams) => {
172
175
} ;
173
176
} ;
174
177
175
- export default placesWidget ;
178
+ export default deprecate (
179
+ placesWidget ,
180
+ 'The places widget is deprecated and will be removed in InstantSearch.js 5.0.'
181
+ ) ;
You can’t perform that action at this time.
0 commit comments