instantsearch.js 4.51.1 → 4.53.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/README.md +1 -16
- package/cjs/components/Answers/Answers.js +7 -3
- package/cjs/components/Breadcrumb/Breadcrumb.js +1 -1
- package/cjs/components/ClearRefinements/ClearRefinements.js +1 -1
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +1 -1
- package/cjs/components/Hits/Hits.js +6 -2
- package/cjs/components/InfiniteHits/InfiniteHits.js +7 -3
- package/cjs/components/MenuSelect/MenuSelect.js +1 -1
- package/cjs/components/Pagination/Pagination.js +1 -1
- package/cjs/components/Panel/Panel.js +1 -1
- package/cjs/components/RangeInput/RangeInput.js +1 -1
- package/cjs/components/RefinementList/RefinementList.js +2 -2
- package/cjs/components/Selector/Selector.js +1 -1
- package/cjs/components/Slider/Pit.js +1 -1
- package/cjs/components/Slider/Slider.js +2 -2
- package/cjs/components/Stats/Stats.js +1 -1
- package/cjs/components/Template/Template.js +1 -1
- package/cjs/connectors/current-refinements/connectCurrentRefinements.js +4 -0
- package/cjs/connectors/index.js +4 -3
- package/cjs/helpers/reverseHighlight.js +1 -1
- package/cjs/helpers/reverseSnippet.js +1 -1
- package/cjs/index.js +7 -7
- package/cjs/lib/InstantSearch.js +7 -5
- package/cjs/lib/insights/listener.js +1 -1
- package/cjs/lib/routers/history.js +5 -0
- package/cjs/lib/utils/createSendEventForHits.js +1 -5
- package/cjs/lib/utils/getRefinements.js +1 -1
- package/cjs/lib/utils/index.js +11 -0
- package/cjs/lib/utils/omit.js +25 -0
- package/cjs/lib/utils/setIndexHelperState.js +1 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/middlewares/createRouterMiddleware.js +5 -2
- package/cjs/widgets/answers/answers.js +5 -5
- package/cjs/widgets/breadcrumb/breadcrumb.js +4 -4
- package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
- package/cjs/widgets/configure-related-items/configure-related-items.js +1 -1
- package/cjs/widgets/current-refinements/current-refinements.js +2 -2
- package/cjs/widgets/geo-search/GeoSearchRenderer.js +1 -1
- package/cjs/widgets/geo-search/geo-search.js +5 -5
- package/cjs/widgets/hierarchical-menu/defaultTemplates.js +1 -1
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +4 -4
- package/cjs/widgets/hits/defaultTemplates.js +2 -1
- package/cjs/widgets/hits/hits.js +6 -6
- package/cjs/widgets/hits-per-page/hits-per-page.js +2 -2
- package/cjs/widgets/index/index.js +11 -3
- package/cjs/widgets/index.js +4 -3
- package/cjs/widgets/infinite-hits/defaultTemplates.js +2 -1
- package/cjs/widgets/infinite-hits/infinite-hits.js +4 -4
- package/cjs/widgets/menu/defaultTemplates.js +1 -1
- package/cjs/widgets/menu/menu.js +4 -4
- package/cjs/widgets/menu-select/menu-select.js +5 -5
- package/cjs/widgets/numeric-menu/numeric-menu.js +3 -3
- package/cjs/widgets/pagination/pagination.js +2 -2
- package/cjs/widgets/panel/panel.js +4 -4
- package/cjs/widgets/powered-by/powered-by.js +2 -2
- package/cjs/widgets/query-rule-context/query-rule-context.js +1 -1
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +4 -4
- package/cjs/widgets/range-input/range-input.js +3 -3
- package/cjs/widgets/range-slider/range-slider.js +2 -2
- package/cjs/widgets/rating-menu/defaultTemplates.js +1 -1
- package/cjs/widgets/rating-menu/rating-menu.js +4 -4
- package/cjs/widgets/refinement-list/defaultTemplates.js +1 -1
- package/cjs/widgets/refinement-list/refinement-list.js +3 -3
- package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
- package/cjs/widgets/search-box/defaultTemplates.js +6 -3
- package/cjs/widgets/search-box/search-box.js +4 -4
- package/cjs/widgets/sort-by/sort-by.js +2 -2
- package/cjs/widgets/stats/stats.js +4 -4
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +4 -4
- package/cjs/widgets/voice-search/voice-search.js +4 -4
- package/dist/instantsearch.development.d.ts +31 -9
- package/dist/instantsearch.development.js +13605 -13563
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +31 -9
- package/dist/instantsearch.production.min.d.ts +31 -9
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.d.ts +1 -1
- package/es/components/Answers/Answers.js +7 -3
- package/es/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.d.ts +2 -2
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.d.ts +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.d.ts +2 -2
- package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
- package/es/components/Hits/Hits.d.ts +2 -2
- package/es/components/Hits/Hits.js +6 -2
- package/es/components/InfiniteHits/InfiniteHits.d.ts +2 -2
- package/es/components/InfiniteHits/InfiniteHits.js +7 -3
- package/es/components/MenuSelect/MenuSelect.d.ts +1 -1
- package/es/components/MenuSelect/MenuSelect.js +1 -1
- package/es/components/Pagination/Pagination.d.ts +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Panel/Panel.d.ts +1 -1
- package/es/components/Panel/Panel.js +1 -1
- package/es/components/RangeInput/RangeInput.d.ts +1 -1
- package/es/components/RangeInput/RangeInput.js +1 -1
- package/es/components/RefinementList/RefinementList.d.ts +7 -7
- package/es/components/RefinementList/RefinementList.js +2 -2
- package/es/components/RefinementList/RefinementListItem.d.ts +2 -1
- package/es/components/RelevantSort/RelevantSort.d.ts +1 -1
- package/es/components/SearchBox/SearchBox.d.ts +1 -1
- package/es/components/Selector/Selector.js +1 -1
- package/es/components/Slider/Pit.js +1 -1
- package/es/components/Slider/Rheostat.d.ts +3 -3
- package/es/components/Slider/Slider.d.ts +1 -1
- package/es/components/Slider/Slider.js +2 -2
- package/es/components/Stats/Stats.d.ts +1 -1
- package/es/components/Stats/Stats.js +1 -1
- package/es/components/Template/Template.d.ts +4 -4
- package/es/components/Template/Template.js +1 -1
- package/es/components/VoiceSearch/VoiceSearch.d.ts +1 -1
- package/es/connectors/autocomplete/connectAutocomplete.d.ts +1 -1
- package/es/connectors/configure/connectConfigure.d.ts +1 -1
- package/es/connectors/configure/connectConfigure.js +0 -5
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.d.ts +1 -1
- package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +4 -0
- package/es/connectors/current-refinements/connectCurrentRefinements.js +4 -0
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.d.ts +1 -1
- package/es/connectors/index.d.ts +6 -6
- package/es/connectors/index.js +10 -10
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +2 -2
- package/es/connectors/menu/connectMenu.d.ts +1 -1
- package/es/connectors/rating-menu/connectRatingMenu.d.ts +1 -1
- package/es/connectors/refinement-list/connectRefinementList.d.ts +1 -1
- package/es/connectors/voice-search/connectVoiceSearch.d.ts +2 -2
- package/es/helpers/components/Highlight.d.ts +1 -1
- package/es/helpers/components/ReverseHighlight.d.ts +1 -1
- package/es/helpers/components/ReverseSnippet.d.ts +1 -1
- package/es/helpers/components/Snippet.d.ts +1 -1
- package/es/helpers/reverseHighlight.js +1 -1
- package/es/helpers/reverseSnippet.js +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +2 -2
- package/es/lib/InstantSearch.d.ts +5 -4
- package/es/lib/InstantSearch.js +7 -5
- package/es/lib/insights/client.d.ts +1 -1
- package/es/lib/insights/listener.d.ts +1 -1
- package/es/lib/insights/listener.js +1 -1
- package/es/lib/routers/history.d.ts +1 -0
- package/es/lib/routers/history.js +5 -0
- package/es/lib/templating/renderTemplate.d.ts +1 -1
- package/es/lib/utils/checkIndexUiState.d.ts +1 -1
- package/es/lib/utils/checkIndexUiState.js +0 -1
- package/es/lib/utils/createSendEventForFacet.d.ts +1 -1
- package/es/lib/utils/createSendEventForHits.js +1 -5
- package/es/lib/utils/getRefinements.js +1 -1
- package/es/lib/utils/index.d.ts +1 -0
- package/es/lib/utils/index.js +1 -0
- package/es/lib/utils/omit.d.ts +7 -0
- package/es/lib/utils/omit.js +19 -0
- package/es/lib/utils/render-args.d.ts +2 -2
- package/es/lib/utils/resolveSearchParameters.d.ts +1 -1
- package/es/lib/utils/setIndexHelperState.js +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createRouterMiddleware.js +5 -2
- package/es/types/connector.d.ts +2 -2
- package/es/types/index.d.ts +1 -0
- package/es/types/index.js +4 -1
- package/es/types/router.d.ts +4 -0
- package/es/types/templates.d.ts +2 -2
- package/es/types/widget.d.ts +2 -2
- package/es/widgets/analytics/analytics.d.ts +1 -1
- package/es/widgets/answers/answers.d.ts +1 -1
- package/es/widgets/answers/answers.js +5 -5
- package/es/widgets/breadcrumb/breadcrumb.js +4 -4
- package/es/widgets/clear-refinements/clear-refinements.js +4 -4
- package/es/widgets/configure/configure.js +0 -6
- package/es/widgets/configure-related-items/configure-related-items.d.ts +1 -1
- package/es/widgets/configure-related-items/configure-related-items.js +1 -1
- package/es/widgets/current-refinements/current-refinements.js +2 -2
- package/es/widgets/geo-search/GeoSearchRenderer.js +1 -1
- package/es/widgets/geo-search/geo-search.d.ts +1 -1
- package/es/widgets/geo-search/geo-search.js +5 -5
- package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +4 -4
- package/es/widgets/hits/defaultTemplates.js +2 -1
- package/es/widgets/hits/hits.d.ts +1 -0
- package/es/widgets/hits/hits.js +6 -6
- package/es/widgets/hits-per-page/hits-per-page.js +2 -2
- package/es/widgets/index/index.d.ts +13 -3
- package/es/widgets/index/index.js +11 -3
- package/es/widgets/index.d.ts +6 -6
- package/es/widgets/index.js +9 -7
- package/es/widgets/infinite-hits/defaultTemplates.js +2 -1
- package/es/widgets/infinite-hits/infinite-hits.d.ts +2 -1
- package/es/widgets/infinite-hits/infinite-hits.js +4 -4
- package/es/widgets/menu/defaultTemplates.js +1 -1
- package/es/widgets/menu/menu.js +4 -4
- package/es/widgets/menu-select/menu-select.js +5 -5
- package/es/widgets/numeric-menu/numeric-menu.js +3 -3
- package/es/widgets/pagination/pagination.js +2 -2
- package/es/widgets/panel/panel.js +4 -4
- package/es/widgets/places/places.d.ts +1 -1
- package/es/widgets/powered-by/powered-by.js +2 -2
- package/es/widgets/query-rule-context/query-rule-context.d.ts +1 -1
- package/es/widgets/query-rule-context/query-rule-context.js +1 -1
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.d.ts +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +4 -4
- package/es/widgets/range-input/range-input.js +3 -3
- package/es/widgets/range-slider/range-slider.js +2 -2
- package/es/widgets/rating-menu/defaultTemplates.js +1 -1
- package/es/widgets/rating-menu/rating-menu.js +4 -4
- package/es/widgets/refinement-list/defaultTemplates.js +1 -1
- package/es/widgets/refinement-list/refinement-list.js +3 -3
- package/es/widgets/relevant-sort/relevant-sort.d.ts +1 -1
- package/es/widgets/relevant-sort/relevant-sort.js +4 -4
- package/es/widgets/search-box/defaultTemplates.js +6 -3
- package/es/widgets/search-box/search-box.d.ts +2 -2
- package/es/widgets/search-box/search-box.js +4 -4
- package/es/widgets/sort-by/sort-by.js +2 -2
- package/es/widgets/stats/stats.js +4 -4
- package/es/widgets/toggle-refinement/toggle-refinement.js +4 -4
- package/es/widgets/voice-search/voice-search.d.ts +2 -2
- package/es/widgets/voice-search/voice-search.js +4 -4
- package/package.json +5 -5
- package/cjs/lib/utils/detect-insights-client.js +0 -17
- package/es/lib/utils/detect-insights-client.d.ts +0 -1
- package/es/lib/utils/detect-insights-client.js +0 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { AnswersCSSClasses, AnswersTemplates } from '../../widgets/answers/answers';
|
|
4
3
|
import type { ComponentCSSClasses, Hit } from '../../types';
|
|
4
|
+
import type { AnswersCSSClasses, AnswersTemplates } from '../../widgets/answers/answers';
|
|
5
5
|
export type AnswersComponentCSSClasses = ComponentCSSClasses<AnswersCSSClasses>;
|
|
6
6
|
export type AnswersComponentTemplates = Required<AnswersTemplates>;
|
|
7
7
|
export type AnswersProps = {
|
|
@@ -5,8 +5,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
-
import { h } from 'preact';
|
|
9
8
|
import { cx } from '@algolia/ui-components-shared';
|
|
9
|
+
import { h } from 'preact';
|
|
10
|
+
import { warning } from "../../lib/utils/index.js";
|
|
10
11
|
import Template from "../Template/Template.js";
|
|
11
12
|
var Answers = function Answers(_ref) {
|
|
12
13
|
var hits = _ref.hits,
|
|
@@ -31,7 +32,7 @@ var Answers = function Answers(_ref) {
|
|
|
31
32
|
}
|
|
32
33
|
})) : h("ul", {
|
|
33
34
|
className: cssClasses.list
|
|
34
|
-
}, hits.map(function (hit,
|
|
35
|
+
}, hits.map(function (hit, index) {
|
|
35
36
|
return h(Template, _extends({}, templateProps, {
|
|
36
37
|
templateKey: "item",
|
|
37
38
|
rootTagName: "li",
|
|
@@ -40,7 +41,10 @@ var Answers = function Answers(_ref) {
|
|
|
40
41
|
},
|
|
41
42
|
key: hit.objectID,
|
|
42
43
|
data: _objectSpread(_objectSpread({}, hit), {}, {
|
|
43
|
-
__hitIndex
|
|
44
|
+
get __hitIndex() {
|
|
45
|
+
process.env.NODE_ENV === 'development' ? warning(false, 'The `__hitIndex` property is deprecated. Use the absolute `__position` instead.') : void 0;
|
|
46
|
+
return index;
|
|
47
|
+
}
|
|
44
48
|
})
|
|
45
49
|
}));
|
|
46
50
|
})));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { BreadcrumbCSSClasses, BreadcrumbTemplates } from '../../widgets/breadcrumb/breadcrumb';
|
|
4
|
-
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
-
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
6
3
|
import type { BreadcrumbConnectorParamsItem } from '../../connectors/breadcrumb/connectBreadcrumb';
|
|
4
|
+
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
5
|
+
import type { ComponentCSSClasses } from '../../types';
|
|
6
|
+
import type { BreadcrumbCSSClasses, BreadcrumbTemplates } from '../../widgets/breadcrumb/breadcrumb';
|
|
7
7
|
export type BreadcrumbComponentCSSClasses = ComponentCSSClasses<BreadcrumbCSSClasses>;
|
|
8
8
|
export type BreadcrumbComponentTemplates = Required<BreadcrumbTemplates>;
|
|
9
9
|
export type BreadcrumbProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import { h } from 'preact';
|
|
3
2
|
import { cx } from '@algolia/ui-components-shared';
|
|
3
|
+
import { h } from 'preact';
|
|
4
4
|
import Template from "../Template/Template.js";
|
|
5
5
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
6
6
|
var items = _ref.items,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
3
|
import type { ClearRefinementsRenderState } from '../../connectors/clear-refinements/connectClearRefinements';
|
|
4
|
-
import type { ClearRefinementsCSSClasses, ClearRefinementsTemplates } from '../../widgets/clear-refinements/clear-refinements';
|
|
5
|
-
import type { ComponentCSSClasses } from '../../types';
|
|
6
4
|
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
5
|
+
import type { ComponentCSSClasses } from '../../types';
|
|
6
|
+
import type { ClearRefinementsCSSClasses, ClearRefinementsTemplates } from '../../widgets/clear-refinements/clear-refinements';
|
|
7
7
|
export type ClearRefinementsComponentCSSClasses = ComponentCSSClasses<ClearRefinementsCSSClasses>;
|
|
8
8
|
export type ClearRefinementsComponentTemplates = Required<ClearRefinementsTemplates>;
|
|
9
9
|
export type ClearRefinementsProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import { h } from 'preact';
|
|
3
2
|
import { cx } from '@algolia/ui-components-shared';
|
|
3
|
+
import { h } from 'preact';
|
|
4
4
|
import Template from "../Template/Template.js";
|
|
5
5
|
var ClearRefinements = function ClearRefinements(_ref) {
|
|
6
6
|
var hasRefinements = _ref.hasRefinements,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
3
|
import type { CurrentRefinementsConnectorParamsItem } from '../../connectors/current-refinements/connectCurrentRefinements';
|
|
4
|
-
import type { CurrentRefinementsCSSClasses } from '../../widgets/current-refinements/current-refinements';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { CurrentRefinementsCSSClasses } from '../../widgets/current-refinements/current-refinements';
|
|
6
6
|
export type CurrentRefinementsComponentCSSClasses = ComponentCSSClasses<CurrentRefinementsCSSClasses>;
|
|
7
7
|
export type CurrentRefinementsProps = {
|
|
8
8
|
items: CurrentRefinementsConnectorParamsItem[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h } from 'preact';
|
|
2
1
|
import { cx } from '@algolia/ui-components-shared';
|
|
2
|
+
import { h } from 'preact';
|
|
3
3
|
import { isSpecialClick, capitalize } from "../../lib/utils/index.js";
|
|
4
4
|
var createItemKey = function createItemKey(_ref) {
|
|
5
5
|
var attribute = _ref.attribute,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { GeoSearchCSSClasses, GeoSearchTemplates } from '../../widgets/geo-search/geo-search';
|
|
4
|
-
import type { ComponentCSSClasses } from '../../types';
|
|
5
3
|
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
4
|
+
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { GeoSearchCSSClasses, GeoSearchTemplates } from '../../widgets/geo-search/geo-search';
|
|
6
6
|
type Props = {
|
|
7
7
|
cssClasses: ComponentCSSClasses<GeoSearchCSSClasses>;
|
|
8
8
|
enableRefine: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import { h, Fragment } from 'preact';
|
|
3
2
|
import { cx } from '@algolia/ui-components-shared';
|
|
3
|
+
import { h, Fragment } from 'preact';
|
|
4
4
|
import Template from "../Template/Template.js";
|
|
5
5
|
import GeoSearchButton from "./GeoSearchButton.js";
|
|
6
6
|
import GeoSearchToggle from "./GeoSearchToggle.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { SearchResults } from 'algoliasearch-helper';
|
|
4
|
-
import type { BindEventForHits, SendEventForHits } from '../../lib/utils';
|
|
5
3
|
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
4
|
+
import type { BindEventForHits, SendEventForHits } from '../../lib/utils';
|
|
6
5
|
import type { ComponentCSSClasses, Hit } from '../../types';
|
|
7
6
|
import type { HitsCSSClasses, HitsTemplates } from '../../widgets/hits/hits';
|
|
7
|
+
import type { SearchResults } from 'algoliasearch-helper';
|
|
8
8
|
export type HitsComponentCSSClasses = ComponentCSSClasses<HitsCSSClasses>;
|
|
9
9
|
export type HitsComponentTemplates = Required<HitsTemplates>;
|
|
10
10
|
export type HitsProps = {
|
|
@@ -5,8 +5,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
-
import { h } from 'preact';
|
|
9
8
|
import { cx } from '@algolia/ui-components-shared';
|
|
9
|
+
import { h } from 'preact';
|
|
10
|
+
import { warning } from "../../lib/utils/index.js";
|
|
10
11
|
import Template from "../Template/Template.js";
|
|
11
12
|
var Hits = function Hits(_ref) {
|
|
12
13
|
var results = _ref.results,
|
|
@@ -37,7 +38,10 @@ var Hits = function Hits(_ref) {
|
|
|
37
38
|
},
|
|
38
39
|
key: hit.objectID,
|
|
39
40
|
data: _objectSpread(_objectSpread({}, hit), {}, {
|
|
40
|
-
__hitIndex
|
|
41
|
+
get __hitIndex() {
|
|
42
|
+
process.env.NODE_ENV === 'development' ? warning(false, 'The `__hitIndex` property is deprecated. Use the absolute `__position` instead.') : void 0;
|
|
43
|
+
return index;
|
|
44
|
+
}
|
|
41
45
|
}),
|
|
42
46
|
bindEvent: bindEvent,
|
|
43
47
|
sendEvent: sendEvent
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type {
|
|
3
|
+
import type { SendEventForHits, BindEventForHits } from '../../lib/utils';
|
|
4
4
|
import type { ComponentCSSClasses, Hit } from '../../types';
|
|
5
5
|
import type { InfiniteHitsCSSClasses, InfiniteHitsTemplates } from '../../widgets/infinite-hits/infinite-hits';
|
|
6
|
-
import type {
|
|
6
|
+
import type { SearchResults } from 'algoliasearch-helper';
|
|
7
7
|
export type InfiniteHitsComponentCSSClasses = ComponentCSSClasses<InfiniteHitsCSSClasses>;
|
|
8
8
|
export type InfiniteHitsComponentTemplates = Required<InfiniteHitsTemplates>;
|
|
9
9
|
export type InfiniteHitsProps = {
|
|
@@ -5,8 +5,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
-
import { h } from 'preact';
|
|
9
8
|
import { cx } from '@algolia/ui-components-shared';
|
|
9
|
+
import { h } from 'preact';
|
|
10
|
+
import { warning } from "../../lib/utils/index.js";
|
|
10
11
|
import Template from "../Template/Template.js";
|
|
11
12
|
var InfiniteHits = function InfiniteHits(_ref) {
|
|
12
13
|
var results = _ref.results,
|
|
@@ -41,7 +42,7 @@ var InfiniteHits = function InfiniteHits(_ref) {
|
|
|
41
42
|
}
|
|
42
43
|
})), h("ol", {
|
|
43
44
|
className: cssClasses.list
|
|
44
|
-
}, hits.map(function (hit,
|
|
45
|
+
}, hits.map(function (hit, index) {
|
|
45
46
|
return h(Template, _extends({}, templateProps, {
|
|
46
47
|
templateKey: "item",
|
|
47
48
|
rootTagName: "li",
|
|
@@ -50,7 +51,10 @@ var InfiniteHits = function InfiniteHits(_ref) {
|
|
|
50
51
|
},
|
|
51
52
|
key: hit.objectID,
|
|
52
53
|
data: _objectSpread(_objectSpread({}, hit), {}, {
|
|
53
|
-
__hitIndex
|
|
54
|
+
get __hitIndex() {
|
|
55
|
+
process.env.NODE_ENV === 'development' ? warning(false, 'The `__hitIndex` property is deprecated. Use the absolute `__position` instead.') : void 0;
|
|
56
|
+
return index;
|
|
57
|
+
}
|
|
54
58
|
}),
|
|
55
59
|
bindEvent: bindEvent,
|
|
56
60
|
sendEvent: sendEvent
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { MenuSelectCSSClasses, MenuSelectTemplates } from '../../widgets/menu-select/menu-select';
|
|
4
3
|
import type { MenuRenderState } from '../../connectors/menu/connectMenu';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { MenuSelectCSSClasses, MenuSelectTemplates } from '../../widgets/menu-select/menu-select';
|
|
6
6
|
export type MenuSelectComponentCSSClasses = ComponentCSSClasses<MenuSelectCSSClasses>;
|
|
7
7
|
export type MenuSelectComponentTemplates = Required<MenuSelectTemplates>;
|
|
8
8
|
type MenuItem = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import { h } from 'preact';
|
|
3
2
|
import { cx } from '@algolia/ui-components-shared';
|
|
3
|
+
import { h } from 'preact';
|
|
4
4
|
import { find } from "../../lib/utils/index.js";
|
|
5
5
|
import Template from "../Template/Template.js";
|
|
6
6
|
function MenuSelect(_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { PaginationCSSClasses, PaginationTemplates } from '../../widgets/pagination/pagination';
|
|
4
3
|
import type { ComponentCSSClasses } from '../../types';
|
|
4
|
+
import type { PaginationCSSClasses, PaginationTemplates } from '../../widgets/pagination/pagination';
|
|
5
5
|
export type PaginationComponentCSSClasses = ComponentCSSClasses<PaginationCSSClasses>;
|
|
6
6
|
export type PaginationComponentTemplates = Required<PaginationTemplates>;
|
|
7
7
|
export type PaginationProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { PanelCSSClasses, PanelSharedOptions, PanelTemplates } from '../../widgets/panel/panel';
|
|
4
3
|
import type { ComponentCSSClasses, UnknownWidgetFactory } from '../../types';
|
|
4
|
+
import type { PanelCSSClasses, PanelSharedOptions, PanelTemplates } from '../../widgets/panel/panel';
|
|
5
5
|
export type PanelComponentCSSClasses = ComponentCSSClasses<Omit<PanelCSSClasses, 'collapseIcon'>>;
|
|
6
6
|
export type PanelComponentTemplates<TWidget extends UnknownWidgetFactory> = Required<PanelTemplates<TWidget>>;
|
|
7
7
|
export type PanelProps<TWidget extends UnknownWidgetFactory> = {
|
|
@@ -4,9 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { cx } from '@algolia/ui-components-shared';
|
|
7
8
|
import { h } from 'preact';
|
|
8
9
|
import { useState, useEffect, useRef } from 'preact/hooks';
|
|
9
|
-
import { cx } from '@algolia/ui-components-shared';
|
|
10
10
|
import Template from "../Template/Template.js";
|
|
11
11
|
function Panel(props) {
|
|
12
12
|
var _useState = useState(props.isCollapsed),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h, Component } from 'preact';
|
|
3
|
-
import type { RangeInputCSSClasses, RangeInputTemplates } from '../../widgets/range-input/range-input';
|
|
4
3
|
import type { Range, RangeBoundaries } from '../../connectors/range/connectRange';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { RangeInputCSSClasses, RangeInputTemplates } from '../../widgets/range-input/range-input';
|
|
6
6
|
export type RangeInputComponentCSSClasses = ComponentCSSClasses<RangeInputCSSClasses>;
|
|
7
7
|
export type RangeInputComponentTemplates = Required<RangeInputTemplates>;
|
|
8
8
|
export type RangeInputProps = {
|
|
@@ -13,8 +13,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
-
import { h, Component } from 'preact';
|
|
17
16
|
import { cx } from '@algolia/ui-components-shared';
|
|
17
|
+
import { h, Component } from 'preact';
|
|
18
18
|
import Template from "../Template/Template.js";
|
|
19
19
|
var RangeInput = /*#__PURE__*/function (_Component) {
|
|
20
20
|
_inherits(RangeInput, _Component);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import { Component } from 'preact';
|
|
4
|
-
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
5
|
-
import type { SearchBoxComponentCSSClasses, SearchBoxComponentTemplates } from '../SearchBox/SearchBox';
|
|
2
|
+
import { h, Component } from 'preact';
|
|
6
3
|
import type { HierarchicalMenuItem } from '../../connectors/hierarchical-menu/connectHierarchicalMenu';
|
|
4
|
+
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
7
5
|
import type { ComponentCSSClasses, CreateURL, Templates } from '../../types';
|
|
8
|
-
import type { RefinementListOwnCSSClasses } from '../../widgets/refinement-list/refinement-list';
|
|
9
|
-
import type { RatingMenuComponentCSSClasses } from '../../widgets/rating-menu/rating-menu';
|
|
10
6
|
import type { HierarchicalMenuComponentCSSClasses } from '../../widgets/hierarchical-menu/hierarchical-menu';
|
|
7
|
+
import type { RatingMenuComponentCSSClasses } from '../../widgets/rating-menu/rating-menu';
|
|
8
|
+
import type { RefinementListOwnCSSClasses } from '../../widgets/refinement-list/refinement-list';
|
|
9
|
+
import type { SearchBoxComponentCSSClasses, SearchBoxComponentTemplates } from '../SearchBox/SearchBox';
|
|
10
|
+
import type { JSX } from 'preact';
|
|
11
11
|
type RefinementListOptionalClasses = 'noResults' | 'checkbox' | 'labelText' | 'showMore' | 'disabledShowMore' | 'searchBox' | 'count';
|
|
12
12
|
type RefinementListWidgetCSSClasses = ComponentCSSClasses<RefinementListOwnCSSClasses>;
|
|
13
13
|
type RefinementListRequiredCSSClasses = Omit<RefinementListWidgetCSSClasses, RefinementListOptionalClasses> & Partial<Pick<RefinementListWidgetCSSClasses, RefinementListOptionalClasses>>;
|
|
@@ -61,6 +61,6 @@ declare class RefinementList<TTemplates extends Templates> extends Component<Ref
|
|
|
61
61
|
private handleItemClick;
|
|
62
62
|
componentWillReceiveProps(nextProps: RefinementListPropsWithDefaultProps<TTemplates>): void;
|
|
63
63
|
private refineFirstValue;
|
|
64
|
-
render(): JSX.Element;
|
|
64
|
+
render(): h.JSX.Element;
|
|
65
65
|
}
|
|
66
66
|
export default RefinementList;
|
|
@@ -18,12 +18,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
20
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
21
|
-
import { h, createRef, Component } from 'preact';
|
|
22
21
|
import { cx } from '@algolia/ui-components-shared';
|
|
22
|
+
import { h, createRef, Component } from 'preact';
|
|
23
23
|
import { isSpecialClick, isEqual } from "../../lib/utils/index.js";
|
|
24
|
+
import SearchBox from "../SearchBox/SearchBox.js";
|
|
24
25
|
import Template from "../Template/Template.js";
|
|
25
26
|
import RefinementListItem from "./RefinementListItem.js";
|
|
26
|
-
import SearchBox from "../SearchBox/SearchBox.js";
|
|
27
27
|
var defaultProps = {
|
|
28
28
|
cssClasses: {},
|
|
29
29
|
depth: 0
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { h } from 'preact';
|
|
2
3
|
import type { JSX } from 'preact';
|
|
3
4
|
export type RefinementListItemProps = {
|
|
4
5
|
facetValueToRefine: string;
|
|
@@ -14,5 +15,5 @@ export type RefinementListItemProps = {
|
|
|
14
15
|
templateProps?: Record<string, any>;
|
|
15
16
|
className: string;
|
|
16
17
|
};
|
|
17
|
-
declare function RefinementListItem({ className, handleClick, facetValueToRefine, isRefined, templateProps, templateKey, templateData, subItems, }: RefinementListItemProps): JSX.Element;
|
|
18
|
+
declare function RefinementListItem({ className, handleClick, facetValueToRefine, isRefined, templateProps, templateKey, templateData, subItems, }: RefinementListItemProps): h.JSX.Element;
|
|
18
19
|
export default RefinementListItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { RelevantSortCSSClasses, RelevantSortTemplates } from '../../widgets/relevant-sort/relevant-sort';
|
|
4
3
|
import type { ComponentCSSClasses } from '../../types';
|
|
4
|
+
import type { RelevantSortCSSClasses, RelevantSortTemplates } from '../../widgets/relevant-sort/relevant-sort';
|
|
5
5
|
export type RelevantSortComponentCSSClasses = ComponentCSSClasses<RelevantSortCSSClasses>;
|
|
6
6
|
export type RelevantSortComponentTemplates = Required<RelevantSortTemplates>;
|
|
7
7
|
type RelevantSortProps = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h, Component } from 'preact';
|
|
3
3
|
import { noop } from '../../lib/utils';
|
|
4
|
-
import type { SearchBoxCSSClasses, SearchBoxTemplates } from '../../widgets/search-box/search-box';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { SearchBoxCSSClasses, SearchBoxTemplates } from '../../widgets/search-box/search-box';
|
|
6
6
|
export type SearchBoxComponentCSSClasses = ComponentCSSClasses<SearchBoxCSSClasses>;
|
|
7
7
|
export type SearchBoxComponentTemplates = Required<SearchBoxTemplates>;
|
|
8
8
|
type SearchBoxProps = {
|
|
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import { h } from 'preact';
|
|
8
7
|
import { cx } from '@algolia/ui-components-shared';
|
|
8
|
+
import { h } from 'preact';
|
|
9
9
|
var Pit = function Pit(_ref) {
|
|
10
10
|
var style = _ref.style,
|
|
11
11
|
children = _ref.children;
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* @see https://github.com/airbnb/rheostat
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { h, Component } from 'preact';
|
|
7
8
|
import type { ComponentChildren, ComponentType, JSX } from 'preact';
|
|
8
|
-
import { Component } from 'preact';
|
|
9
9
|
type BoundingBox = {
|
|
10
10
|
height: number;
|
|
11
11
|
left: number;
|
|
12
12
|
top: number;
|
|
13
13
|
width: number;
|
|
14
14
|
};
|
|
15
|
-
declare function Button(props: JSX.IntrinsicElements['button']): JSX.Element;
|
|
15
|
+
declare function Button(props: JSX.IntrinsicElements['button']): h.JSX.Element;
|
|
16
16
|
type Style = {
|
|
17
17
|
position?: 'absolute';
|
|
18
18
|
top?: number | string;
|
|
@@ -127,6 +127,6 @@ declare class Rheostat extends Component<Props, State> {
|
|
|
127
127
|
fireChangeEvent(): void;
|
|
128
128
|
slideTo(idx: number, proposedPosition: number, onAfterSet?: () => void): void;
|
|
129
129
|
updateNewValues(nextProps: Required<Props>): void;
|
|
130
|
-
render(): JSX.Element;
|
|
130
|
+
render(): h.JSX.Element;
|
|
131
131
|
}
|
|
132
132
|
export default Rheostat;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h, Component } from 'preact';
|
|
3
3
|
import type { RangeBoundaries } from '../../connectors/range/connectRange';
|
|
4
|
-
import type { RangeSliderCssClasses, RangeSliderWidgetParams } from '../../widgets/range-slider/range-slider';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { RangeSliderCssClasses, RangeSliderWidgetParams } from '../../widgets/range-slider/range-slider';
|
|
6
6
|
export type RangeSliderComponentCSSClasses = ComponentCSSClasses<RangeSliderCssClasses>;
|
|
7
7
|
export type SliderProps = {
|
|
8
8
|
refine(values: RangeBoundaries): void;
|
|
@@ -19,11 +19,11 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
19
19
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
20
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
21
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
-
import { h, Component } from 'preact';
|
|
23
|
-
import Rheostat from "./Rheostat.js";
|
|
24
22
|
import { cx } from '@algolia/ui-components-shared';
|
|
23
|
+
import { h, Component } from 'preact';
|
|
25
24
|
import { range } from "../../lib/utils/index.js";
|
|
26
25
|
import Pit from "./Pit.js";
|
|
26
|
+
import Rheostat from "./Rheostat.js";
|
|
27
27
|
var Slider = /*#__PURE__*/function (_Component) {
|
|
28
28
|
_inherits(Slider, _Component);
|
|
29
29
|
var _super = _createSuper(Slider);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { StatsCSSClasses, StatsTemplates } from '../../widgets/stats/stats';
|
|
4
3
|
import type { ComponentCSSClasses } from '../../types';
|
|
4
|
+
import type { StatsCSSClasses, StatsTemplates } from '../../widgets/stats/stats';
|
|
5
5
|
export type StatsComponentCSSClasses = ComponentCSSClasses<StatsCSSClasses>;
|
|
6
6
|
export type StatsComponentTemplates = Required<StatsTemplates>;
|
|
7
7
|
type StatsProps = {
|
|
@@ -8,8 +8,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
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; }
|
|
11
|
-
import { h } from 'preact';
|
|
12
11
|
import { cx } from '@algolia/ui-components-shared';
|
|
12
|
+
import { h } from 'preact';
|
|
13
13
|
import Template from "../Template/Template.js";
|
|
14
14
|
var Stats = function Stats(_ref) {
|
|
15
15
|
var nbHits = _ref.nbHits,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import { Component } from 'preact';
|
|
4
|
-
import type { BindEventForHits, SendEventForHits } from '../../lib/utils';
|
|
2
|
+
import { h, Component } from 'preact';
|
|
5
3
|
import type { PreparedTemplateProps } from '../../lib/templating';
|
|
4
|
+
import type { BindEventForHits, SendEventForHits } from '../../lib/utils';
|
|
6
5
|
import type { Templates } from '../../types';
|
|
6
|
+
import type { JSX } from 'preact';
|
|
7
7
|
declare const defaultProps: {
|
|
8
8
|
data: {};
|
|
9
9
|
rootTagName: string;
|
|
@@ -28,6 +28,6 @@ declare class Template extends Component<TemplateProps> {
|
|
|
28
28
|
templatesConfig: {};
|
|
29
29
|
};
|
|
30
30
|
shouldComponentUpdate(nextProps: TemplateProps): boolean;
|
|
31
|
-
render(): JSX.Element | null;
|
|
31
|
+
render(): h.JSX.Element | null;
|
|
32
32
|
}
|
|
33
33
|
export default Template;
|
|
@@ -14,8 +14,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
16
|
import { h, Component } from 'preact';
|
|
17
|
-
import { warning, isEqual } from "../../lib/utils/index.js";
|
|
18
17
|
import { renderTemplate } from "../../lib/templating/index.js";
|
|
18
|
+
import { warning, isEqual } from "../../lib/utils/index.js";
|
|
19
19
|
var defaultProps = {
|
|
20
20
|
data: {},
|
|
21
21
|
rootTagName: 'div',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
import type { VoiceSearchCSSClasses, VoiceSearchTemplates } from '../../widgets/voice-search/voice-search';
|
|
4
3
|
import type { VoiceListeningState } from '../../lib/voiceSearchHelper/types';
|
|
5
4
|
import type { ComponentCSSClasses } from '../../types';
|
|
5
|
+
import type { VoiceSearchCSSClasses, VoiceSearchTemplates } from '../../widgets/voice-search/voice-search';
|
|
6
6
|
export type VoiceSearchComponentCSSClasses = ComponentCSSClasses<VoiceSearchCSSClasses>;
|
|
7
7
|
export type VoiceSearchComponentTemplates = Required<VoiceSearchTemplates>;
|
|
8
8
|
export type VoiceSearchProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SearchResults } from 'algoliasearch-helper';
|
|
2
1
|
import type { SendEventForHits } from '../../lib/utils';
|
|
3
2
|
import type { Hit, Connector, WidgetRenderState } from '../../types';
|
|
3
|
+
import type { SearchResults } from 'algoliasearch-helper';
|
|
4
4
|
export type AutocompleteConnectorParams = {
|
|
5
5
|
/**
|
|
6
6
|
* Escapes HTML entities from hits string values.
|
|
@@ -6,11 +6,6 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import algoliasearchHelper from 'algoliasearch-helper';
|
|
8
8
|
import { createDocumentationMessageGenerator, isPlainObject, mergeSearchParameters, noop } from "../../lib/utils/index.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Refine the given search parameters.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
9
|
var withUsage = createDocumentationMessageGenerator({
|
|
15
10
|
name: 'configure',
|
|
16
11
|
connector: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SearchParameters, PlainSearchParameters } from 'algoliasearch-helper';
|
|
2
1
|
import type { AlgoliaHit, Connector } from '../../types';
|
|
3
2
|
import type { ConfigureWidgetDescription } from '../configure/connectConfigure';
|
|
3
|
+
import type { SearchParameters, PlainSearchParameters } from 'algoliasearch-helper';
|
|
4
4
|
export type MatchingPatterns = {
|
|
5
5
|
[attribute: string]: {
|
|
6
6
|
/**
|