react-instantsearch 7.34.0 → 7.35.1
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/widgets/Chat.js +5 -2
- package/dist/cjs/widgets/chat/tools/DisplayResultsTool.js +2 -1
- package/dist/cjs/widgets/chat/tools/SearchIndexTool.js +1 -1
- package/dist/es/widgets/Chat.js +5 -2
- package/dist/es/widgets/chat/tools/DisplayResultsTool.js +3 -2
- package/dist/es/widgets/chat/tools/SearchIndexTool.js +2 -2
- package/dist/umd/ReactInstantSearch.js +371 -62
- package/dist/umd/ReactInstantSearch.min.js +3 -3
- package/package.json +5 -5
package/dist/cjs/widgets/Chat.js
CHANGED
|
@@ -167,13 +167,14 @@ function ChatInner(_0, _1) {
|
|
|
167
167
|
maximizeIconComponent: headerMaximizeIconComponent,
|
|
168
168
|
translations: headerTranslations
|
|
169
169
|
}, headerProps),
|
|
170
|
-
messagesProps: _object_spread._({
|
|
170
|
+
messagesProps: _object_spread_props._(_object_spread._({
|
|
171
171
|
status: status,
|
|
172
172
|
onReload: function onReload(messageId) {
|
|
173
173
|
return regenerate({
|
|
174
174
|
messageId: messageId
|
|
175
175
|
});
|
|
176
176
|
},
|
|
177
|
+
onNewConversation: clearMessages,
|
|
177
178
|
onClose: function onClose() {
|
|
178
179
|
return setOpen(false);
|
|
179
180
|
},
|
|
@@ -205,7 +206,9 @@ function ChatInner(_0, _1) {
|
|
|
205
206
|
}, messagesProps === null || messagesProps === void 0 ? void 0 : messagesProps.userMessageProps),
|
|
206
207
|
translations: messagesTranslations,
|
|
207
208
|
messageTranslations: messageTranslations
|
|
208
|
-
}, messagesProps),
|
|
209
|
+
}, messagesProps), {
|
|
210
|
+
error: error
|
|
211
|
+
}),
|
|
209
212
|
promptProps: _object_spread._({
|
|
210
213
|
promptRef: promptRef,
|
|
211
214
|
status: status,
|
|
@@ -16,7 +16,8 @@ var _components = require("../../../components");
|
|
|
16
16
|
function createDisplayResultsTool(itemComponent) {
|
|
17
17
|
var DisplayResultsUIComponent = (0, _instantsearchuicomponents.createDisplayResultsToolComponent)({
|
|
18
18
|
createElement: _react.createElement,
|
|
19
|
-
Fragment: _react.Fragment
|
|
19
|
+
Fragment: _react.Fragment,
|
|
20
|
+
useMemo: _react.useMemo
|
|
20
21
|
});
|
|
21
22
|
var Button = (0, _instantsearchuicomponents.createButtonComponent)({
|
|
22
23
|
createElement: _react.createElement
|
|
@@ -70,7 +70,7 @@ function createCarouselTool(showViewAll, itemComponent, getSearchPageURL) {
|
|
|
70
70
|
if (!input || !applyFilters) return;
|
|
71
71
|
var params = applyFilters({
|
|
72
72
|
query: input.query,
|
|
73
|
-
facetFilters: input
|
|
73
|
+
facetFilters: (0, _instantsearchuicomponents.getFacetFiltersFromToolInput)(input)
|
|
74
74
|
});
|
|
75
75
|
if (getSearchPageURL && new URL(getSearchPageURL(params)).pathname !== window.location.pathname) {
|
|
76
76
|
window.location.href = getSearchPageURL(params);
|
package/dist/es/widgets/Chat.js
CHANGED
|
@@ -131,13 +131,14 @@ function ChatInner(_0, _1) {
|
|
|
131
131
|
maximizeIconComponent: headerMaximizeIconComponent,
|
|
132
132
|
translations: headerTranslations
|
|
133
133
|
}, headerProps),
|
|
134
|
-
messagesProps: _$4({
|
|
134
|
+
messagesProps: _$5(_$4({
|
|
135
135
|
status: status,
|
|
136
136
|
onReload: function onReload(messageId) {
|
|
137
137
|
return regenerate({
|
|
138
138
|
messageId: messageId
|
|
139
139
|
});
|
|
140
140
|
},
|
|
141
|
+
onNewConversation: clearMessages,
|
|
141
142
|
onClose: function onClose() {
|
|
142
143
|
return setOpen(false);
|
|
143
144
|
},
|
|
@@ -169,7 +170,9 @@ function ChatInner(_0, _1) {
|
|
|
169
170
|
}, messagesProps === null || messagesProps === void 0 ? void 0 : messagesProps.userMessageProps),
|
|
170
171
|
translations: messagesTranslations,
|
|
171
172
|
messageTranslations: messageTranslations
|
|
172
|
-
}, messagesProps),
|
|
173
|
+
}, messagesProps), {
|
|
174
|
+
error: error
|
|
175
|
+
}),
|
|
173
176
|
promptProps: _$4({
|
|
174
177
|
promptRef: promptRef,
|
|
175
178
|
status: status,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createDisplayResultsToolComponent, createButtonComponent, ChevronLeftIcon, ChevronRightIcon } from 'instantsearch-ui-components';
|
|
2
|
-
import React, { createElement, Fragment } from 'react';
|
|
2
|
+
import React, { createElement, Fragment, useMemo } from 'react';
|
|
3
3
|
import { Carousel } from '../../../components/Carousel.js';
|
|
4
4
|
|
|
5
5
|
function createDisplayResultsTool(itemComponent) {
|
|
6
6
|
var DisplayResultsUIComponent = createDisplayResultsToolComponent({
|
|
7
7
|
createElement: createElement,
|
|
8
|
-
Fragment: Fragment
|
|
8
|
+
Fragment: Fragment,
|
|
9
|
+
useMemo: useMemo
|
|
9
10
|
});
|
|
10
11
|
var Button = createButtonComponent({
|
|
11
12
|
createElement: createElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ } from '@swc/helpers/esm/_object_spread.js';
|
|
2
|
-
import { createButtonComponent, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon } from 'instantsearch-ui-components';
|
|
2
|
+
import { createButtonComponent, getFacetFiltersFromToolInput, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon } from 'instantsearch-ui-components';
|
|
3
3
|
import { addAbsolutePosition, addQueryID } from 'instantsearch.js/es/lib/utils/index.js';
|
|
4
4
|
import React, { createElement } from 'react';
|
|
5
5
|
import { Carousel } from '../../../components/Carousel.js';
|
|
@@ -59,7 +59,7 @@ function createCarouselTool(showViewAll, itemComponent, getSearchPageURL) {
|
|
|
59
59
|
if (!input || !applyFilters) return;
|
|
60
60
|
var params = applyFilters({
|
|
61
61
|
query: input.query,
|
|
62
|
-
facetFilters: input
|
|
62
|
+
facetFilters: getFacetFiltersFromToolInput(input)
|
|
63
63
|
});
|
|
64
64
|
if (getSearchPageURL && new URL(getSearchPageURL(params)).pathname !== window.location.pathname) {
|
|
65
65
|
window.location.href = getSearchPageURL(params);
|