instantsearch.js 4.33.2 → 4.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +2 -1
- package/cjs/components/Answers/Answers.js +1 -1
- package/cjs/components/Breadcrumb/Breadcrumb.js +1 -1
- package/cjs/components/ClearRefinements/ClearRefinements.js +1 -1
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +3 -3
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/cjs/components/Hits/Hits.js +1 -1
- package/cjs/components/InfiniteHits/InfiniteHits.js +1 -1
- package/cjs/components/MenuSelect/MenuSelect.js +3 -3
- package/cjs/components/Pagination/Pagination.js +71 -161
- package/cjs/components/Pagination/PaginationLink.js +26 -13
- package/cjs/components/Panel/Panel.js +1 -1
- package/cjs/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/cjs/components/RangeInput/RangeInput.js +1 -1
- package/cjs/components/RefinementList/RefinementList.js +6 -6
- package/cjs/components/RefinementList/RefinementListItem.js +1 -1
- package/cjs/components/RelevantSort/RelevantSort.js +1 -1
- package/cjs/components/SearchBox/SearchBox.js +9 -10
- package/cjs/components/Slider/Slider.js +5 -5
- package/cjs/components/Stats/Stats.js +1 -1
- package/cjs/components/Template/Template.js +3 -3
- package/cjs/components/ToggleRefinement/ToggleRefinement.js +1 -1
- package/cjs/components/VoiceSearch/VoiceSearch.js +1 -1
- package/cjs/connectors/answers/connectAnswers.js +10 -10
- package/cjs/connectors/autocomplete/connectAutocomplete.js +11 -10
- package/cjs/connectors/breadcrumb/connectBreadcrumb.js +5 -5
- package/cjs/connectors/clear-refinements/connectClearRefinements.js +9 -9
- package/cjs/connectors/configure/connectConfigure.js +8 -8
- package/cjs/connectors/configure-related-items/connectConfigureRelatedItems.js +5 -5
- package/cjs/connectors/current-refinements/connectCurrentRefinements.js +6 -6
- package/cjs/connectors/dynamic-widgets/connectDynamicWidgets.js +35 -10
- package/cjs/connectors/geo-search/connectGeoSearch.js +11 -11
- package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +6 -6
- package/cjs/connectors/hits/connectHits.js +11 -11
- package/cjs/connectors/hits/connectHitsWithInsights.js +3 -3
- package/cjs/connectors/hits-per-page/connectHitsPerPage.js +6 -6
- package/cjs/connectors/index.js +31 -31
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +13 -13
- package/cjs/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +3 -3
- package/cjs/connectors/menu/connectMenu.js +5 -5
- package/cjs/connectors/numeric-menu/connectNumericMenu.js +7 -7
- package/cjs/connectors/pagination/Paginator.js +3 -3
- package/cjs/connectors/pagination/connectPagination.js +8 -8
- package/cjs/connectors/powered-by/connectPoweredBy.js +5 -5
- package/cjs/connectors/query-rules/connectQueryRules.js +7 -7
- package/cjs/connectors/range/connectRange.js +27 -27
- package/cjs/connectors/rating-menu/connectRatingMenu.js +6 -6
- package/cjs/connectors/refinement-list/connectRefinementList.js +8 -8
- package/cjs/connectors/relevant-sort/connectRelevantSort.js +3 -3
- package/cjs/connectors/search-box/connectSearchBox.js +8 -7
- package/cjs/connectors/sort-by/connectSortBy.js +8 -7
- package/cjs/connectors/stats/connectStats.js +8 -8
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +12 -12
- package/cjs/connectors/voice-search/connectVoiceSearch.js +6 -6
- package/cjs/helpers/get-insights-anonymous-user-token.js +2 -2
- package/cjs/helpers/highlight.js +4 -4
- package/cjs/helpers/index.js +6 -6
- package/cjs/helpers/insights.js +4 -4
- package/cjs/helpers/reverseHighlight.js +5 -5
- package/cjs/helpers/reverseSnippet.js +5 -5
- package/cjs/helpers/snippet.js +4 -4
- package/cjs/index.js +9 -9
- package/cjs/lib/InstantSearch.js +44 -23
- package/cjs/lib/createHelpers.js +6 -6
- package/cjs/lib/infiniteHitsCache/index.js +1 -1
- package/cjs/lib/infiniteHitsCache/sessionStorage.js +4 -4
- package/cjs/lib/insights/client.js +5 -5
- package/cjs/lib/insights/index.js +2 -2
- package/cjs/lib/insights/listener.js +3 -3
- package/cjs/lib/routers/history.js +6 -6
- package/cjs/lib/routers/index.js +1 -1
- package/cjs/lib/stateMappings/index.js +2 -2
- package/cjs/lib/utils/checkIndexUiState.js +3 -3
- package/cjs/lib/utils/checkRendering.js +1 -1
- package/cjs/lib/utils/concatHighlightedParts.js +1 -1
- package/cjs/lib/utils/createSendEventForFacet.js +1 -1
- package/cjs/lib/utils/createSendEventForHits.js +1 -1
- package/cjs/lib/utils/detect-insights-client.js +1 -1
- package/cjs/lib/utils/escape-highlight.js +2 -2
- package/cjs/lib/utils/getContainerNode.js +1 -1
- package/cjs/lib/utils/getHighlightFromSiblings.js +1 -1
- package/cjs/lib/utils/getHighlightedParts.js +1 -1
- package/cjs/lib/utils/getRefinements.js +2 -2
- package/cjs/lib/utils/index.js +48 -48
- package/cjs/lib/utils/logger.js +1 -1
- package/cjs/lib/utils/mergeSearchParameters.js +2 -2
- package/cjs/lib/utils/prepareTemplateProps.js +1 -1
- package/cjs/lib/utils/reverseHighlightedParts.js +1 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/middlewares/createInsightsMiddleware.js +11 -11
- package/cjs/middlewares/createMetadataMiddleware.js +2 -2
- package/cjs/middlewares/createRouterMiddleware.js +4 -4
- package/cjs/middlewares/index.js +3 -3
- package/cjs/types/index.js +14 -14
- package/cjs/widgets/analytics/analytics.js +3 -3
- package/cjs/widgets/answers/answers.js +8 -8
- package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
- package/cjs/widgets/clear-refinements/clear-refinements.js +8 -8
- package/cjs/widgets/configure/configure.js +3 -3
- package/cjs/widgets/configure-related-items/configure-related-items.js +3 -3
- package/cjs/widgets/current-refinements/current-refinements.js +6 -6
- package/cjs/widgets/dynamic-widgets/dynamic-widgets.js +14 -11
- package/cjs/widgets/geo-search/GeoSearchRenderer.js +3 -3
- package/cjs/widgets/geo-search/geo-search.js +9 -9
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +8 -8
- package/cjs/widgets/hits/hits.js +11 -11
- package/cjs/widgets/hits-per-page/hits-per-page.js +7 -7
- package/cjs/widgets/index/index.js +26 -8
- package/cjs/widgets/index.js +36 -36
- package/cjs/widgets/infinite-hits/infinite-hits.js +11 -11
- package/cjs/widgets/menu/menu.js +8 -8
- package/cjs/widgets/menu-select/menu-select.js +8 -8
- package/cjs/widgets/numeric-menu/numeric-menu.js +8 -8
- package/cjs/widgets/pagination/pagination.js +7 -7
- package/cjs/widgets/panel/panel.js +7 -7
- package/cjs/widgets/powered-by/powered-by.js +6 -6
- package/cjs/widgets/query-rule-context/query-rule-context.js +4 -4
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +6 -6
- package/cjs/widgets/range-input/range-input.js +7 -7
- package/cjs/widgets/range-slider/range-slider.js +6 -6
- package/cjs/widgets/rating-menu/rating-menu.js +8 -8
- package/cjs/widgets/refinement-list/refinement-list.js +10 -10
- package/cjs/widgets/relevant-sort/relevant-sort.js +7 -7
- package/cjs/widgets/search-box/search-box.js +7 -7
- package/cjs/widgets/sort-by/sort-by.js +6 -6
- package/cjs/widgets/stats/defaultTemplates.js +1 -1
- package/cjs/widgets/stats/stats.js +7 -7
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +8 -8
- package/cjs/widgets/voice-search/voice-search.js +7 -7
- package/dist/instantsearch.development.d.ts +23 -2
- package/dist/instantsearch.development.js +383 -376
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.development.min.d.ts +23 -2
- package/dist/instantsearch.production.d.ts +23 -2
- package/dist/instantsearch.production.min.d.ts +23 -2
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/es/components/Hits/Hits.js +1 -1
- package/es/components/InfiniteHits/InfiniteHits.js +1 -1
- package/es/components/MenuSelect/MenuSelect.js +2 -2
- package/es/components/Pagination/Pagination.d.ts +4 -11
- package/es/components/Pagination/Pagination.js +72 -162
- package/es/components/Pagination/PaginationLink.d.ts +10 -11
- package/es/components/Pagination/PaginationLink.js +23 -13
- package/es/components/Panel/Panel.js +1 -1
- package/es/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/es/components/RangeInput/RangeInput.js +1 -1
- package/es/components/RefinementList/RefinementList.js +4 -4
- package/es/components/RefinementList/RefinementListItem.js +1 -1
- package/es/components/RelevantSort/RelevantSort.js +1 -1
- package/es/components/SearchBox/SearchBox.js +5 -6
- package/es/components/Slider/Slider.js +3 -3
- package/es/components/Stats/Stats.js +1 -1
- package/es/components/Template/Template.js +1 -1
- package/es/components/ToggleRefinement/ToggleRefinement.js +1 -1
- package/es/components/VoiceSearch/VoiceSearch.js +1 -1
- package/es/connectors/answers/connectAnswers.js +1 -1
- package/es/connectors/autocomplete/connectAutocomplete.js +3 -2
- package/es/connectors/breadcrumb/connectBreadcrumb.js +1 -1
- package/es/connectors/clear-refinements/connectClearRefinements.js +1 -1
- package/es/connectors/configure/connectConfigure.js +1 -1
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.js +2 -2
- package/es/connectors/current-refinements/connectCurrentRefinements.js +1 -1
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +14 -0
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.js +31 -6
- package/es/connectors/geo-search/connectGeoSearch.js +1 -1
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +1 -1
- package/es/connectors/hits/connectHits.js +1 -1
- package/es/connectors/hits/connectHitsWithInsights.js +2 -2
- package/es/connectors/hits-per-page/connectHitsPerPage.js +1 -1
- package/es/connectors/index.js +30 -30
- package/es/connectors/infinite-hits/connectInfiniteHits.js +2 -2
- package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +2 -2
- package/es/connectors/menu/connectMenu.js +1 -1
- package/es/connectors/numeric-menu/connectNumericMenu.js +1 -1
- package/es/connectors/pagination/Paginator.js +1 -1
- package/es/connectors/pagination/connectPagination.js +5 -5
- package/es/connectors/powered-by/connectPoweredBy.js +1 -1
- package/es/connectors/query-rules/connectQueryRules.js +1 -1
- package/es/connectors/range/connectRange.js +1 -1
- package/es/connectors/rating-menu/connectRatingMenu.js +1 -1
- package/es/connectors/refinement-list/connectRefinementList.js +1 -1
- package/es/connectors/relevant-sort/connectRelevantSort.js +1 -1
- package/es/connectors/search-box/connectSearchBox.js +5 -4
- package/es/connectors/sort-by/connectSortBy.js +3 -2
- package/es/connectors/stats/connectStats.js +5 -5
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +2 -2
- package/es/connectors/voice-search/connectVoiceSearch.js +2 -2
- package/es/helpers/get-insights-anonymous-user-token.js +1 -1
- package/es/helpers/highlight.js +2 -2
- package/es/helpers/index.js +10 -10
- package/es/helpers/insights.js +1 -1
- package/es/helpers/reverseHighlight.js +2 -2
- package/es/helpers/reverseSnippet.js +2 -2
- package/es/helpers/snippet.js +2 -2
- package/es/index.js +6 -6
- package/es/lib/InstantSearch.d.ts +3 -3
- package/es/lib/InstantSearch.js +29 -8
- package/es/lib/createHelpers.js +1 -1
- package/es/lib/infiniteHitsCache/index.js +1 -1
- package/es/lib/infiniteHitsCache/sessionStorage.js +1 -1
- package/es/lib/insights/client.js +1 -1
- package/es/lib/insights/index.js +2 -2
- package/es/lib/insights/listener.js +2 -2
- package/es/lib/routers/history.js +1 -1
- package/es/lib/routers/index.js +1 -1
- package/es/lib/stateMappings/index.js +2 -2
- package/es/lib/utils/checkIndexUiState.js +3 -3
- package/es/lib/utils/checkRendering.js +1 -1
- package/es/lib/utils/concatHighlightedParts.js +1 -1
- package/es/lib/utils/createSendEventForFacet.js +1 -1
- package/es/lib/utils/createSendEventForHits.js +1 -1
- package/es/lib/utils/detect-insights-client.js +1 -1
- package/es/lib/utils/escape-highlight.js +2 -2
- package/es/lib/utils/getContainerNode.js +1 -1
- package/es/lib/utils/getHighlightFromSiblings.js +1 -1
- package/es/lib/utils/getHighlightedParts.js +1 -1
- package/es/lib/utils/getRefinements.js +2 -2
- package/es/lib/utils/index.js +48 -48
- package/es/lib/utils/logger.js +1 -1
- package/es/lib/utils/mergeSearchParameters.js +2 -2
- package/es/lib/utils/prepareTemplateProps.js +1 -1
- package/es/lib/utils/reverseHighlightedParts.js +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createInsightsMiddleware.js +3 -3
- package/es/middlewares/createMetadataMiddleware.js +1 -1
- package/es/middlewares/createRouterMiddleware.js +3 -3
- package/es/middlewares/index.js +3 -3
- package/es/package.json +1 -0
- package/es/types/index.js +14 -14
- package/es/types/results.d.ts +7 -0
- package/es/widgets/analytics/analytics.js +1 -1
- package/es/widgets/answers/answers.js +5 -5
- package/es/widgets/breadcrumb/breadcrumb.js +5 -5
- package/es/widgets/clear-refinements/clear-refinements.js +5 -5
- package/es/widgets/configure/configure.js +2 -2
- package/es/widgets/configure-related-items/configure-related-items.js +2 -2
- package/es/widgets/current-refinements/current-refinements.js +4 -4
- package/es/widgets/dynamic-widgets/dynamic-widgets.js +11 -8
- package/es/widgets/geo-search/GeoSearchRenderer.js +2 -2
- package/es/widgets/geo-search/geo-search.js +6 -6
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +5 -5
- package/es/widgets/hits/hits.js +6 -6
- package/es/widgets/hits-per-page/hits-per-page.js +4 -4
- package/es/widgets/index/index.js +21 -3
- package/es/widgets/index.js +34 -34
- package/es/widgets/infinite-hits/infinite-hits.js +6 -6
- package/es/widgets/menu/menu.js +5 -5
- package/es/widgets/menu-select/menu-select.js +5 -5
- package/es/widgets/numeric-menu/numeric-menu.js +5 -5
- package/es/widgets/pagination/pagination.js +4 -4
- package/es/widgets/panel/panel.js +3 -3
- package/es/widgets/powered-by/powered-by.js +4 -4
- package/es/widgets/query-rule-context/query-rule-context.js +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +4 -4
- package/es/widgets/range-input/range-input.js +4 -4
- package/es/widgets/range-slider/range-slider.js +4 -4
- package/es/widgets/rating-menu/rating-menu.js +5 -5
- package/es/widgets/refinement-list/refinement-list.js +6 -6
- package/es/widgets/relevant-sort/relevant-sort.js +5 -5
- package/es/widgets/search-box/search-box.js +5 -5
- package/es/widgets/sort-by/sort-by.js +4 -4
- package/es/widgets/stats/defaultTemplates.js +1 -1
- package/es/widgets/stats/stats.js +4 -4
- package/es/widgets/toggle-refinement/toggle-refinement.js +5 -5
- package/es/widgets/voice-search/voice-search.js +5 -5
- package/package.json +10 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TAG_REPLACEMENT, getPropertyByPath, getHighlightedParts, reverseHighlightedParts, concatHighlightedParts } from
|
|
2
|
-
import { component } from
|
|
1
|
+
import { TAG_REPLACEMENT, getPropertyByPath, getHighlightedParts, reverseHighlightedParts, concatHighlightedParts } from "../lib/utils/index.js";
|
|
2
|
+
import { component } from "../lib/suit.js";
|
|
3
3
|
var suit = component('ReverseHighlight');
|
|
4
4
|
export default function reverseHighlight(_ref) {
|
|
5
5
|
var attribute = _ref.attribute,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TAG_REPLACEMENT, getPropertyByPath, getHighlightedParts, reverseHighlightedParts, concatHighlightedParts } from
|
|
2
|
-
import { component } from
|
|
1
|
+
import { TAG_REPLACEMENT, getPropertyByPath, getHighlightedParts, reverseHighlightedParts, concatHighlightedParts } from "../lib/utils/index.js";
|
|
2
|
+
import { component } from "../lib/suit.js";
|
|
3
3
|
var suit = component('ReverseSnippet');
|
|
4
4
|
export default function reverseSnippet(_ref) {
|
|
5
5
|
var attribute = _ref.attribute,
|
package/es/helpers/snippet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { component } from
|
|
2
|
-
import { TAG_REPLACEMENT, getPropertyByPath } from
|
|
1
|
+
import { component } from "../lib/suit.js";
|
|
2
|
+
import { TAG_REPLACEMENT, getPropertyByPath } from "../lib/utils/index.js";
|
|
3
3
|
var suit = component('Snippet');
|
|
4
4
|
export default function snippet(_ref) {
|
|
5
5
|
var attribute = _ref.attribute,
|
package/es/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import InstantSearch from
|
|
2
|
-
import version from
|
|
3
|
-
import { snippet, reverseSnippet, highlight, reverseHighlight, insights, getInsightsAnonymousUserToken } from
|
|
4
|
-
import { createInfiniteHitsSessionStorageCache } from
|
|
5
|
-
import { deprecate } from
|
|
1
|
+
import InstantSearch from "./lib/InstantSearch.js";
|
|
2
|
+
import version from "./lib/version.js";
|
|
3
|
+
import { snippet, reverseSnippet, highlight, reverseHighlight, insights, getInsightsAnonymousUserToken } from "./helpers/index.js";
|
|
4
|
+
import { createInfiniteHitsSessionStorageCache } from "./lib/infiniteHitsCache/index.js";
|
|
5
|
+
import { deprecate } from "./lib/utils/index.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* InstantSearch is the main component of InstantSearch.js. This object
|
|
@@ -42,4 +42,4 @@ Object.defineProperty(instantsearch, 'connectors', {
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
export default instantsearch;
|
|
45
|
-
export * from
|
|
45
|
+
export * from "./types/index.js";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
3
|
-
import EventEmitter from 'events';
|
|
2
|
+
import EventEmitter from '@algolia/events';
|
|
4
3
|
import type { IndexWidget } from '../widgets/index/index';
|
|
5
|
-
import type { InsightsClient as AlgoliaInsightsClient, SearchClient, Widget, UiState, CreateURL, Middleware, MiddlewareDefinition, RenderState } from '../types';
|
|
4
|
+
import type { InsightsClient as AlgoliaInsightsClient, SearchClient, Widget, UiState, CreateURL, Middleware, MiddlewareDefinition, RenderState, InitialResults } from '../types';
|
|
6
5
|
import type { RouterProps } from '../middlewares/createRouterMiddleware';
|
|
7
6
|
import type { InsightsEvent } from '../middlewares/createInsightsMiddleware';
|
|
8
7
|
/**
|
|
@@ -106,6 +105,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
|
|
|
106
105
|
_searchStalledTimer: any;
|
|
107
106
|
_isSearchStalled: boolean;
|
|
108
107
|
_initialUiState: UiState;
|
|
108
|
+
_initialResults: InitialResults | null;
|
|
109
109
|
_createURL: CreateURL<UiState>;
|
|
110
110
|
_searchFunction?: InstantSearchOptions['searchFunction'];
|
|
111
111
|
_mainHelperSearch?: AlgoliaSearchHelper['search'];
|
package/es/lib/InstantSearch.js
CHANGED
|
@@ -27,13 +27,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
27
27
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
28
28
|
|
|
29
29
|
import algoliasearchHelper from 'algoliasearch-helper';
|
|
30
|
-
import EventEmitter from 'events';
|
|
31
|
-
import index, { isIndexWidget } from
|
|
32
|
-
import version from
|
|
33
|
-
import createHelpers from
|
|
34
|
-
import { createDocumentationMessageGenerator, createDocumentationLink, defer, noop, warning, checkIndexUiState } from
|
|
35
|
-
import { createRouterMiddleware } from
|
|
36
|
-
import { createMetadataMiddleware, isMetadataEnabled } from
|
|
30
|
+
import EventEmitter from '@algolia/events';
|
|
31
|
+
import index, { isIndexWidget } from "../widgets/index/index.js";
|
|
32
|
+
import version from "./version.js";
|
|
33
|
+
import createHelpers from "./createHelpers.js";
|
|
34
|
+
import { createDocumentationMessageGenerator, createDocumentationLink, defer, noop, warning, checkIndexUiState } from "./utils/index.js";
|
|
35
|
+
import { createRouterMiddleware } from "../middlewares/createRouterMiddleware.js";
|
|
36
|
+
import { createMetadataMiddleware, isMetadataEnabled } from "../middlewares/createMetadataMiddleware.js";
|
|
37
37
|
var withUsage = createDocumentationMessageGenerator({
|
|
38
38
|
name: 'instantsearch'
|
|
39
39
|
});
|
|
@@ -91,6 +91,8 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
91
91
|
|
|
92
92
|
_defineProperty(_assertThisInitialized(_this), "_initialUiState", void 0);
|
|
93
93
|
|
|
94
|
+
_defineProperty(_assertThisInitialized(_this), "_initialResults", void 0);
|
|
95
|
+
|
|
94
96
|
_defineProperty(_assertThisInitialized(_this), "_createURL", void 0);
|
|
95
97
|
|
|
96
98
|
_defineProperty(_assertThisInitialized(_this), "_searchFunction", void 0);
|
|
@@ -195,6 +197,7 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
195
197
|
_this._isSearchStalled = false;
|
|
196
198
|
_this._createURL = defaultCreateURL;
|
|
197
199
|
_this._initialUiState = initialUiState;
|
|
200
|
+
_this._initialResults = null;
|
|
198
201
|
|
|
199
202
|
if (searchFunction) {
|
|
200
203
|
_this._searchFunction = searchFunction;
|
|
@@ -437,9 +440,27 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
437
440
|
parent: null,
|
|
438
441
|
uiState: this._initialUiState
|
|
439
442
|
});
|
|
440
|
-
|
|
443
|
+
|
|
444
|
+
if (this._initialResults) {
|
|
445
|
+
var originalScheduleSearch = this.scheduleSearch; // We don't schedule a first search when initial results are provided
|
|
446
|
+
// because we already have the results to render. This skips the initial
|
|
447
|
+
// network request on the browser on `start`.
|
|
448
|
+
|
|
449
|
+
this.scheduleSearch = defer(noop); // We also skip the initial network request when widgets are dynamically
|
|
450
|
+
// added in the first tick (that's the case in all the framework-based flavors).
|
|
451
|
+
// When we add a widget to `index`, it calls `scheduleSearch`. We can rely
|
|
452
|
+
// on our `defer` util to restore the original `scheduleSearch` value once
|
|
453
|
+
// widgets are added to hook back to the regular lifecycle.
|
|
454
|
+
|
|
455
|
+
defer(function () {
|
|
456
|
+
_this3.scheduleSearch = originalScheduleSearch;
|
|
457
|
+
})();
|
|
458
|
+
} else {
|
|
459
|
+
this.scheduleSearch();
|
|
460
|
+
} // Keep the previous reference for legacy purpose, some pattern use
|
|
441
461
|
// the direct Helper access `search.helper` (e.g multi-index).
|
|
442
462
|
|
|
463
|
+
|
|
443
464
|
this.helper = this.mainIndex.getHelper(); // track we started the search if we add more widgets,
|
|
444
465
|
// to init them directly after add
|
|
445
466
|
|
package/es/lib/createHelpers.js
CHANGED
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import { highlight as _highlight, reverseHighlight as _reverseHighlight, snippet as _snippet, reverseSnippet as _reverseSnippet, insights as _insights } from
|
|
7
|
+
import { highlight as _highlight, reverseHighlight as _reverseHighlight, snippet as _snippet, reverseSnippet as _reverseSnippet, insights as _insights } from "../helpers/index.js";
|
|
8
8
|
export default function hoganHelpers(_ref) {
|
|
9
9
|
var numberLocale = _ref.numberLocale;
|
|
10
10
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as createInfiniteHitsSessionStorageCache } from
|
|
1
|
+
export { default as createInfiniteHitsSessionStorageCache } from "./sessionStorage.js";
|
|
@@ -2,7 +2,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
2
2
|
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
4
|
|
|
5
|
-
import { isEqual, safelyRunOnBrowser } from
|
|
5
|
+
import { isEqual, safelyRunOnBrowser } from "../utils/index.js";
|
|
6
6
|
|
|
7
7
|
function getStateWithoutPage(state) {
|
|
8
8
|
var _ref = state || {},
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import { uniq, find, createDocumentationMessageGenerator, warning } from
|
|
7
|
+
import { uniq, find, createDocumentationMessageGenerator, warning } from "../utils/index.js";
|
|
8
8
|
|
|
9
9
|
var getSelectedHits = function getSelectedHits(hits, selectedObjectIDs) {
|
|
10
10
|
return selectedObjectIDs.map(function (objectID) {
|
package/es/lib/insights/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as withInsights, inferPayload as inferInsightsPayload } from
|
|
2
|
-
export { default as withInsightsListener } from
|
|
1
|
+
export { default as withInsights, inferPayload as inferInsightsPayload } from "./client.js";
|
|
2
|
+
export { default as withInsightsListener } from "./listener.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx h */
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import { deserializePayload } from
|
|
4
|
-
import { readDataAttributes, hasDataAttributes } from
|
|
3
|
+
import { deserializePayload } from "../utils/index.js";
|
|
4
|
+
import { readDataAttributes, hasDataAttributes } from "../../helpers/insights.js";
|
|
5
5
|
|
|
6
6
|
var findInsightsTarget = function findInsightsTarget(startElement, endElement, validator) {
|
|
7
7
|
var element = startElement;
|
|
@@ -7,7 +7,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
7
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
|
|
9
9
|
import qs from 'qs';
|
|
10
|
-
import { safelyRunOnBrowser } from
|
|
10
|
+
import { safelyRunOnBrowser } from "../utils/index.js";
|
|
11
11
|
|
|
12
12
|
var setWindowTitle = function setWindowTitle(title) {
|
|
13
13
|
if (title) {
|
package/es/lib/routers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as history } from
|
|
1
|
+
export { default as history } from "./history.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as simple } from
|
|
2
|
-
export { default as singleIndex } from
|
|
1
|
+
export { default as simple } from "./simple.js";
|
|
2
|
+
export { default as singleIndex } from "./singleIndex.js";
|
|
@@ -18,9 +18,9 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
|
|
|
18
18
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
|
|
21
|
-
import capitalize from
|
|
22
|
-
import { warning } from
|
|
23
|
-
import { keys } from
|
|
21
|
+
import capitalize from "./capitalize.js";
|
|
22
|
+
import { warning } from "./logger.js";
|
|
23
|
+
import { keys } from "./typedObject.js"; // Some connectors are responsible for multiple widgets so we need
|
|
24
24
|
// to map them.
|
|
25
25
|
|
|
26
26
|
function getWidgetNames(connectorName) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAG_REPLACEMENT } from
|
|
1
|
+
import { TAG_REPLACEMENT } from "./escape-highlight.js";
|
|
2
2
|
export default function concatHighlightedParts(parts) {
|
|
3
3
|
var highlightPreTag = TAG_REPLACEMENT.highlightPreTag,
|
|
4
4
|
highlightPostTag = TAG_REPLACEMENT.highlightPostTag;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
|
-
import isFacetRefined from
|
|
3
|
+
import isFacetRefined from "./isFacetRefined.js";
|
|
4
4
|
export function createSendEventForFacet(_ref) {
|
|
5
5
|
var instantSearchInstance = _ref.instantSearchInstance,
|
|
6
6
|
helper = _ref.helper,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
|
-
import { serializePayload } from
|
|
3
|
+
import { serializePayload } from "./serializer.js";
|
|
4
4
|
|
|
5
5
|
function chunk(arr) {
|
|
6
6
|
var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;
|
|
@@ -6,8 +6,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
|
|
9
|
-
import escape from
|
|
10
|
-
import isPlainObject from
|
|
9
|
+
import escape from "./escape.js";
|
|
10
|
+
import isPlainObject from "./isPlainObject.js";
|
|
11
11
|
export var TAG_PLACEHOLDER = {
|
|
12
12
|
highlightPreTag: '__ais-highlight__',
|
|
13
13
|
highlightPostTag: '__/ais-highlight__'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAG_REPLACEMENT } from
|
|
1
|
+
import { TAG_REPLACEMENT } from "./escape-highlight.js";
|
|
2
2
|
export default function getHighlightedParts(highlightedValue) {
|
|
3
3
|
var highlightPostTag = TAG_REPLACEMENT.highlightPostTag,
|
|
4
4
|
highlightPreTag = TAG_REPLACEMENT.highlightPreTag;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import find from
|
|
2
|
-
import unescapeRefinement from
|
|
1
|
+
import find from "./find.js";
|
|
2
|
+
import unescapeRefinement from "./unescapeRefinement.js";
|
|
3
3
|
|
|
4
4
|
function getRefinement(state, type, attribute, name) {
|
|
5
5
|
var resultsFacets = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
package/es/lib/utils/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
export { default as capitalize } from
|
|
2
|
-
export { default as defer } from
|
|
3
|
-
export { default as isDomElement } from
|
|
4
|
-
export { default as getContainerNode } from
|
|
5
|
-
export { default as isSpecialClick } from
|
|
6
|
-
export { default as prepareTemplateProps } from
|
|
7
|
-
export { default as renderTemplate } from
|
|
8
|
-
export { default as getRefinements } from
|
|
9
|
-
export { default as clearRefinements } from
|
|
10
|
-
export { default as escapeRefinement } from
|
|
11
|
-
export { default as unescapeRefinement } from
|
|
12
|
-
export { default as checkRendering } from
|
|
13
|
-
export { checkIndexUiState } from
|
|
14
|
-
export { default as getPropertyByPath } from
|
|
15
|
-
export { default as getObjectType } from
|
|
16
|
-
export { default as noop } from
|
|
17
|
-
export { default as isFiniteNumber } from
|
|
18
|
-
export { default as isPlainObject } from
|
|
19
|
-
export { default as uniq } from
|
|
20
|
-
export { default as range } from
|
|
21
|
-
export { default as isEqual } from
|
|
22
|
-
export { default as escape } from
|
|
23
|
-
export { default as unescape } from
|
|
24
|
-
export { default as concatHighlightedParts } from
|
|
25
|
-
export { default as getHighlightedParts } from
|
|
26
|
-
export { default as getHighlightFromSiblings } from
|
|
27
|
-
export { default as reverseHighlightedParts } from
|
|
28
|
-
export { default as find } from
|
|
29
|
-
export { default as findIndex } from
|
|
30
|
-
export { default as mergeSearchParameters } from
|
|
31
|
-
export { default as resolveSearchParameters } from
|
|
32
|
-
export { default as toArray } from
|
|
33
|
-
export { warning, deprecate } from
|
|
34
|
-
export { escapeHits, TAG_PLACEHOLDER, TAG_REPLACEMENT, escapeFacets } from
|
|
35
|
-
export { createDocumentationLink, createDocumentationMessageGenerator } from
|
|
36
|
-
export { aroundLatLngToPosition, insideBoundingBoxToBoundingBox } from
|
|
37
|
-
export { addAbsolutePosition } from
|
|
38
|
-
export { addQueryID } from
|
|
39
|
-
export { default as isFacetRefined } from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export { getAppIdAndApiKey } from
|
|
43
|
-
export { convertNumericRefinementsToFilters } from
|
|
44
|
-
export { createConcurrentSafePromise } from
|
|
45
|
-
export { debounce } from
|
|
46
|
-
export { serializePayload, deserializePayload } from
|
|
47
|
-
export { getWidgetAttribute } from
|
|
48
|
-
export { safelyRunOnBrowser } from
|
|
1
|
+
export { default as capitalize } from "./capitalize.js";
|
|
2
|
+
export { default as defer } from "./defer.js";
|
|
3
|
+
export { default as isDomElement } from "./isDomElement.js";
|
|
4
|
+
export { default as getContainerNode } from "./getContainerNode.js";
|
|
5
|
+
export { default as isSpecialClick } from "./isSpecialClick.js";
|
|
6
|
+
export { default as prepareTemplateProps } from "./prepareTemplateProps.js";
|
|
7
|
+
export { default as renderTemplate } from "./renderTemplate.js";
|
|
8
|
+
export { default as getRefinements } from "./getRefinements.js";
|
|
9
|
+
export { default as clearRefinements } from "./clearRefinements.js";
|
|
10
|
+
export { default as escapeRefinement } from "./escapeRefinement.js";
|
|
11
|
+
export { default as unescapeRefinement } from "./unescapeRefinement.js";
|
|
12
|
+
export { default as checkRendering } from "./checkRendering.js";
|
|
13
|
+
export { checkIndexUiState } from "./checkIndexUiState.js";
|
|
14
|
+
export { default as getPropertyByPath } from "./getPropertyByPath.js";
|
|
15
|
+
export { default as getObjectType } from "./getObjectType.js";
|
|
16
|
+
export { default as noop } from "./noop.js";
|
|
17
|
+
export { default as isFiniteNumber } from "./isFiniteNumber.js";
|
|
18
|
+
export { default as isPlainObject } from "./isPlainObject.js";
|
|
19
|
+
export { default as uniq } from "./uniq.js";
|
|
20
|
+
export { default as range } from "./range.js";
|
|
21
|
+
export { default as isEqual } from "./isEqual.js";
|
|
22
|
+
export { default as escape } from "./escape.js";
|
|
23
|
+
export { default as unescape } from "./unescape.js";
|
|
24
|
+
export { default as concatHighlightedParts } from "./concatHighlightedParts.js";
|
|
25
|
+
export { default as getHighlightedParts } from "./getHighlightedParts.js";
|
|
26
|
+
export { default as getHighlightFromSiblings } from "./getHighlightFromSiblings.js";
|
|
27
|
+
export { default as reverseHighlightedParts } from "./reverseHighlightedParts.js";
|
|
28
|
+
export { default as find } from "./find.js";
|
|
29
|
+
export { default as findIndex } from "./findIndex.js";
|
|
30
|
+
export { default as mergeSearchParameters } from "./mergeSearchParameters.js";
|
|
31
|
+
export { default as resolveSearchParameters } from "./resolveSearchParameters.js";
|
|
32
|
+
export { default as toArray } from "./toArray.js";
|
|
33
|
+
export { warning, deprecate } from "./logger.js";
|
|
34
|
+
export { escapeHits, TAG_PLACEHOLDER, TAG_REPLACEMENT, escapeFacets } from "./escape-highlight.js";
|
|
35
|
+
export { createDocumentationLink, createDocumentationMessageGenerator } from "./documentation.js";
|
|
36
|
+
export { aroundLatLngToPosition, insideBoundingBoxToBoundingBox } from "./geo-search.js";
|
|
37
|
+
export { addAbsolutePosition } from "./hits-absolute-position.js";
|
|
38
|
+
export { addQueryID } from "./hits-query-id.js";
|
|
39
|
+
export { default as isFacetRefined } from "./isFacetRefined.js";
|
|
40
|
+
export * from "./createSendEventForFacet.js";
|
|
41
|
+
export * from "./createSendEventForHits.js";
|
|
42
|
+
export { getAppIdAndApiKey } from "./getAppIdAndApiKey.js";
|
|
43
|
+
export { convertNumericRefinementsToFilters } from "./convertNumericRefinementsToFilters.js";
|
|
44
|
+
export { createConcurrentSafePromise } from "./createConcurrentSafePromise.js";
|
|
45
|
+
export { debounce } from "./debounce.js";
|
|
46
|
+
export { serializePayload, deserializePayload } from "./serializer.js";
|
|
47
|
+
export { getWidgetAttribute } from "./getWidgetAttribute.js";
|
|
48
|
+
export { safelyRunOnBrowser } from "./safelyRunOnBrowser.js";
|
package/es/lib/utils/logger.js
CHANGED
|
@@ -8,8 +8,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
8
8
|
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
10
|
|
|
11
|
-
import findIndex from
|
|
12
|
-
import uniq from
|
|
11
|
+
import findIndex from "./findIndex.js";
|
|
12
|
+
import uniq from "./uniq.js";
|
|
13
13
|
|
|
14
14
|
var mergeWithRest = function mergeWithRest(left, right) {
|
|
15
15
|
var facets = right.facets,
|
|
@@ -16,7 +16,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
16
16
|
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
18
|
|
|
19
|
-
import uniq from
|
|
19
|
+
import uniq from "./uniq.js";
|
|
20
20
|
|
|
21
21
|
function prepareTemplates( // can not use = {} here, since the template could have different constraints
|
|
22
22
|
defaultTemplates) {
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import getHighlightFromSiblings from
|
|
7
|
+
import getHighlightFromSiblings from "./getHighlightFromSiblings.js";
|
|
8
8
|
export default function reverseHighlightedParts(parts) {
|
|
9
9
|
if (!parts.some(function (part) {
|
|
10
10
|
return part.isHighlighted;
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.37.0";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.
|
|
1
|
+
export default '4.37.0';
|
|
@@ -16,9 +16,9 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
|
|
|
16
16
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
|
|
19
|
-
import { getInsightsAnonymousUserTokenInternal } from
|
|
20
|
-
import { warning, noop, getAppIdAndApiKey, find } from
|
|
21
|
-
import connectConfigure from
|
|
19
|
+
import { getInsightsAnonymousUserTokenInternal } from "../helpers/index.js";
|
|
20
|
+
import { warning, noop, getAppIdAndApiKey, find } from "../lib/utils/index.js";
|
|
21
|
+
import connectConfigure from "../connectors/configure/connectConfigure.js";
|
|
22
22
|
export var createInsightsMiddleware = function createInsightsMiddleware(props) {
|
|
23
23
|
var _ref = props || {},
|
|
24
24
|
_insightsClient = _ref.insightsClient,
|
|
@@ -4,9 +4,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import simpleStateMapping from
|
|
8
|
-
import historyRouter from
|
|
9
|
-
import { isEqual } from
|
|
7
|
+
import simpleStateMapping from "../lib/stateMappings/simple.js";
|
|
8
|
+
import historyRouter from "../lib/routers/history.js";
|
|
9
|
+
import { isEqual } from "../lib/utils/index.js";
|
|
10
10
|
export var createRouterMiddleware = function createRouterMiddleware() {
|
|
11
11
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
12
|
var _props$router = props.router,
|
package/es/middlewares/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./createInsightsMiddleware.js";
|
|
2
|
+
export * from "./createRouterMiddleware.js";
|
|
3
|
+
export * from "./createMetadataMiddleware.js";
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/es/types/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// internal
|
|
2
|
-
export * from
|
|
2
|
+
export * from "./utils.js"; // Algolia-related
|
|
3
3
|
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
4
|
+
export * from "./algoliasearch.js";
|
|
5
|
+
export * from "./results.js"; // component-related
|
|
6
6
|
|
|
7
|
-
export * from
|
|
7
|
+
export * from "./component.js"; // instantsearch-related
|
|
8
8
|
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
9
|
+
export * from "./instantsearch.js";
|
|
10
|
+
export * from "./middleware.js";
|
|
11
|
+
export * from "./router.js";
|
|
12
|
+
export * from "./insights.js"; // widget-related
|
|
13
13
|
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
14
|
+
export * from "./connector.js";
|
|
15
|
+
export * from "./widget-factory.js";
|
|
16
|
+
export * from "./widget.js";
|
|
17
|
+
export * from "./ui-state.js";
|
|
18
|
+
export * from "./render-state.js";
|
|
19
|
+
export * from "./templates.js";
|
package/es/types/results.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PlainSearchParameters, SearchResults } from 'algoliasearch-helper';
|
|
1
2
|
export declare type HitAttributeHighlightResult = {
|
|
2
3
|
value: string;
|
|
3
4
|
matchLevel: 'none' | 'partial' | 'full';
|
|
@@ -64,3 +65,9 @@ export declare type NumericRefinement = {
|
|
|
64
65
|
operator: string;
|
|
65
66
|
};
|
|
66
67
|
export declare type Refinement = FacetRefinement | NumericRefinement;
|
|
68
|
+
declare type InitialResult = {
|
|
69
|
+
state: PlainSearchParameters;
|
|
70
|
+
results: SearchResults['_rawResults'];
|
|
71
|
+
};
|
|
72
|
+
export declare type InitialResults = Record<string, InitialResult>;
|
|
73
|
+
export {};
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import { createDocumentationMessageGenerator, warning } from
|
|
7
|
+
import { createDocumentationMessageGenerator, warning } from "../../lib/utils/index.js";
|
|
8
8
|
var withUsage = createDocumentationMessageGenerator({
|
|
9
9
|
name: 'analytics'
|
|
10
10
|
});
|
|
@@ -7,11 +7,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
/** @jsx h */
|
|
8
8
|
import { h, render } from 'preact';
|
|
9
9
|
import cx from 'classnames';
|
|
10
|
-
import defaultTemplates from
|
|
11
|
-
import { createDocumentationMessageGenerator, getContainerNode, prepareTemplateProps } from
|
|
12
|
-
import { component } from
|
|
13
|
-
import Answers from
|
|
14
|
-
import connectAnswers from
|
|
10
|
+
import defaultTemplates from "./defaultTemplates.js";
|
|
11
|
+
import { createDocumentationMessageGenerator, getContainerNode, prepareTemplateProps } from "../../lib/utils/index.js";
|
|
12
|
+
import { component } from "../../lib/suit.js";
|
|
13
|
+
import Answers from "../../components/Answers/Answers.js";
|
|
14
|
+
import connectAnswers from "../../connectors/answers/connectAnswers.js";
|
|
15
15
|
var withUsage = createDocumentationMessageGenerator({
|
|
16
16
|
name: 'answers'
|
|
17
17
|
});
|
|
@@ -7,11 +7,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
/** @jsx h */
|
|
8
8
|
import { h, render } from 'preact';
|
|
9
9
|
import cx from 'classnames';
|
|
10
|
-
import Breadcrumb from
|
|
11
|
-
import connectBreadcrumb from
|
|
12
|
-
import defaultTemplates from
|
|
13
|
-
import { getContainerNode, prepareTemplateProps, createDocumentationMessageGenerator } from
|
|
14
|
-
import { component } from
|
|
10
|
+
import Breadcrumb from "../../components/Breadcrumb/Breadcrumb.js";
|
|
11
|
+
import connectBreadcrumb from "../../connectors/breadcrumb/connectBreadcrumb.js";
|
|
12
|
+
import defaultTemplates from "./defaultTemplates.js";
|
|
13
|
+
import { getContainerNode, prepareTemplateProps, createDocumentationMessageGenerator } from "../../lib/utils/index.js";
|
|
14
|
+
import { component } from "../../lib/suit.js";
|
|
15
15
|
var withUsage = createDocumentationMessageGenerator({
|
|
16
16
|
name: 'breadcrumb'
|
|
17
17
|
});
|