UNPKG

@empathyco/x-components

Version:
34 lines (31 loc) 968 B
import { createStoreEmitters } from '../../../store/utils/store-emitters.utils.js'; import { areFiltersDifferent } from '../../../utils/filters.js'; import { isNewQuery } from '../../../utils/is-new-query.js'; import { facetsXStoreModule } from './module.js'; /** * {@link StoreEmitters} For the facets module. * * @internal */ const facetsEmitters = createStoreEmitters(facetsXStoreModule, { SelectedFiltersChanged: { selector: (_, getters) => getters.selectedFilters, filter: areFiltersDifferent, metadata: { priority: 12, }, }, SelectedFiltersForRequestChanged: { selector: (_, getters) => getters.selectedFiltersForRequest, filter: areFiltersDifferent, metadata: { priority: 12, }, }, FacetsQueryChanged: { selector: state => state.query, filter: isNewQuery, }, }); export { facetsEmitters }; //# sourceMappingURL=emitters.js.map