Skip to content

Commit

Permalink
feat(dynamicWidgets): mark as stable (#4899)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv authored Sep 7, 2021
1 parent 3eea6ba commit f97468f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
10 changes: 9 additions & 1 deletion src/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ export { default as connectQueryRules } from './query-rules/connectQueryRules';
export { default as connectVoiceSearch } from './voice-search/connectVoiceSearch';
export { default as EXPERIMENTAL_connectAnswers } from './answers/connectAnswers';
export { default as connectRelevantSort } from './relevant-sort/connectRelevantSort';
export { default as EXPERIMENTAL_connectDynamicWidgets } from './dynamic-widgets/connectDynamicWidgets';

import connectDynamicWidgets from './dynamic-widgets/connectDynamicWidgets';
export { connectDynamicWidgets };
import { deprecate } from '../lib/utils';
/** @deprecated use connectDynamicWidgets */
export const EXPERIMENTAL_connectDynamicWidgets = deprecate(
connectDynamicWidgets,
'use connectDynamicWidgets'
);
4 changes: 2 additions & 2 deletions src/widgets/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ function initiateAllWidgets(): Array<[WidgetNames, Widget | IndexWidget]> {
attributes: ['attr1', 'attr2'],
});
}
case 'dynamicWidgets':
case 'EXPERIMENTAL_dynamicWidgets': {
const EXPERIMENTAL_dynamicWidgets =
widget as Widgets['EXPERIMENTAL_dynamicWidgets'];
const EXPERIMENTAL_dynamicWidgets = widget as Widgets['dynamicWidgets'];
return EXPERIMENTAL_dynamicWidgets({
transformItems(items) {
return items;
Expand Down
11 changes: 10 additions & 1 deletion src/widgets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ export { default as configure } from './configure/configure';
export { default as currentRefinements } from './current-refinements/current-refinements';
export { default as EXPERIMENTAL_answers } from './answers/answers';
export { default as EXPERIMENTAL_configureRelatedItems } from './configure-related-items/configure-related-items';
export { default as EXPERIMENTAL_dynamicWidgets } from './dynamic-widgets/dynamic-widgets';

import dynamicWidgets from './dynamic-widgets/dynamic-widgets';
export { dynamicWidgets };
import { deprecate } from '../lib/utils';
/** @deprecated use dynamicWidgets */
export const EXPERIMENTAL_dynamicWidgets = deprecate(
dynamicWidgets,
'use dynamicWidgets'
);

export { default as geoSearch } from './geo-search/geo-search';
export { default as hierarchicalMenu } from './hierarchical-menu/hierarchical-menu';
export { default as hits } from './hits/hits';
Expand Down

0 comments on commit f97468f

Please sign in to comment.