Skip to content

Commit f97468f

Browse files
authoredSep 7, 2021
feat(dynamicWidgets): mark as stable (#4899)
DX-2422
1 parent 3eea6ba commit f97468f

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed
 

‎src/connectors/index.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@ export { default as connectQueryRules } from './query-rules/connectQueryRules';
2626
export { default as connectVoiceSearch } from './voice-search/connectVoiceSearch';
2727
export { default as EXPERIMENTAL_connectAnswers } from './answers/connectAnswers';
2828
export { default as connectRelevantSort } from './relevant-sort/connectRelevantSort';
29-
export { default as EXPERIMENTAL_connectDynamicWidgets } from './dynamic-widgets/connectDynamicWidgets';
29+
30+
import connectDynamicWidgets from './dynamic-widgets/connectDynamicWidgets';
31+
export { connectDynamicWidgets };
32+
import { deprecate } from '../lib/utils';
33+
/** @deprecated use connectDynamicWidgets */
34+
export const EXPERIMENTAL_connectDynamicWidgets = deprecate(
35+
connectDynamicWidgets,
36+
'use connectDynamicWidgets'
37+
);

‎src/widgets/__tests__/index.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ function initiateAllWidgets(): Array<[WidgetNames, Widget | IndexWidget]> {
128128
attributes: ['attr1', 'attr2'],
129129
});
130130
}
131+
case 'dynamicWidgets':
131132
case 'EXPERIMENTAL_dynamicWidgets': {
132-
const EXPERIMENTAL_dynamicWidgets =
133-
widget as Widgets['EXPERIMENTAL_dynamicWidgets'];
133+
const EXPERIMENTAL_dynamicWidgets = widget as Widgets['dynamicWidgets'];
134134
return EXPERIMENTAL_dynamicWidgets({
135135
transformItems(items) {
136136
return items;

‎src/widgets/index.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ export { default as configure } from './configure/configure';
55
export { default as currentRefinements } from './current-refinements/current-refinements';
66
export { default as EXPERIMENTAL_answers } from './answers/answers';
77
export { default as EXPERIMENTAL_configureRelatedItems } from './configure-related-items/configure-related-items';
8-
export { default as EXPERIMENTAL_dynamicWidgets } from './dynamic-widgets/dynamic-widgets';
8+
9+
import dynamicWidgets from './dynamic-widgets/dynamic-widgets';
10+
export { dynamicWidgets };
11+
import { deprecate } from '../lib/utils';
12+
/** @deprecated use dynamicWidgets */
13+
export const EXPERIMENTAL_dynamicWidgets = deprecate(
14+
dynamicWidgets,
15+
'use dynamicWidgets'
16+
);
17+
918
export { default as geoSearch } from './geo-search/geo-search';
1019
export { default as hierarchicalMenu } from './hierarchical-menu/hierarchical-menu';
1120
export { default as hits } from './hits/hits';

0 commit comments

Comments
 (0)
Please sign in to comment.