react-instantsearch 7.5.4 → 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 +174 -79
- 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
|
//
|
|
@@ -6800,7 +6800,7 @@
|
|
|
6800
6800
|
return chunks;
|
|
6801
6801
|
}
|
|
6802
6802
|
function _buildEventPayloadsForHits(_ref) {
|
|
6803
|
-
var
|
|
6803
|
+
var getIndex = _ref.getIndex,
|
|
6804
6804
|
widgetType = _ref.widgetType,
|
|
6805
6805
|
methodName = _ref.methodName,
|
|
6806
6806
|
args = _ref.args,
|
|
@@ -6853,7 +6853,7 @@
|
|
|
6853
6853
|
eventType: eventType,
|
|
6854
6854
|
payload: _objectSpread$2({
|
|
6855
6855
|
eventName: eventName || 'Hits Viewed',
|
|
6856
|
-
index:
|
|
6856
|
+
index: getIndex(),
|
|
6857
6857
|
objectIDs: objectIDsByChunk[i]
|
|
6858
6858
|
}, additionalData),
|
|
6859
6859
|
hits: batch,
|
|
@@ -6868,7 +6868,7 @@
|
|
|
6868
6868
|
eventType: eventType,
|
|
6869
6869
|
payload: _objectSpread$2({
|
|
6870
6870
|
eventName: eventName || 'Hit Clicked',
|
|
6871
|
-
index:
|
|
6871
|
+
index: getIndex(),
|
|
6872
6872
|
queryID: queryID,
|
|
6873
6873
|
objectIDs: objectIDsByChunk[i],
|
|
6874
6874
|
positions: positionsByChunk[i]
|
|
@@ -6885,7 +6885,7 @@
|
|
|
6885
6885
|
eventType: eventType,
|
|
6886
6886
|
payload: _objectSpread$2({
|
|
6887
6887
|
eventName: eventName || 'Hit Converted',
|
|
6888
|
-
index:
|
|
6888
|
+
index: getIndex(),
|
|
6889
6889
|
queryID: queryID,
|
|
6890
6890
|
objectIDs: objectIDsByChunk[i]
|
|
6891
6891
|
}, additionalData),
|
|
@@ -6899,7 +6899,7 @@
|
|
|
6899
6899
|
}
|
|
6900
6900
|
function createSendEventForHits(_ref2) {
|
|
6901
6901
|
var instantSearchInstance = _ref2.instantSearchInstance,
|
|
6902
|
-
|
|
6902
|
+
getIndex = _ref2.getIndex,
|
|
6903
6903
|
widgetType = _ref2.widgetType;
|
|
6904
6904
|
var sentEvents = {};
|
|
6905
6905
|
var timer = undefined;
|
|
@@ -6909,7 +6909,7 @@
|
|
|
6909
6909
|
}
|
|
6910
6910
|
var payloads = _buildEventPayloadsForHits({
|
|
6911
6911
|
widgetType: widgetType,
|
|
6912
|
-
|
|
6912
|
+
getIndex: getIndex,
|
|
6913
6913
|
methodName: 'sendEvent',
|
|
6914
6914
|
args: args,
|
|
6915
6915
|
instantSearchInstance: instantSearchInstance
|
|
@@ -6929,7 +6929,7 @@
|
|
|
6929
6929
|
return sendEventForHits;
|
|
6930
6930
|
}
|
|
6931
6931
|
function createBindEventForHits(_ref3) {
|
|
6932
|
-
var
|
|
6932
|
+
var getIndex = _ref3.getIndex,
|
|
6933
6933
|
widgetType = _ref3.widgetType,
|
|
6934
6934
|
instantSearchInstance = _ref3.instantSearchInstance;
|
|
6935
6935
|
var bindEventForHits = function bindEventForHits() {
|
|
@@ -6938,7 +6938,7 @@
|
|
|
6938
6938
|
}
|
|
6939
6939
|
var payloads = _buildEventPayloadsForHits({
|
|
6940
6940
|
widgetType: widgetType,
|
|
6941
|
-
|
|
6941
|
+
getIndex: getIndex,
|
|
6942
6942
|
methodName: 'bindEvent',
|
|
6943
6943
|
args: args,
|
|
6944
6944
|
instantSearchInstance: instantSearchInstance
|
|
@@ -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
|
}
|
|
@@ -14305,7 +14309,9 @@
|
|
|
14305
14309
|
if (!sendEvent) {
|
|
14306
14310
|
sendEvent = createSendEventForHits({
|
|
14307
14311
|
instantSearchInstance: instantSearchInstance,
|
|
14308
|
-
|
|
14312
|
+
getIndex: function getIndex() {
|
|
14313
|
+
return helper.getIndex();
|
|
14314
|
+
},
|
|
14309
14315
|
widgetType: $$type
|
|
14310
14316
|
});
|
|
14311
14317
|
}
|
|
@@ -14832,13 +14838,17 @@
|
|
|
14832
14838
|
if (!sendEvent) {
|
|
14833
14839
|
sendEvent = createSendEventForHits({
|
|
14834
14840
|
instantSearchInstance: instantSearchInstance,
|
|
14835
|
-
|
|
14841
|
+
getIndex: function getIndex() {
|
|
14842
|
+
return helper.getIndex();
|
|
14843
|
+
},
|
|
14836
14844
|
widgetType: this.$$type
|
|
14837
14845
|
});
|
|
14838
14846
|
}
|
|
14839
14847
|
if (!bindEvent) {
|
|
14840
14848
|
bindEvent = createBindEventForHits({
|
|
14841
|
-
|
|
14849
|
+
getIndex: function getIndex() {
|
|
14850
|
+
return helper.getIndex();
|
|
14851
|
+
},
|
|
14842
14852
|
widgetType: this.$$type,
|
|
14843
14853
|
instantSearchInstance: instantSearchInstance
|
|
14844
14854
|
});
|
|
@@ -15366,11 +15376,15 @@
|
|
|
15366
15376
|
showMore = getShowMore(helper);
|
|
15367
15377
|
sendEvent = createSendEventForHits({
|
|
15368
15378
|
instantSearchInstance: instantSearchInstance,
|
|
15369
|
-
|
|
15379
|
+
getIndex: function getIndex() {
|
|
15380
|
+
return helper.getIndex();
|
|
15381
|
+
},
|
|
15370
15382
|
widgetType: this.$$type
|
|
15371
15383
|
});
|
|
15372
15384
|
bindEvent = createBindEventForHits({
|
|
15373
|
-
|
|
15385
|
+
getIndex: function getIndex() {
|
|
15386
|
+
return helper.getIndex();
|
|
15387
|
+
},
|
|
15374
15388
|
widgetType: this.$$type,
|
|
15375
15389
|
instantSearchInstance: instantSearchInstance
|
|
15376
15390
|
});
|
|
@@ -18990,11 +19004,132 @@
|
|
|
18990
19004
|
return typeof key === "symbol" ? key : String(key);
|
|
18991
19005
|
}
|
|
18992
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
|
+
|
|
18993
19066
|
function cx() {
|
|
18994
19067
|
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18995
19068
|
classNames[_key] = arguments[_key];
|
|
18996
19069
|
}
|
|
18997
|
-
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
|
+
};
|
|
18998
19133
|
}
|
|
18999
19134
|
|
|
19000
19135
|
function isModifierClick(event) {
|
|
@@ -19002,7 +19137,7 @@
|
|
|
19002
19137
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
19003
19138
|
}
|
|
19004
19139
|
|
|
19005
|
-
var _excluded$
|
|
19140
|
+
var _excluded$d = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
19006
19141
|
function Breadcrumb(_ref) {
|
|
19007
19142
|
var _ref$classNames = _ref.classNames,
|
|
19008
19143
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19014,7 +19149,7 @@
|
|
|
19014
19149
|
_ref$separator = _ref.separator,
|
|
19015
19150
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
19016
19151
|
translations = _ref.translations,
|
|
19017
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19152
|
+
props = _objectWithoutProperties$c(_ref, _excluded$d);
|
|
19018
19153
|
var handleClick = function handleClick(value) {
|
|
19019
19154
|
return function (event) {
|
|
19020
19155
|
if (!isModifierClick(event)) {
|
|
@@ -19049,14 +19184,14 @@
|
|
|
19049
19184
|
})));
|
|
19050
19185
|
}
|
|
19051
19186
|
|
|
19052
|
-
var _excluded$
|
|
19187
|
+
var _excluded$e = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
19053
19188
|
function Breadcrumb$1(_ref) {
|
|
19054
19189
|
var attributes = _ref.attributes,
|
|
19055
19190
|
rootPath = _ref.rootPath,
|
|
19056
19191
|
separator = _ref.separator,
|
|
19057
19192
|
transformItems = _ref.transformItems,
|
|
19058
19193
|
translations = _ref.translations,
|
|
19059
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19194
|
+
props = _objectWithoutProperties$c(_ref, _excluded$e);
|
|
19060
19195
|
var _useBreadcrumb = useBreadcrumb({
|
|
19061
19196
|
attributes: attributes,
|
|
19062
19197
|
rootPath: rootPath,
|
|
@@ -19080,7 +19215,7 @@
|
|
|
19080
19215
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
19081
19216
|
}
|
|
19082
19217
|
|
|
19083
|
-
var _excluded$
|
|
19218
|
+
var _excluded$f = ["classNames", "disabled", "onClick", "translations"];
|
|
19084
19219
|
function ClearRefinements(_ref) {
|
|
19085
19220
|
var _ref$classNames = _ref.classNames,
|
|
19086
19221
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19089,7 +19224,7 @@
|
|
|
19089
19224
|
_ref$onClick = _ref.onClick,
|
|
19090
19225
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
19091
19226
|
translations = _ref.translations,
|
|
19092
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19227
|
+
props = _objectWithoutProperties$c(_ref, _excluded$f);
|
|
19093
19228
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19094
19229
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
19095
19230
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -19099,13 +19234,13 @@
|
|
|
19099
19234
|
}, translations.resetButtonText));
|
|
19100
19235
|
}
|
|
19101
19236
|
|
|
19102
|
-
var _excluded$
|
|
19237
|
+
var _excluded$g = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
19103
19238
|
function ClearRefinements$1(_ref) {
|
|
19104
19239
|
var includedAttributes = _ref.includedAttributes,
|
|
19105
19240
|
excludedAttributes = _ref.excludedAttributes,
|
|
19106
19241
|
transformItems = _ref.transformItems,
|
|
19107
19242
|
translations = _ref.translations,
|
|
19108
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19243
|
+
props = _objectWithoutProperties$c(_ref, _excluded$g);
|
|
19109
19244
|
var _useClearRefinements = useClearRefinements({
|
|
19110
19245
|
includedAttributes: includedAttributes,
|
|
19111
19246
|
excludedAttributes: excludedAttributes,
|
|
@@ -19129,7 +19264,7 @@
|
|
|
19129
19264
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
19130
19265
|
}
|
|
19131
19266
|
|
|
19132
|
-
var _excluded$
|
|
19267
|
+
var _excluded$h = ["classNames", "items", "hasRefinements"];
|
|
19133
19268
|
function CurrentRefinements(_ref) {
|
|
19134
19269
|
var _ref$classNames = _ref.classNames,
|
|
19135
19270
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19137,7 +19272,7 @@
|
|
|
19137
19272
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
19138
19273
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
19139
19274
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
19140
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19275
|
+
props = _objectWithoutProperties$c(_ref, _excluded$h);
|
|
19141
19276
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19142
19277
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19143
19278
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -19169,12 +19304,12 @@
|
|
|
19169
19304
|
})));
|
|
19170
19305
|
}
|
|
19171
19306
|
|
|
19172
|
-
var _excluded$
|
|
19307
|
+
var _excluded$i = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
19173
19308
|
function CurrentRefinements$1(_ref) {
|
|
19174
19309
|
var includedAttributes = _ref.includedAttributes,
|
|
19175
19310
|
excludedAttributes = _ref.excludedAttributes,
|
|
19176
19311
|
transformItems = _ref.transformItems,
|
|
19177
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19312
|
+
props = _objectWithoutProperties$c(_ref, _excluded$i);
|
|
19178
19313
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
19179
19314
|
includedAttributes: includedAttributes,
|
|
19180
19315
|
excludedAttributes: excludedAttributes,
|
|
@@ -19191,17 +19326,17 @@
|
|
|
19191
19326
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
19192
19327
|
}
|
|
19193
19328
|
|
|
19194
|
-
var _excluded$
|
|
19329
|
+
var _excluded$j = ["isShowingMore", "translations"];
|
|
19195
19330
|
function ShowMoreButton(_ref) {
|
|
19196
19331
|
var isShowingMore = _ref.isShowingMore,
|
|
19197
19332
|
translations = _ref.translations,
|
|
19198
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19333
|
+
props = _objectWithoutProperties$c(_ref, _excluded$j);
|
|
19199
19334
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
19200
19335
|
isShowingMore: isShowingMore
|
|
19201
19336
|
}));
|
|
19202
19337
|
}
|
|
19203
19338
|
|
|
19204
|
-
var _excluded$
|
|
19339
|
+
var _excluded$k = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
19205
19340
|
function HierarchicalList(_ref) {
|
|
19206
19341
|
var className = _ref.className,
|
|
19207
19342
|
_ref$classNames = _ref.classNames,
|
|
@@ -19253,7 +19388,7 @@
|
|
|
19253
19388
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
19254
19389
|
isShowingMore = _ref2.isShowingMore,
|
|
19255
19390
|
translations = _ref2.translations,
|
|
19256
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
19391
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$k);
|
|
19257
19392
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19258
19393
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19259
19394
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -19270,7 +19405,7 @@
|
|
|
19270
19405
|
}));
|
|
19271
19406
|
}
|
|
19272
19407
|
|
|
19273
|
-
var _excluded$
|
|
19408
|
+
var _excluded$l = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
19274
19409
|
function HierarchicalMenu$1(_ref) {
|
|
19275
19410
|
var attributes = _ref.attributes,
|
|
19276
19411
|
limit = _ref.limit,
|
|
@@ -19282,7 +19417,7 @@
|
|
|
19282
19417
|
sortBy = _ref.sortBy,
|
|
19283
19418
|
transformItems = _ref.transformItems,
|
|
19284
19419
|
translations = _ref.translations,
|
|
19285
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
19420
|
+
props = _objectWithoutProperties$c(_ref, _excluded$l);
|
|
19286
19421
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
19287
19422
|
attributes: attributes,
|
|
19288
19423
|
limit: limit,
|
|
@@ -19322,48 +19457,10 @@
|
|
|
19322
19457
|
}));
|
|
19323
19458
|
}
|
|
19324
19459
|
|
|
19325
|
-
var
|
|
19326
|
-
|
|
19327
|
-
|
|
19328
|
-
|
|
19329
|
-
highlightedTagName = _ref.highlightedTagName,
|
|
19330
|
-
isHighlighted = _ref.isHighlighted,
|
|
19331
|
-
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
19332
|
-
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
19333
|
-
return /*#__PURE__*/React__default.createElement(TagName, {
|
|
19334
|
-
className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
|
|
19335
|
-
}, children);
|
|
19336
|
-
}
|
|
19337
|
-
function InternalHighlight(_ref2) {
|
|
19338
|
-
var parts = _ref2.parts,
|
|
19339
|
-
_ref2$highlightedTagN = _ref2.highlightedTagName,
|
|
19340
|
-
highlightedTagName = _ref2$highlightedTagN === void 0 ? 'mark' : _ref2$highlightedTagN,
|
|
19341
|
-
_ref2$nonHighlightedT = _ref2.nonHighlightedTagName,
|
|
19342
|
-
nonHighlightedTagName = _ref2$nonHighlightedT === void 0 ? 'span' : _ref2$nonHighlightedT,
|
|
19343
|
-
_ref2$separator = _ref2.separator,
|
|
19344
|
-
separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
|
|
19345
|
-
className = _ref2.className,
|
|
19346
|
-
classNames = _ref2.classNames,
|
|
19347
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$l);
|
|
19348
|
-
return /*#__PURE__*/React__default.createElement("span", _extends$1({}, props, {
|
|
19349
|
-
className: cx(classNames.root, className)
|
|
19350
|
-
}), parts.map(function (part, partIndex) {
|
|
19351
|
-
var isLastPart = partIndex === parts.length - 1;
|
|
19352
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
19353
|
-
key: partIndex
|
|
19354
|
-
}, part.map(function (subPart, subPartIndex) {
|
|
19355
|
-
return /*#__PURE__*/React__default.createElement(HighlightPart, {
|
|
19356
|
-
key: subPartIndex,
|
|
19357
|
-
classNames: classNames,
|
|
19358
|
-
highlightedTagName: highlightedTagName,
|
|
19359
|
-
nonHighlightedTagName: nonHighlightedTagName,
|
|
19360
|
-
isHighlighted: subPart.isHighlighted
|
|
19361
|
-
}, subPart.value);
|
|
19362
|
-
}), !isLastPart && /*#__PURE__*/React__default.createElement("span", {
|
|
19363
|
-
className: classNames.separator
|
|
19364
|
-
}, separator));
|
|
19365
|
-
}));
|
|
19366
|
-
}
|
|
19460
|
+
var InternalHighlight = createHighlightComponent({
|
|
19461
|
+
createElement: React.createElement,
|
|
19462
|
+
Fragment: React.Fragment
|
|
19463
|
+
});
|
|
19367
19464
|
|
|
19368
19465
|
var _excluded$m = ["classNames"];
|
|
19369
19466
|
function Highlight(_ref) {
|
|
@@ -20233,9 +20330,7 @@
|
|
|
20233
20330
|
}, /*#__PURE__*/React__default.createElement(ResetIcon, {
|
|
20234
20331
|
classNames: classNames
|
|
20235
20332
|
})), /*#__PURE__*/React__default.createElement("span", {
|
|
20236
|
-
className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator)
|
|
20237
|
-
// @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)
|
|
20238
|
-
,
|
|
20333
|
+
className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),
|
|
20239
20334
|
hidden: !isSearchStalled
|
|
20240
20335
|
}, /*#__PURE__*/React__default.createElement(LoadingIcon, {
|
|
20241
20336
|
classNames: classNames
|