react-instantsearch 7.5.5 → 7.7.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/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/cjs/widgets/Hits.js +41 -10
- 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/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/es/widgets/Hits.d.ts +11 -4
- package/dist/es/widgets/Hits.js +37 -8
- package/dist/umd/ReactInstantSearch.js +224 -109
- 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 +9 -8
- package/dist/cjs/ui/Hits.js +0 -49
- package/dist/cjs/ui/lib/cx.js +0 -12
- package/dist/es/ui/Hits.d.ts +0 -31
- package/dist/es/ui/Hits.js +0 -42
- package/dist/es/ui/lib/cx.d.ts +0 -1
- package/dist/es/ui/lib/cx.js +0 -6
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.RefinementList = RefinementList;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _utils = require("instantsearch.js/cjs/lib/utils");
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _Highlight = require("./Highlight");
|
|
10
|
-
var _cx = require("./lib/cx");
|
|
11
11
|
var _ShowMoreButton = require("./ShowMoreButton");
|
|
12
12
|
var _excluded = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -31,36 +31,36 @@ function RefinementList(_ref) {
|
|
|
31
31
|
translations = _ref.translations,
|
|
32
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
34
|
-
className: (0,
|
|
34
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList', classNames.root, !canRefine && (0, _instantsearchUiComponents.cx)('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
35
35
|
}), searchBox && /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
-
className: (0,
|
|
36
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-searchBox', classNames.searchBox)
|
|
37
37
|
}, searchBox), noResults ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
className: (0,
|
|
38
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-noResults', classNames.noResults)
|
|
39
39
|
}, noResults) : /*#__PURE__*/_react.default.createElement("ul", {
|
|
40
|
-
className: (0,
|
|
40
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-list', classNames.list)
|
|
41
41
|
}, items.map(function (item) {
|
|
42
42
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
43
43
|
key: item.value,
|
|
44
|
-
className: (0,
|
|
44
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-item', classNames.item, item.isRefined && (0, _instantsearchUiComponents.cx)('ais-RefinementList-item--selected', classNames.selectedItem))
|
|
45
45
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
46
|
-
className: (0,
|
|
46
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-label', classNames.label)
|
|
47
47
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
48
48
|
checked: item.isRefined,
|
|
49
|
-
className: (0,
|
|
49
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-checkbox', classNames.checkbox),
|
|
50
50
|
type: "checkbox",
|
|
51
51
|
value: item.value,
|
|
52
52
|
onChange: function onChange() {
|
|
53
53
|
onRefine(item);
|
|
54
54
|
}
|
|
55
55
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
56
|
-
className: (0,
|
|
56
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-labelText', classNames.labelText)
|
|
57
57
|
}, query.length > 0 ? /*#__PURE__*/_react.default.createElement(_Highlight.Highlight, {
|
|
58
58
|
parts: [(0, _utils.getHighlightedParts)((0, _utils.unescape)(item.highlighted || ''))]
|
|
59
59
|
}) : item.label), /*#__PURE__*/_react.default.createElement("span", {
|
|
60
|
-
className: (0,
|
|
60
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-count', classNames.count)
|
|
61
61
|
}, item.count)));
|
|
62
62
|
})), showMore && /*#__PURE__*/_react.default.createElement(_ShowMoreButton.ShowMoreButton, {
|
|
63
|
-
className: (0,
|
|
63
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RefinementList-showMore', classNames.showMore, !canToggleShowMore && (0, _instantsearchUiComponents.cx)('ais-RefinementList-showMore--disabled', classNames.disabledShowMore)),
|
|
64
64
|
disabled: !canToggleShowMore,
|
|
65
65
|
onClick: onToggleShowMore,
|
|
66
66
|
isShowingMore: isShowingMore,
|
package/dist/cjs/ui/SearchBox.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SearchBox = SearchBox;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -17,7 +17,7 @@ var _ref2 = /*#__PURE__*/_react.default.createElement("path", {
|
|
|
17
17
|
function DefaultSubmitIcon(_ref) {
|
|
18
18
|
var classNames = _ref.classNames;
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
20
|
-
className: (0,
|
|
20
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-submitIcon', classNames.submitIcon),
|
|
21
21
|
width: "10",
|
|
22
22
|
height: "10",
|
|
23
23
|
viewBox: "0 0 40 40",
|
|
@@ -30,7 +30,7 @@ var _ref4 = /*#__PURE__*/_react.default.createElement("path", {
|
|
|
30
30
|
function DefaultResetIcon(_ref3) {
|
|
31
31
|
var classNames = _ref3.classNames;
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
33
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-resetIcon', classNames.resetIcon),
|
|
34
34
|
viewBox: "0 0 20 20",
|
|
35
35
|
width: "10",
|
|
36
36
|
height: "10",
|
|
@@ -66,7 +66,7 @@ function DefaultLoadingIcon(_ref5) {
|
|
|
66
66
|
height: "16",
|
|
67
67
|
viewBox: "0 0 38 38",
|
|
68
68
|
stroke: "#444",
|
|
69
|
-
className: (0,
|
|
69
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-loadingIcon', classNames.loadingIcon),
|
|
70
70
|
"aria-hidden": "true"
|
|
71
71
|
}, _ref6);
|
|
72
72
|
}
|
|
@@ -110,18 +110,18 @@ function SearchBox(_ref7) {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
113
|
-
className: (0,
|
|
113
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox', classNames.root, props.className)
|
|
114
114
|
}), /*#__PURE__*/_react.default.createElement("form", {
|
|
115
115
|
ref: formRef,
|
|
116
116
|
action: "",
|
|
117
|
-
className: (0,
|
|
117
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-form', classNames.form),
|
|
118
118
|
noValidate: true,
|
|
119
119
|
onSubmit: handleSubmit,
|
|
120
120
|
onReset: handleReset,
|
|
121
121
|
role: "search"
|
|
122
122
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
123
123
|
ref: inputRef,
|
|
124
|
-
className: (0,
|
|
124
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-input', classNames.input),
|
|
125
125
|
"aria-label": "Search",
|
|
126
126
|
autoComplete: "off",
|
|
127
127
|
autoCorrect: "off",
|
|
@@ -135,22 +135,20 @@ function SearchBox(_ref7) {
|
|
|
135
135
|
onCompositionEnd: onChange,
|
|
136
136
|
autoFocus: autoFocus
|
|
137
137
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
138
|
-
className: (0,
|
|
138
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-submit', classNames.submit),
|
|
139
139
|
type: "submit",
|
|
140
140
|
title: translations.submitButtonTitle
|
|
141
141
|
}, /*#__PURE__*/_react.default.createElement(SubmitIcon, {
|
|
142
142
|
classNames: classNames
|
|
143
143
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
144
|
-
className: (0,
|
|
144
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-reset', classNames.reset),
|
|
145
145
|
type: "reset",
|
|
146
146
|
title: translations.resetButtonTitle,
|
|
147
147
|
hidden: value.length === 0 || isSearchStalled
|
|
148
148
|
}, /*#__PURE__*/_react.default.createElement(ResetIcon, {
|
|
149
149
|
classNames: classNames
|
|
150
150
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
151
|
-
className: (0,
|
|
152
|
-
// @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)
|
|
153
|
-
,
|
|
151
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),
|
|
154
152
|
hidden: !isSearchStalled
|
|
155
153
|
}, /*#__PURE__*/_react.default.createElement(LoadingIcon, {
|
|
156
154
|
classNames: classNames
|
package/dist/cjs/ui/Snippet.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Snippet = Snippet;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _InternalHighlight = require("./InternalHighlight");
|
|
9
|
-
var _cx = require("./lib/cx");
|
|
10
10
|
var _excluded = ["classNames"];
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
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); }
|
|
@@ -18,10 +18,10 @@ function Snippet(_ref) {
|
|
|
18
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_InternalHighlight.InternalHighlight, _extends({
|
|
20
20
|
classNames: {
|
|
21
|
-
root: (0,
|
|
22
|
-
highlighted: (0,
|
|
23
|
-
nonHighlighted: (0,
|
|
24
|
-
separator: (0,
|
|
21
|
+
root: (0, _instantsearchUiComponents.cx)('ais-Snippet', classNames.root),
|
|
22
|
+
highlighted: (0, _instantsearchUiComponents.cx)('ais-Snippet-highlighted', classNames.highlighted),
|
|
23
|
+
nonHighlighted: (0, _instantsearchUiComponents.cx)('ais-Snippet-nonHighlighted', classNames.nonHighlighted),
|
|
24
|
+
separator: (0, _instantsearchUiComponents.cx)('ais-Snippet-separator', classNames.separator)
|
|
25
25
|
}
|
|
26
26
|
}, props));
|
|
27
27
|
}
|
package/dist/cjs/ui/SortBy.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SortBy = SortBy;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["items", "value", "onChange", "classNames"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -20,9 +20,9 @@ function SortBy(_ref) {
|
|
|
20
20
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
23
|
-
className: (0,
|
|
23
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SortBy', classNames.root, props.className)
|
|
24
24
|
}), /*#__PURE__*/_react.default.createElement("select", {
|
|
25
|
-
className: (0,
|
|
25
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SortBy-select', classNames.select),
|
|
26
26
|
onChange: function onChange(event) {
|
|
27
27
|
return _onChange(event.target.value);
|
|
28
28
|
},
|
|
@@ -30,7 +30,7 @@ function SortBy(_ref) {
|
|
|
30
30
|
"aria-label": "Sort results by"
|
|
31
31
|
}, items.map(function (item) {
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("option", {
|
|
33
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-SortBy-option', classNames.option),
|
|
34
34
|
key: item.value,
|
|
35
35
|
value: item.value
|
|
36
36
|
}, item.label);
|
package/dist/cjs/ui/Stats.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Stats = Stats;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -27,7 +27,7 @@ function Stats(_ref) {
|
|
|
27
27
|
areHitsSorted: areHitsSorted
|
|
28
28
|
};
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
30
|
-
className: (0,
|
|
30
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Stats', classNames.root, props.className)
|
|
31
31
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
32
32
|
className: "ais-Stats-text"
|
|
33
33
|
}, translations.rootElementText(translationOptions)));
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ToggleRefinement = ToggleRefinement;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["classNames", "checked", "onChange", "label"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -19,17 +19,17 @@ function ToggleRefinement(_ref) {
|
|
|
19
19
|
label = _ref.label,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
22
|
-
className: (0,
|
|
22
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ToggleRefinement', classNames.root, props.className)
|
|
23
23
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
24
|
-
className: (0,
|
|
24
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ToggleRefinement-label', classNames.label)
|
|
25
25
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
26
|
-
className: (0,
|
|
26
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ToggleRefinement-checkbox', classNames.checkbox),
|
|
27
27
|
type: "checkbox",
|
|
28
28
|
checked: checked,
|
|
29
29
|
onChange: function onChange(event) {
|
|
30
30
|
_onChange(event.target.checked);
|
|
31
31
|
}
|
|
32
32
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
33
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ToggleRefinement-labelText', classNames.labelText)
|
|
34
34
|
}, label)));
|
|
35
35
|
}
|
package/dist/cjs/ui/lib/index.js
CHANGED
|
@@ -14,17 +14,6 @@ Object.keys(_capitalize).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _cx = require("./cx");
|
|
18
|
-
Object.keys(_cx).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _cx[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _cx[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
17
|
var _isModifierClick = require("./isModifierClick");
|
|
29
18
|
Object.keys(_isModifierClick).forEach(function (key) {
|
|
30
19
|
if (key === "default" || key === "__esModule") return;
|
package/dist/cjs/widgets/Hits.js
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.Hits = Hits;
|
|
7
|
-
var
|
|
8
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
10
|
var _reactInstantsearchCore = require("react-instantsearch-core");
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
function
|
|
11
|
+
var _excluded = ["escapeHTML", "transformItems", "hitComponent"],
|
|
12
|
+
_excluded2 = ["hit", "index"];
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
15
|
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); }
|
|
13
16
|
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; }
|
|
14
17
|
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; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
// @MAJOR: Move default hit component back to the UI library
|
|
19
|
+
// once flavour specificities are erased
|
|
20
|
+
function DefaultHitComponent(_ref) {
|
|
21
|
+
var hit = _ref.hit;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
style: {
|
|
24
|
+
wordBreak: 'break-all'
|
|
25
|
+
}
|
|
26
|
+
}, JSON.stringify(hit).slice(0, 100), "\u2026");
|
|
27
|
+
}
|
|
28
|
+
var HitsUiComponent = (0, _instantsearchUiComponents.createHitsComponent)({
|
|
29
|
+
createElement: _react.createElement,
|
|
30
|
+
Fragment: _react.Fragment
|
|
31
|
+
});
|
|
32
|
+
function Hits(_ref2) {
|
|
33
|
+
var escapeHTML = _ref2.escapeHTML,
|
|
34
|
+
transformItems = _ref2.transformItems,
|
|
35
|
+
_ref2$hitComponent = _ref2.hitComponent,
|
|
36
|
+
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
37
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
19
38
|
var _useHits = (0, _reactInstantsearchCore.useHits)({
|
|
20
39
|
escapeHTML: escapeHTML,
|
|
21
40
|
transformItems: transformItems
|
|
@@ -24,9 +43,21 @@ function Hits(_ref) {
|
|
|
24
43
|
}),
|
|
25
44
|
hits = _useHits.hits,
|
|
26
45
|
sendEvent = _useHits.sendEvent;
|
|
46
|
+
var itemComponent = function itemComponent(_ref3) {
|
|
47
|
+
var hit = _ref3.hit,
|
|
48
|
+
index = _ref3.index,
|
|
49
|
+
itemProps = _objectWithoutProperties(_ref3, _excluded2);
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement("li", _extends({
|
|
51
|
+
key: hit.objectID
|
|
52
|
+
}, itemProps), /*#__PURE__*/_react.default.createElement(HitComponent, {
|
|
53
|
+
hit: hit,
|
|
54
|
+
sendEvent: sendEvent
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
27
57
|
var uiProps = {
|
|
28
58
|
hits: hits,
|
|
29
|
-
sendEvent: sendEvent
|
|
59
|
+
sendEvent: sendEvent,
|
|
60
|
+
itemComponent: itemComponent
|
|
30
61
|
};
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(HitsUiComponent, _extends({}, props, uiProps));
|
|
32
63
|
}
|
package/dist/es/ui/Breadcrumb.js
CHANGED
|
@@ -2,8 +2,8 @@ var _excluded = ["classNames", "items", "hasItems", "createURL", "onNavigate", "
|
|
|
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
|
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
8
8
|
export function Breadcrumb(_ref) {
|
|
9
9
|
var _ref$classNames = _ref.classNames,
|
|
@@ -2,8 +2,8 @@ var _excluded = ["classNames", "disabled", "onClick", "translations"];
|
|
|
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 ClearRefinements(_ref) {
|
|
8
8
|
var _ref$classNames = _ref.classNames,
|
|
9
9
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -2,8 +2,9 @@ var _excluded = ["classNames", "items", "hasRefinements"];
|
|
|
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 { capitalize,
|
|
7
|
+
import { capitalize, isModifierClick } from "./lib/index.js";
|
|
7
8
|
export function CurrentRefinements(_ref) {
|
|
8
9
|
var _ref$classNames = _ref.classNames,
|
|
9
10
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -2,8 +2,8 @@ var _excluded = ["classNames", "items", "hasItems", "onNavigate", "createURL", "
|
|
|
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
|
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
8
8
|
import { ShowMoreButton } from "./ShowMoreButton.js";
|
|
9
9
|
function HierarchicalList(_ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InternalHighlightProps, InternalHighlightClassNames } from '
|
|
1
|
+
import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from 'instantsearch-ui-components';
|
|
2
2
|
export type HighlightClassNames = InternalHighlightClassNames;
|
|
3
3
|
export type HighlightProps = Omit<InternalHighlightProps, 'classNames'> & {
|
|
4
4
|
classNames?: Partial<HighlightClassNames>;
|
package/dist/es/ui/Highlight.js
CHANGED
|
@@ -2,9 +2,9 @@ var _excluded = ["classNames"];
|
|
|
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
7
|
import { InternalHighlight } from "./InternalHighlight.js";
|
|
7
|
-
import { cx } from "./lib/cx.js";
|
|
8
8
|
export function Highlight(_ref) {
|
|
9
9
|
var _ref$classNames = _ref.classNames,
|
|
10
10
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -2,8 +2,8 @@ var _excluded = ["items", "onChange", "currentValue", "classNames"];
|
|
|
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 HitsPerPage(_ref) {
|
|
8
8
|
var items = _ref.items,
|
|
9
9
|
_onChange = _ref.onChange,
|
|
@@ -2,8 +2,8 @@ var _excluded = ["hitComponent", "hits", "sendEvent", "isFirstPage", "isLastPage
|
|
|
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
|
function DefaultHitComponent(_ref) {
|
|
8
8
|
var hit = _ref.hit;
|
|
9
9
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
type HighlightedPart = {
|
|
3
|
-
isHighlighted: boolean;
|
|
4
|
-
value: string;
|
|
5
|
-
};
|
|
6
|
-
export type InternalHighlightClassNames = {
|
|
7
|
-
/**
|
|
8
|
-
* Class names to apply to the root element
|
|
9
|
-
*/
|
|
10
|
-
root: string;
|
|
11
|
-
/**
|
|
12
|
-
* Class names to apply to the highlighted parts
|
|
13
|
-
*/
|
|
14
|
-
highlighted: string;
|
|
15
|
-
/**
|
|
16
|
-
* Class names to apply to the non-highlighted parts
|
|
17
|
-
*/
|
|
18
|
-
nonHighlighted: string;
|
|
19
|
-
/**
|
|
20
|
-
* Class names to apply to the separator between highlighted parts
|
|
21
|
-
*/
|
|
22
|
-
separator: string;
|
|
23
|
-
};
|
|
24
|
-
export type InternalHighlightProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
25
|
-
classNames: InternalHighlightClassNames;
|
|
26
|
-
highlightedTagName?: React.ElementType;
|
|
27
|
-
nonHighlightedTagName?: React.ElementType;
|
|
28
|
-
separator?: React.ReactNode;
|
|
29
|
-
parts: HighlightedPart[][];
|
|
30
|
-
};
|
|
31
|
-
export declare function InternalHighlight({ parts, highlightedTagName, nonHighlightedTagName, separator, className, classNames, ...props }: InternalHighlightProps): JSX.Element;
|
|
32
|
-
export {};
|
|
1
|
+
export declare const InternalHighlight: (userProps: import("instantsearch-ui-components").HighlightProps) => JSX.Element;
|
|
@@ -1,47 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function HighlightPart(_ref) {
|
|
8
|
-
var classNames = _ref.classNames,
|
|
9
|
-
children = _ref.children,
|
|
10
|
-
highlightedTagName = _ref.highlightedTagName,
|
|
11
|
-
isHighlighted = _ref.isHighlighted,
|
|
12
|
-
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
13
|
-
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
14
|
-
return /*#__PURE__*/React.createElement(TagName, {
|
|
15
|
-
className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
|
|
16
|
-
}, children);
|
|
17
|
-
}
|
|
18
|
-
export function InternalHighlight(_ref2) {
|
|
19
|
-
var parts = _ref2.parts,
|
|
20
|
-
_ref2$highlightedTagN = _ref2.highlightedTagName,
|
|
21
|
-
highlightedTagName = _ref2$highlightedTagN === void 0 ? 'mark' : _ref2$highlightedTagN,
|
|
22
|
-
_ref2$nonHighlightedT = _ref2.nonHighlightedTagName,
|
|
23
|
-
nonHighlightedTagName = _ref2$nonHighlightedT === void 0 ? 'span' : _ref2$nonHighlightedT,
|
|
24
|
-
_ref2$separator = _ref2.separator,
|
|
25
|
-
separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
|
|
26
|
-
className = _ref2.className,
|
|
27
|
-
classNames = _ref2.classNames,
|
|
28
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
29
|
-
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
30
|
-
className: cx(classNames.root, className)
|
|
31
|
-
}), parts.map(function (part, partIndex) {
|
|
32
|
-
var isLastPart = partIndex === parts.length - 1;
|
|
33
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
34
|
-
key: partIndex
|
|
35
|
-
}, part.map(function (subPart, subPartIndex) {
|
|
36
|
-
return /*#__PURE__*/React.createElement(HighlightPart, {
|
|
37
|
-
key: subPartIndex,
|
|
38
|
-
classNames: classNames,
|
|
39
|
-
highlightedTagName: highlightedTagName,
|
|
40
|
-
nonHighlightedTagName: nonHighlightedTagName,
|
|
41
|
-
isHighlighted: subPart.isHighlighted
|
|
42
|
-
}, subPart.value);
|
|
43
|
-
}), !isLastPart && /*#__PURE__*/React.createElement("span", {
|
|
44
|
-
className: classNames.separator
|
|
45
|
-
}, separator));
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
1
|
+
import { createHighlightComponent } from 'instantsearch-ui-components';
|
|
2
|
+
import { createElement, Fragment } from 'react';
|
|
3
|
+
export var InternalHighlight = createHighlightComponent({
|
|
4
|
+
createElement: createElement,
|
|
5
|
+
Fragment: Fragment
|
|
6
|
+
});
|
package/dist/es/ui/Menu.js
CHANGED
|
@@ -2,8 +2,8 @@ var _excluded = ["items", "classNames", "showMore", "canToggleShowMore", "onTogg
|
|
|
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
|
import { ShowMoreButton } from "./ShowMoreButton.js";
|
|
8
8
|
export function Menu(_ref) {
|
|
9
9
|
var items = _ref.items,
|
package/dist/es/ui/Pagination.js
CHANGED
|
@@ -3,8 +3,8 @@ var _excluded = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage",
|
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
+
import { cx } from 'instantsearch-ui-components';
|
|
6
7
|
import React from 'react';
|
|
7
|
-
import { cx } from "./lib/cx.js";
|
|
8
8
|
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
9
9
|
export function Pagination(_ref) {
|
|
10
10
|
var pages = _ref.pages,
|
package/dist/es/ui/PoweredBy.js
CHANGED
|
@@ -2,8 +2,8 @@ var _excluded = ["classNames", "url", "theme"];
|
|
|
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 PoweredBy(_ref) {
|
|
8
8
|
var _ref$classNames = _ref.classNames,
|
|
9
9
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
package/dist/es/ui/RangeInput.js
CHANGED
|
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
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; }
|
|
9
9
|
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { cx } from 'instantsearch-ui-components';
|
|
11
12
|
import React, { useState } from 'react';
|
|
12
|
-
import { cx } from "./lib/cx.js";
|
|
13
13
|
// if the default value is undefined, React considers the component uncontrolled initially, which we don't want 0 or NaN as the default value
|
|
14
14
|
var unsetNumberInputValue = '';
|
|
15
15
|
|
|
@@ -2,10 +2,10 @@ var _excluded = ["canRefine", "items", "onRefine", "query", "searchBox", "noResu
|
|
|
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 { getHighlightedParts, unescape } from "instantsearch.js/es/lib/utils/index.js";
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { Highlight } from "./Highlight.js";
|
|
8
|
-
import { cx } from "./lib/cx.js";
|
|
9
9
|
import { ShowMoreButton } from "./ShowMoreButton.js";
|
|
10
10
|
export function RefinementList(_ref) {
|
|
11
11
|
var canRefine = _ref.canRefine,
|