react-instantsearch 7.5.5 → 7.6.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/dist/cjs/ui/Breadcrumb.js +8 -8
- package/dist/cjs/ui/ClearRefinements.js +3 -3
- package/dist/cjs/ui/CurrentRefinements.js +9 -8
- package/dist/cjs/ui/HierarchicalMenu.js +9 -9
- package/dist/cjs/ui/Highlight.js +5 -5
- package/dist/cjs/ui/Hits.js +4 -4
- package/dist/cjs/ui/HitsPerPage.js +4 -4
- package/dist/cjs/ui/InfiniteHits.js +6 -6
- package/dist/cjs/ui/InternalHighlight.js +8 -51
- package/dist/cjs/ui/Menu.js +8 -8
- package/dist/cjs/ui/Pagination.js +12 -12
- package/dist/cjs/ui/PoweredBy.js +4 -4
- package/dist/cjs/ui/RangeInput.js +9 -9
- package/dist/cjs/ui/RefinementList.js +11 -11
- package/dist/cjs/ui/SearchBox.js +10 -12
- package/dist/cjs/ui/Snippet.js +5 -5
- package/dist/cjs/ui/SortBy.js +4 -4
- package/dist/cjs/ui/Stats.js +2 -2
- package/dist/cjs/ui/ToggleRefinement.js +5 -5
- package/dist/cjs/ui/lib/index.js +0 -11
- package/dist/es/ui/Breadcrumb.js +1 -1
- package/dist/es/ui/ClearRefinements.js +1 -1
- package/dist/es/ui/CurrentRefinements.js +2 -1
- package/dist/es/ui/HierarchicalMenu.js +1 -1
- package/dist/es/ui/Highlight.d.ts +1 -1
- package/dist/es/ui/Highlight.js +1 -1
- package/dist/es/ui/Hits.js +1 -1
- package/dist/es/ui/HitsPerPage.js +1 -1
- package/dist/es/ui/InfiniteHits.js +1 -1
- package/dist/es/ui/InternalHighlight.d.ts +1 -32
- package/dist/es/ui/InternalHighlight.js +6 -47
- package/dist/es/ui/Menu.js +1 -1
- package/dist/es/ui/Pagination.js +1 -1
- package/dist/es/ui/PoweredBy.js +1 -1
- package/dist/es/ui/RangeInput.js +1 -1
- package/dist/es/ui/RefinementList.js +1 -1
- package/dist/es/ui/SearchBox.js +2 -4
- package/dist/es/ui/Snippet.d.ts +1 -1
- package/dist/es/ui/Snippet.js +1 -1
- package/dist/es/ui/SortBy.js +1 -1
- package/dist/es/ui/Stats.js +1 -1
- package/dist/es/ui/ToggleRefinement.js +1 -1
- package/dist/es/ui/lib/index.d.ts +0 -1
- package/dist/es/ui/lib/index.js +0 -1
- package/dist/umd/ReactInstantSearch.js +151 -66
- package/dist/umd/ReactInstantSearch.js.map +1 -1
- package/dist/umd/ReactInstantSearch.min.js +1 -1
- package/dist/umd/ReactInstantSearch.min.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/ui/lib/cx.js +0 -12
- package/dist/es/ui/lib/cx.d.ts +0 -1
- package/dist/es/ui/lib/cx.js +0 -6
|
@@ -2,8 +2,8 @@ var _excluded = ["classNames", "checked", "onChange", "label"];
|
|
|
2
2
|
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); }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
|
+
import { cx } from 'instantsearch-ui-components';
|
|
5
6
|
import React from 'react';
|
|
6
|
-
import { cx } from "./lib/cx.js";
|
|
7
7
|
export function ToggleRefinement(_ref) {
|
|
8
8
|
var _ref$classNames = _ref.classNames,
|
|
9
9
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
package/dist/es/ui/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
var React__default = 'default' in React ? React['default'] : React;
|
|
9
9
|
|
|
10
|
-
var version = '7.
|
|
10
|
+
var version = '7.6.0';
|
|
11
11
|
|
|
12
12
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
13
13
|
//
|
|
@@ -12204,7 +12204,7 @@
|
|
|
12204
12204
|
};
|
|
12205
12205
|
}
|
|
12206
12206
|
|
|
12207
|
-
var version$3 = '4.
|
|
12207
|
+
var version$3 = '4.65.0';
|
|
12208
12208
|
|
|
12209
12209
|
function _typeof$o(obj) {
|
|
12210
12210
|
"@babel/helpers - typeof";
|
|
@@ -12927,6 +12927,10 @@
|
|
|
12927
12927
|
return InstantSearch;
|
|
12928
12928
|
}(events);
|
|
12929
12929
|
|
|
12930
|
+
function unwrapExports (x) {
|
|
12931
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12932
|
+
}
|
|
12933
|
+
|
|
12930
12934
|
function createCommonjsModule(fn, module) {
|
|
12931
12935
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
12932
12936
|
}
|
|
@@ -19000,11 +19004,132 @@
|
|
|
19000
19004
|
return typeof key === "symbol" ? key : String(key);
|
|
19001
19005
|
}
|
|
19002
19006
|
|
|
19007
|
+
var _extends_1 = createCommonjsModule(function (module) {
|
|
19008
|
+
function _extends() {
|
|
19009
|
+
module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
19010
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
19011
|
+
var source = arguments[i];
|
|
19012
|
+
for (var key in source) {
|
|
19013
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19014
|
+
target[key] = source[key];
|
|
19015
|
+
}
|
|
19016
|
+
}
|
|
19017
|
+
}
|
|
19018
|
+
return target;
|
|
19019
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
19020
|
+
return _extends.apply(this, arguments);
|
|
19021
|
+
}
|
|
19022
|
+
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
19023
|
+
});
|
|
19024
|
+
|
|
19025
|
+
var _extends$2 = unwrapExports(_extends_1);
|
|
19026
|
+
|
|
19027
|
+
var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
|
|
19028
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
19029
|
+
if (source == null) return {};
|
|
19030
|
+
var target = {};
|
|
19031
|
+
var sourceKeys = Object.keys(source);
|
|
19032
|
+
var key, i;
|
|
19033
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
19034
|
+
key = sourceKeys[i];
|
|
19035
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
19036
|
+
target[key] = source[key];
|
|
19037
|
+
}
|
|
19038
|
+
return target;
|
|
19039
|
+
}
|
|
19040
|
+
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
19041
|
+
});
|
|
19042
|
+
|
|
19043
|
+
unwrapExports(objectWithoutPropertiesLoose);
|
|
19044
|
+
|
|
19045
|
+
var objectWithoutProperties = createCommonjsModule(function (module) {
|
|
19046
|
+
function _objectWithoutProperties(source, excluded) {
|
|
19047
|
+
if (source == null) return {};
|
|
19048
|
+
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
19049
|
+
var key, i;
|
|
19050
|
+
if (Object.getOwnPropertySymbols) {
|
|
19051
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
19052
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
19053
|
+
key = sourceSymbolKeys[i];
|
|
19054
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
19055
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
19056
|
+
target[key] = source[key];
|
|
19057
|
+
}
|
|
19058
|
+
}
|
|
19059
|
+
return target;
|
|
19060
|
+
}
|
|
19061
|
+
module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
19062
|
+
});
|
|
19063
|
+
|
|
19064
|
+
var _objectWithoutProperties$d = unwrapExports(objectWithoutProperties);
|
|
19065
|
+
|
|
19003
19066
|
function cx() {
|
|
19004
19067
|
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19005
19068
|
classNames[_key] = arguments[_key];
|
|
19006
19069
|
}
|
|
19007
|
-
return classNames.
|
|
19070
|
+
return classNames.reduce(function (acc, className) {
|
|
19071
|
+
if (Array.isArray(className)) {
|
|
19072
|
+
return acc.concat(className);
|
|
19073
|
+
}
|
|
19074
|
+
return acc.concat([className]);
|
|
19075
|
+
}, []).filter(Boolean).join(' ');
|
|
19076
|
+
}
|
|
19077
|
+
|
|
19078
|
+
var _excluded$c = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
19079
|
+
function createHighlightPartComponent(_ref) {
|
|
19080
|
+
var createElement = _ref.createElement;
|
|
19081
|
+
return function HighlightPart(_ref2) {
|
|
19082
|
+
var classNames = _ref2.classNames,
|
|
19083
|
+
children = _ref2.children,
|
|
19084
|
+
highlightedTagName = _ref2.highlightedTagName,
|
|
19085
|
+
isHighlighted = _ref2.isHighlighted,
|
|
19086
|
+
nonHighlightedTagName = _ref2.nonHighlightedTagName;
|
|
19087
|
+
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
19088
|
+
return createElement(TagName, {
|
|
19089
|
+
className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
|
|
19090
|
+
}, children);
|
|
19091
|
+
};
|
|
19092
|
+
}
|
|
19093
|
+
function createHighlightComponent(_ref3) {
|
|
19094
|
+
var createElement = _ref3.createElement,
|
|
19095
|
+
Fragment = _ref3.Fragment;
|
|
19096
|
+
var HighlightPart = createHighlightPartComponent({
|
|
19097
|
+
createElement: createElement,
|
|
19098
|
+
Fragment: Fragment
|
|
19099
|
+
});
|
|
19100
|
+
return function Highlight(userProps) {
|
|
19101
|
+
// Not destructured in function signature, to make sure it's not exposed in
|
|
19102
|
+
// the type definition.
|
|
19103
|
+
var parts = userProps.parts,
|
|
19104
|
+
_userProps$highlighte = userProps.highlightedTagName,
|
|
19105
|
+
highlightedTagName = _userProps$highlighte === void 0 ? 'mark' : _userProps$highlighte,
|
|
19106
|
+
_userProps$nonHighlig = userProps.nonHighlightedTagName,
|
|
19107
|
+
nonHighlightedTagName = _userProps$nonHighlig === void 0 ? 'span' : _userProps$nonHighlig,
|
|
19108
|
+
_userProps$separator = userProps.separator,
|
|
19109
|
+
separator = _userProps$separator === void 0 ? ', ' : _userProps$separator,
|
|
19110
|
+
className = userProps.className,
|
|
19111
|
+
_userProps$classNames = userProps.classNames,
|
|
19112
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
19113
|
+
props = _objectWithoutProperties$d(userProps, _excluded$c);
|
|
19114
|
+
return createElement("span", _extends$2({}, props, {
|
|
19115
|
+
className: cx(classNames.root, className)
|
|
19116
|
+
}), parts.map(function (part, partIndex) {
|
|
19117
|
+
var isLastPart = partIndex === parts.length - 1;
|
|
19118
|
+
return createElement(Fragment, {
|
|
19119
|
+
key: partIndex
|
|
19120
|
+
}, part.map(function (subPart, subPartIndex) {
|
|
19121
|
+
return createElement(HighlightPart, {
|
|
19122
|
+
key: subPartIndex,
|
|
19123
|
+
classNames: classNames,
|
|
19124
|
+
highlightedTagName: highlightedTagName,
|
|
19125
|
+
nonHighlightedTagName: nonHighlightedTagName,
|
|
19126
|
+
isHighlighted: subPart.isHighlighted
|
|
19127
|
+
}, subPart.value);
|
|
19128
|
+
}), !isLastPart && createElement("span", {
|
|
19129
|
+
className: classNames.separator
|
|
19130
|
+
}, separator));
|
|
19131
|
+
}));
|
|
19132
|
+
};
|
|
19008
19133
|
}
|
|
19009
19134
|
|
|
19010
19135
|
function isModifierClick(event) {
|
|
@@ -19012,7 +19137,7 @@
|
|
|
19012
19137
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
19013
19138
|
}
|
|
19014
19139
|
|
|
19015
|
-
var _excluded$
|
|
19140
|
+
var _excluded$d = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
19016
19141
|
function Breadcrumb(_ref) {
|
|
19017
19142
|
var _ref$classNames = _ref.classNames,
|
|
19018
19143
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19024,7 +19149,7 @@
|
|
|
19024
19149
|
_ref$separator = _ref.separator,
|
|
19025
19150
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
19026
19151
|
translations = _ref.translations,
|
|
19027
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19152
|
+
props = _objectWithoutProperties$c(_ref, _excluded$d);
|
|
19028
19153
|
var handleClick = function handleClick(value) {
|
|
19029
19154
|
return function (event) {
|
|
19030
19155
|
if (!isModifierClick(event)) {
|
|
@@ -19059,14 +19184,14 @@
|
|
|
19059
19184
|
})));
|
|
19060
19185
|
}
|
|
19061
19186
|
|
|
19062
|
-
var _excluded$
|
|
19187
|
+
var _excluded$e = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
19063
19188
|
function Breadcrumb$1(_ref) {
|
|
19064
19189
|
var attributes = _ref.attributes,
|
|
19065
19190
|
rootPath = _ref.rootPath,
|
|
19066
19191
|
separator = _ref.separator,
|
|
19067
19192
|
transformItems = _ref.transformItems,
|
|
19068
19193
|
translations = _ref.translations,
|
|
19069
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19194
|
+
props = _objectWithoutProperties$c(_ref, _excluded$e);
|
|
19070
19195
|
var _useBreadcrumb = useBreadcrumb({
|
|
19071
19196
|
attributes: attributes,
|
|
19072
19197
|
rootPath: rootPath,
|
|
@@ -19090,7 +19215,7 @@
|
|
|
19090
19215
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
19091
19216
|
}
|
|
19092
19217
|
|
|
19093
|
-
var _excluded$
|
|
19218
|
+
var _excluded$f = ["classNames", "disabled", "onClick", "translations"];
|
|
19094
19219
|
function ClearRefinements(_ref) {
|
|
19095
19220
|
var _ref$classNames = _ref.classNames,
|
|
19096
19221
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19099,7 +19224,7 @@
|
|
|
19099
19224
|
_ref$onClick = _ref.onClick,
|
|
19100
19225
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
19101
19226
|
translations = _ref.translations,
|
|
19102
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19227
|
+
props = _objectWithoutProperties$c(_ref, _excluded$f);
|
|
19103
19228
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19104
19229
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
19105
19230
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -19109,13 +19234,13 @@
|
|
|
19109
19234
|
}, translations.resetButtonText));
|
|
19110
19235
|
}
|
|
19111
19236
|
|
|
19112
|
-
var _excluded$
|
|
19237
|
+
var _excluded$g = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
19113
19238
|
function ClearRefinements$1(_ref) {
|
|
19114
19239
|
var includedAttributes = _ref.includedAttributes,
|
|
19115
19240
|
excludedAttributes = _ref.excludedAttributes,
|
|
19116
19241
|
transformItems = _ref.transformItems,
|
|
19117
19242
|
translations = _ref.translations,
|
|
19118
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19243
|
+
props = _objectWithoutProperties$c(_ref, _excluded$g);
|
|
19119
19244
|
var _useClearRefinements = useClearRefinements({
|
|
19120
19245
|
includedAttributes: includedAttributes,
|
|
19121
19246
|
excludedAttributes: excludedAttributes,
|
|
@@ -19139,7 +19264,7 @@
|
|
|
19139
19264
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
19140
19265
|
}
|
|
19141
19266
|
|
|
19142
|
-
var _excluded$
|
|
19267
|
+
var _excluded$h = ["classNames", "items", "hasRefinements"];
|
|
19143
19268
|
function CurrentRefinements(_ref) {
|
|
19144
19269
|
var _ref$classNames = _ref.classNames,
|
|
19145
19270
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19147,7 +19272,7 @@
|
|
|
19147
19272
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
19148
19273
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
19149
19274
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
19150
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19275
|
+
props = _objectWithoutProperties$c(_ref, _excluded$h);
|
|
19151
19276
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19152
19277
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19153
19278
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -19179,12 +19304,12 @@
|
|
|
19179
19304
|
})));
|
|
19180
19305
|
}
|
|
19181
19306
|
|
|
19182
|
-
var _excluded$
|
|
19307
|
+
var _excluded$i = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
19183
19308
|
function CurrentRefinements$1(_ref) {
|
|
19184
19309
|
var includedAttributes = _ref.includedAttributes,
|
|
19185
19310
|
excludedAttributes = _ref.excludedAttributes,
|
|
19186
19311
|
transformItems = _ref.transformItems,
|
|
19187
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19312
|
+
props = _objectWithoutProperties$c(_ref, _excluded$i);
|
|
19188
19313
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
19189
19314
|
includedAttributes: includedAttributes,
|
|
19190
19315
|
excludedAttributes: excludedAttributes,
|
|
@@ -19201,17 +19326,17 @@
|
|
|
19201
19326
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
19202
19327
|
}
|
|
19203
19328
|
|
|
19204
|
-
var _excluded$
|
|
19329
|
+
var _excluded$j = ["isShowingMore", "translations"];
|
|
19205
19330
|
function ShowMoreButton(_ref) {
|
|
19206
19331
|
var isShowingMore = _ref.isShowingMore,
|
|
19207
19332
|
translations = _ref.translations,
|
|
19208
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19333
|
+
props = _objectWithoutProperties$c(_ref, _excluded$j);
|
|
19209
19334
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
19210
19335
|
isShowingMore: isShowingMore
|
|
19211
19336
|
}));
|
|
19212
19337
|
}
|
|
19213
19338
|
|
|
19214
|
-
var _excluded$
|
|
19339
|
+
var _excluded$k = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
19215
19340
|
function HierarchicalList(_ref) {
|
|
19216
19341
|
var className = _ref.className,
|
|
19217
19342
|
_ref$classNames = _ref.classNames,
|
|
@@ -19263,7 +19388,7 @@
|
|
|
19263
19388
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
19264
19389
|
isShowingMore = _ref2.isShowingMore,
|
|
19265
19390
|
translations = _ref2.translations,
|
|
19266
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
19391
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$k);
|
|
19267
19392
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19268
19393
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19269
19394
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -19280,7 +19405,7 @@
|
|
|
19280
19405
|
}));
|
|
19281
19406
|
}
|
|
19282
19407
|
|
|
19283
|
-
var _excluded$
|
|
19408
|
+
var _excluded$l = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
19284
19409
|
function HierarchicalMenu$1(_ref) {
|
|
19285
19410
|
var attributes = _ref.attributes,
|
|
19286
19411
|
limit = _ref.limit,
|
|
@@ -19292,7 +19417,7 @@
|
|
|
19292
19417
|
sortBy = _ref.sortBy,
|
|
19293
19418
|
transformItems = _ref.transformItems,
|
|
19294
19419
|
translations = _ref.translations,
|
|
19295
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19420
|
+
props = _objectWithoutProperties$c(_ref, _excluded$l);
|
|
19296
19421
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
19297
19422
|
attributes: attributes,
|
|
19298
19423
|
limit: limit,
|
|
@@ -19332,48 +19457,10 @@
|
|
|
19332
19457
|
}));
|
|
19333
19458
|
}
|
|
19334
19459
|
|
|
19335
|
-
var
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
highlightedTagName = _ref.highlightedTagName,
|
|
19340
|
-
isHighlighted = _ref.isHighlighted,
|
|
19341
|
-
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
19342
|
-
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
19343
|
-
return /*#__PURE__*/React__default.createElement(TagName, {
|
|
19344
|
-
className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
|
|
19345
|
-
}, children);
|
|
19346
|
-
}
|
|
19347
|
-
function InternalHighlight(_ref2) {
|
|
19348
|
-
var parts = _ref2.parts,
|
|
19349
|
-
_ref2$highlightedTagN = _ref2.highlightedTagName,
|
|
19350
|
-
highlightedTagName = _ref2$highlightedTagN === void 0 ? 'mark' : _ref2$highlightedTagN,
|
|
19351
|
-
_ref2$nonHighlightedT = _ref2.nonHighlightedTagName,
|
|
19352
|
-
nonHighlightedTagName = _ref2$nonHighlightedT === void 0 ? 'span' : _ref2$nonHighlightedT,
|
|
19353
|
-
_ref2$separator = _ref2.separator,
|
|
19354
|
-
separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
|
|
19355
|
-
className = _ref2.className,
|
|
19356
|
-
classNames = _ref2.classNames,
|
|
19357
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$l);
|
|
19358
|
-
return /*#__PURE__*/React__default.createElement("span", _extends$1({}, props, {
|
|
19359
|
-
className: cx(classNames.root, className)
|
|
19360
|
-
}), parts.map(function (part, partIndex) {
|
|
19361
|
-
var isLastPart = partIndex === parts.length - 1;
|
|
19362
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
19363
|
-
key: partIndex
|
|
19364
|
-
}, part.map(function (subPart, subPartIndex) {
|
|
19365
|
-
return /*#__PURE__*/React__default.createElement(HighlightPart, {
|
|
19366
|
-
key: subPartIndex,
|
|
19367
|
-
classNames: classNames,
|
|
19368
|
-
highlightedTagName: highlightedTagName,
|
|
19369
|
-
nonHighlightedTagName: nonHighlightedTagName,
|
|
19370
|
-
isHighlighted: subPart.isHighlighted
|
|
19371
|
-
}, subPart.value);
|
|
19372
|
-
}), !isLastPart && /*#__PURE__*/React__default.createElement("span", {
|
|
19373
|
-
className: classNames.separator
|
|
19374
|
-
}, separator));
|
|
19375
|
-
}));
|
|
19376
|
-
}
|
|
19460
|
+
var InternalHighlight = createHighlightComponent({
|
|
19461
|
+
createElement: React.createElement,
|
|
19462
|
+
Fragment: React.Fragment
|
|
19463
|
+
});
|
|
19377
19464
|
|
|
19378
19465
|
var _excluded$m = ["classNames"];
|
|
19379
19466
|
function Highlight(_ref) {
|
|
@@ -20243,9 +20330,7 @@
|
|
|
20243
20330
|
}, /*#__PURE__*/React__default.createElement(ResetIcon, {
|
|
20244
20331
|
classNames: classNames
|
|
20245
20332
|
})), /*#__PURE__*/React__default.createElement("span", {
|
|
20246
|
-
className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator)
|
|
20247
|
-
// @ts-ignore (this error is due to conflict with @algolia/ui-components-highlight-vdom, which declares "too global" type for span in case there's no @types/react or preact)
|
|
20248
|
-
,
|
|
20333
|
+
className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),
|
|
20249
20334
|
hidden: !isSearchStalled
|
|
20250
20335
|
}, /*#__PURE__*/React__default.createElement(LoadingIcon, {
|
|
20251
20336
|
classNames: classNames
|