react-instantsearch-core 6.25.0 → 6.28.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/connectors/connectAutoComplete.js +1 -0
- package/dist/cjs/connectors/connectBreadcrumb.js +1 -0
- package/dist/cjs/connectors/connectConfigure.js +1 -0
- package/dist/cjs/connectors/connectConfigureRelatedItems.js +1 -0
- package/dist/cjs/connectors/connectCurrentRefinements.js +1 -0
- package/dist/cjs/connectors/connectDynamicWidgets.js +1 -0
- package/dist/cjs/connectors/connectGeoSearch.js +1 -0
- package/dist/cjs/connectors/connectHierarchicalMenu.js +1 -0
- package/dist/cjs/connectors/connectHighlight.js +1 -0
- package/dist/cjs/connectors/connectHitInsights.js +1 -0
- package/dist/cjs/connectors/connectHits.js +1 -0
- package/dist/cjs/connectors/connectHitsPerPage.js +1 -0
- package/dist/cjs/connectors/connectInfiniteHits.js +1 -0
- package/dist/cjs/connectors/connectMenu.js +1 -0
- package/dist/cjs/connectors/connectNumericMenu.js +1 -0
- package/dist/cjs/connectors/connectPagination.js +1 -0
- package/dist/cjs/connectors/connectPoweredBy.js +1 -0
- package/dist/cjs/connectors/connectQueryRules.js +1 -0
- package/dist/cjs/connectors/connectRange.js +1 -0
- package/dist/cjs/connectors/connectRefinementList.js +1 -0
- package/dist/cjs/connectors/connectRelevantSort.js +1 -0
- package/dist/cjs/connectors/connectScrollTo.js +1 -0
- package/dist/cjs/connectors/connectSearchBox.js +1 -0
- package/dist/cjs/connectors/connectSortBy.js +1 -0
- package/dist/cjs/connectors/connectStateResults.js +1 -0
- package/dist/cjs/connectors/connectStats.js +1 -0
- package/dist/cjs/connectors/connectToggleRefinement.js +1 -0
- package/dist/cjs/connectors/connectVoiceSearch.js +1 -0
- package/dist/cjs/core/createConnector.js +6 -2
- package/dist/cjs/core/metadata.js +2 -0
- package/dist/cjs/core/version.js +1 -1
- package/dist/cjs/widgets/Configure.js +2 -0
- package/dist/cjs/widgets/ConfigureRelatedItems.js +3 -1
- package/dist/cjs/widgets/DynamicWidgets.js +15 -9
- package/dist/cjs/widgets/Index.js +2 -0
- package/dist/cjs/widgets/QueryRuleContext.js +2 -0
- package/dist/es/connectors/connectAutoComplete.js +1 -0
- package/dist/es/connectors/connectBreadcrumb.js +1 -0
- package/dist/es/connectors/connectConfigure.js +1 -0
- package/dist/es/connectors/connectConfigureRelatedItems.js +1 -0
- package/dist/es/connectors/connectCurrentRefinements.js +1 -0
- package/dist/es/connectors/connectDynamicWidgets.js +1 -0
- package/dist/es/connectors/connectGeoSearch.js +1 -0
- package/dist/es/connectors/connectHierarchicalMenu.js +1 -0
- package/dist/es/connectors/connectHighlight.js +1 -0
- package/dist/es/connectors/connectHitInsights.js +1 -0
- package/dist/es/connectors/connectHits.js +1 -0
- package/dist/es/connectors/connectHitsPerPage.js +1 -0
- package/dist/es/connectors/connectInfiniteHits.js +1 -0
- package/dist/es/connectors/connectMenu.js +1 -0
- package/dist/es/connectors/connectNumericMenu.js +1 -0
- package/dist/es/connectors/connectPagination.js +1 -0
- package/dist/es/connectors/connectPoweredBy.js +1 -0
- package/dist/es/connectors/connectQueryRules.js +1 -0
- package/dist/es/connectors/connectRange.js +1 -0
- package/dist/es/connectors/connectRefinementList.js +1 -0
- package/dist/es/connectors/connectRelevantSort.js +1 -0
- package/dist/es/connectors/connectScrollTo.js +1 -0
- package/dist/es/connectors/connectSearchBox.js +1 -0
- package/dist/es/connectors/connectSortBy.js +1 -0
- package/dist/es/connectors/connectStateResults.js +1 -0
- package/dist/es/connectors/connectStats.js +1 -0
- package/dist/es/connectors/connectToggleRefinement.js +1 -0
- package/dist/es/connectors/connectVoiceSearch.js +1 -0
- package/dist/es/core/createConnector.js +8 -2
- package/dist/es/core/metadata.js +2 -0
- package/dist/es/core/version.js +1 -1
- package/dist/es/widgets/Configure.js +2 -0
- package/dist/es/widgets/ConfigureRelatedItems.js +3 -1
- package/dist/es/widgets/DynamicWidgets.js +15 -9
- package/dist/es/widgets/Index.js +4 -0
- package/dist/es/widgets/QueryRuleContext.js +2 -0
- package/dist/umd/ReactInstantSearchCore.js +76 -20
- package/dist/umd/ReactInstantSearchCore.js.map +1 -1
- package/dist/umd/ReactInstantSearchCore.min.js +2 -2
- package/dist/umd/ReactInstantSearchCore.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -78,6 +78,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
78
78
|
|
|
79
79
|
var _default = (0, _createConnector.default)({
|
|
80
80
|
displayName: 'AlgoliaAutoComplete',
|
|
81
|
+
$$type: 'ais.autoComplete',
|
|
81
82
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
82
83
|
return {
|
|
83
84
|
hits: getHits(searchResults),
|
|
@@ -87,6 +87,7 @@ function transformValue(values) {
|
|
|
87
87
|
|
|
88
88
|
var _default = (0, _createConnector.default)({
|
|
89
89
|
displayName: 'AlgoliaBreadcrumb',
|
|
90
|
+
$$type: 'ais.breadcrumb',
|
|
90
91
|
propTypes: {
|
|
91
92
|
attributes: function attributes(props, propName, componentName) {
|
|
92
93
|
var isNotString = function isNotString(val) {
|
|
@@ -84,6 +84,7 @@ function getSearchParametersFromProps(props) {
|
|
|
84
84
|
|
|
85
85
|
var _default = (0, _createConnector.default)({
|
|
86
86
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
87
|
+
$$type: 'ais.configureRelatedItems',
|
|
87
88
|
defaultProps: defaultProps,
|
|
88
89
|
getProvidedProps: function getProvidedProps() {
|
|
89
90
|
return {};
|
|
@@ -31,6 +31,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
31
31
|
*/
|
|
32
32
|
var _default = (0, _createConnector.default)({
|
|
33
33
|
displayName: 'AlgoliaCurrentRefinements',
|
|
34
|
+
$$type: 'ais.currentRefinements',
|
|
34
35
|
propTypes: {
|
|
35
36
|
transformItems: _propTypes.default.func
|
|
36
37
|
},
|
|
@@ -119,6 +119,7 @@ var _refine = function refine(searchState, nextValue, context) {
|
|
|
119
119
|
|
|
120
120
|
var _default = (0, _createConnector.default)({
|
|
121
121
|
displayName: 'AlgoliaGeoSearch',
|
|
122
|
+
$$type: 'ais.geoSearch',
|
|
122
123
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
123
124
|
var context = {
|
|
124
125
|
ais: props.contextValue,
|
|
@@ -150,6 +150,7 @@ var sortBy = ['name:asc'];
|
|
|
150
150
|
|
|
151
151
|
var _default = (0, _createConnector.default)({
|
|
152
152
|
displayName: 'AlgoliaHierarchicalMenu',
|
|
153
|
+
$$type: 'ais.hierarchicalMenu',
|
|
153
154
|
propTypes: {
|
|
154
155
|
attributes: function attributes(props, propName, componentName) {
|
|
155
156
|
var isNotString = function isNotString(val) {
|
|
@@ -71,6 +71,7 @@ var wrapInsightsClient = function wrapInsightsClient(aa, results, currentHit) {
|
|
|
71
71
|
var _default = function _default(insightsClient) {
|
|
72
72
|
return (0, _createConnector.default)({
|
|
73
73
|
displayName: 'AlgoliaInsights',
|
|
74
|
+
$$type: 'ais.insights',
|
|
74
75
|
getProvidedProps: function getProvidedProps(props, _, searchResults) {
|
|
75
76
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
76
77
|
ais: props.contextValue,
|
|
@@ -58,6 +58,7 @@ var _utils = require("../core/utils");
|
|
|
58
58
|
*/
|
|
59
59
|
var _default = (0, _createConnector.default)({
|
|
60
60
|
displayName: 'AlgoliaHits',
|
|
61
|
+
$$type: 'ais.hits',
|
|
61
62
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
62
63
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
63
64
|
ais: props.contextValue,
|
|
@@ -50,6 +50,7 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
50
50
|
|
|
51
51
|
var _default = (0, _createConnector.default)({
|
|
52
52
|
displayName: 'AlgoliaHitsPerPage',
|
|
53
|
+
$$type: 'ais.hitsPerPage',
|
|
53
54
|
propTypes: {
|
|
54
55
|
defaultRefinement: _propTypes.default.number.isRequired,
|
|
55
56
|
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -85,6 +85,7 @@ function extractHitsFromCachedHits(cachedHits) {
|
|
|
85
85
|
|
|
86
86
|
var _default = (0, _createConnector.default)({
|
|
87
87
|
displayName: 'AlgoliaInfiniteHits',
|
|
88
|
+
$$type: 'ais.infiniteHits',
|
|
88
89
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
89
90
|
var _this = this;
|
|
90
91
|
|
|
@@ -109,6 +109,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
109
109
|
|
|
110
110
|
var _default = (0, _createConnector.default)({
|
|
111
111
|
displayName: 'AlgoliaNumericMenu',
|
|
112
|
+
$$type: 'ais.numericMenu',
|
|
112
113
|
propTypes: {
|
|
113
114
|
id: _propTypes.default.string,
|
|
114
115
|
attribute: _propTypes.default.string.isRequired,
|
|
@@ -55,6 +55,7 @@ function _refine(props, searchState, nextPage, context) {
|
|
|
55
55
|
|
|
56
56
|
var _default = (0, _createConnector.default)({
|
|
57
57
|
displayName: 'AlgoliaPagination',
|
|
58
|
+
$$type: 'ais.pagination',
|
|
58
59
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
59
60
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
60
61
|
ais: props.contextValue,
|
|
@@ -18,6 +18,7 @@ var _createConnector = _interopRequireDefault(require("../core/createConnector")
|
|
|
18
18
|
*/
|
|
19
19
|
var _default = (0, _createConnector.default)({
|
|
20
20
|
displayName: 'AlgoliaPoweredBy',
|
|
21
|
+
$$type: 'ais.poweredBy',
|
|
21
22
|
getProvidedProps: function getProvidedProps() {
|
|
22
23
|
var hostname = typeof window === 'undefined' || typeof window.location === 'undefined' ? '' : window.location.hostname;
|
|
23
24
|
var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + "utm_content=".concat(hostname, "&") + 'utm_campaign=poweredby';
|
|
@@ -89,6 +89,7 @@ var defaultProps = {
|
|
|
89
89
|
|
|
90
90
|
var _default = (0, _createConnector.default)({
|
|
91
91
|
displayName: 'AlgoliaQueryRules',
|
|
92
|
+
$$type: 'ais.queryRules',
|
|
92
93
|
defaultProps: defaultProps,
|
|
93
94
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
94
95
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
@@ -176,6 +176,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
176
176
|
|
|
177
177
|
var _default = (0, _createConnector.default)({
|
|
178
178
|
displayName: 'AlgoliaRange',
|
|
179
|
+
$$type: 'ais.range',
|
|
179
180
|
propTypes: {
|
|
180
181
|
id: _propTypes.default.string,
|
|
181
182
|
attribute: _propTypes.default.string.isRequired,
|
|
@@ -101,6 +101,7 @@ var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
|
101
101
|
|
|
102
102
|
var _default = (0, _createConnector.default)({
|
|
103
103
|
displayName: 'AlgoliaRefinementList',
|
|
104
|
+
$$type: 'ais.refinementList',
|
|
104
105
|
propTypes: {
|
|
105
106
|
id: _propTypes.default.string,
|
|
106
107
|
attribute: _propTypes.default.string.isRequired,
|
|
@@ -25,6 +25,7 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
25
25
|
|
|
26
26
|
var _default = (0, _createConnector.default)({
|
|
27
27
|
displayName: 'AlgoliaRelevantSort',
|
|
28
|
+
$$type: 'ais.relevantSort',
|
|
28
29
|
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
29
30
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
30
31
|
ais: props.contextValue,
|
|
@@ -52,6 +52,7 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
52
52
|
|
|
53
53
|
var _default = (0, _createConnector.default)({
|
|
54
54
|
displayName: 'AlgoliaSortBy',
|
|
55
|
+
$$type: 'ais.sortBy',
|
|
55
56
|
propTypes: {
|
|
56
57
|
defaultRefinement: _propTypes.default.string,
|
|
57
58
|
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -62,6 +62,7 @@ var _indexUtils = require("../core/indexUtils");
|
|
|
62
62
|
*/
|
|
63
63
|
var _default = (0, _createConnector.default)({
|
|
64
64
|
displayName: 'AlgoliaStateResults',
|
|
65
|
+
$$type: 'ais.stateResults',
|
|
65
66
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
66
67
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
67
68
|
ais: props.contextValue,
|
|
@@ -22,6 +22,7 @@ var _indexUtils = require("../core/indexUtils");
|
|
|
22
22
|
*/
|
|
23
23
|
var _default = (0, _createConnector.default)({
|
|
24
24
|
displayName: 'AlgoliaStats',
|
|
25
|
+
$$type: 'ais.stats',
|
|
25
26
|
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
26
27
|
var results = (0, _indexUtils.getResults)(searchResults, {
|
|
27
28
|
ais: props.contextValue,
|
|
@@ -67,6 +67,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
67
67
|
|
|
68
68
|
var _default = (0, _createConnector.default)({
|
|
69
69
|
displayName: 'AlgoliaToggle',
|
|
70
|
+
$$type: 'ais.toggle',
|
|
70
71
|
propTypes: {
|
|
71
72
|
label: _propTypes.default.string.isRequired,
|
|
72
73
|
attribute: _propTypes.default.string.isRequired,
|
|
@@ -67,6 +67,8 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
67
67
|
|
|
68
68
|
var isWidget = typeof connectorDesc.getSearchParameters === 'function' || typeof connectorDesc.getMetadata === 'function' || typeof connectorDesc.transitionState === 'function';
|
|
69
69
|
return function (Composed) {
|
|
70
|
+
var additionalWidgetProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
71
|
+
|
|
70
72
|
var Connector = /*#__PURE__*/function (_Component) {
|
|
71
73
|
(0, _inherits2.default)(Connector, _Component);
|
|
72
74
|
|
|
@@ -276,6 +278,8 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
276
278
|
}(_react.Component);
|
|
277
279
|
|
|
278
280
|
(0, _defineProperty2.default)(Connector, "displayName", "".concat(connectorDesc.displayName, "(").concat((0, _utils.getDisplayName)(Composed), ")"));
|
|
281
|
+
(0, _defineProperty2.default)(Connector, "$$type", connectorDesc.$$type);
|
|
282
|
+
(0, _defineProperty2.default)(Connector, "$$widgetType", additionalWidgetProperties.$$widgetType);
|
|
279
283
|
(0, _defineProperty2.default)(Connector, "propTypes", connectorDesc.propTypes);
|
|
280
284
|
(0, _defineProperty2.default)(Connector, "defaultProps", connectorDesc.defaultProps);
|
|
281
285
|
(0, _defineProperty2.default)(Connector, "_connectorDesc", connectorDesc);
|
|
@@ -284,8 +288,8 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
var createConnectorWithContext = function createConnectorWithContext(connectorDesc) {
|
|
287
|
-
return function (Composed) {
|
|
288
|
-
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
291
|
+
return function (Composed, additionalWidgetProperties) {
|
|
292
|
+
var Connector = createConnectorWithoutContext(connectorDesc)(Composed, additionalWidgetProperties);
|
|
289
293
|
|
|
290
294
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
291
295
|
return /*#__PURE__*/_react.default.createElement(_context.InstantSearchConsumer, null, function (contextValue) {
|
|
@@ -29,6 +29,8 @@ function getMetadataPayload(widgets, searchClient) {
|
|
|
29
29
|
|
|
30
30
|
return {
|
|
31
31
|
displayName: displayName,
|
|
32
|
+
$$type: constructor.$$type,
|
|
33
|
+
$$widgetType: constructor.$$widgetType,
|
|
32
34
|
params: Object.keys(props).filter(function (prop) {
|
|
33
35
|
return !internalProps.includes(prop) && defaultProps[prop] !== props[prop] && props[prop] !== undefined;
|
|
34
36
|
})
|
package/dist/cjs/core/version.js
CHANGED
|
@@ -21,6 +21,8 @@ ConfigureRelatedItems.propTypes = {
|
|
|
21
21
|
transformSearchParameters: _propTypes.default.func
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
var _default = (0, _connectConfigureRelatedItems.default)(ConfigureRelatedItems
|
|
24
|
+
var _default = (0, _connectConfigureRelatedItems.default)(ConfigureRelatedItems, {
|
|
25
|
+
$$widgetType: 'ais.configureRelatedItems'
|
|
26
|
+
});
|
|
25
27
|
|
|
26
28
|
exports.default = _default;
|
|
@@ -21,21 +21,25 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
23
23
|
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function isReactElement(element) {
|
|
25
|
+
return (0, _typeof2.default)(element) === 'object' && element.props;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getAttribute(element) {
|
|
29
|
+
if (!isReactElement(element)) {
|
|
26
30
|
return undefined;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
33
|
+
if (element.props.attribute) {
|
|
34
|
+
return element.props.attribute;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
if (Array.isArray(
|
|
34
|
-
return
|
|
37
|
+
if (Array.isArray(element.props.attributes)) {
|
|
38
|
+
return element.props.attributes[0];
|
|
35
39
|
}
|
|
36
40
|
|
|
37
|
-
if (
|
|
38
|
-
return getAttribute(_react.default.Children.only(
|
|
41
|
+
if (element.props.children) {
|
|
42
|
+
return getAttribute(_react.default.Children.only(element.props.children));
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
return undefined;
|
|
@@ -71,6 +75,8 @@ function DynamicWidgets(_ref) {
|
|
|
71
75
|
}));
|
|
72
76
|
}
|
|
73
77
|
|
|
74
|
-
var _default = (0, _connectDynamicWidgets.default)(DynamicWidgets
|
|
78
|
+
var _default = (0, _connectDynamicWidgets.default)(DynamicWidgets, {
|
|
79
|
+
$$widgetType: 'ais.dynamicWidgets'
|
|
80
|
+
});
|
|
75
81
|
|
|
76
82
|
exports.default = _default;
|
|
@@ -152,6 +152,8 @@ var Index = /*#__PURE__*/function (_Component) {
|
|
|
152
152
|
children: _propTypes.default.node
|
|
153
153
|
});
|
|
154
154
|
(0, _defineProperty2.default)(Index, "displayName", 'AlgoliaIndex');
|
|
155
|
+
(0, _defineProperty2.default)(Index, "$$type", 'ais.index');
|
|
156
|
+
(0, _defineProperty2.default)(Index, "$$widgetType", 'ais.index');
|
|
155
157
|
|
|
156
158
|
var IndexWrapper = function IndexWrapper(props) {
|
|
157
159
|
var inferredIndexId = props.indexName;
|
|
@@ -11,6 +11,8 @@ var _connectQueryRules = _interopRequireDefault(require("../connectors/connectQu
|
|
|
11
11
|
|
|
12
12
|
var _default = (0, _connectQueryRules.default)(function QueryRuleContext() {
|
|
13
13
|
return null;
|
|
14
|
+
}, {
|
|
15
|
+
$$widgetType: 'ais.queryRuleContext'
|
|
14
16
|
});
|
|
15
17
|
|
|
16
18
|
exports.default = _default;
|
|
@@ -67,6 +67,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
67
67
|
|
|
68
68
|
export default createConnector({
|
|
69
69
|
displayName: 'AlgoliaAutoComplete',
|
|
70
|
+
$$type: 'ais.autoComplete',
|
|
70
71
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
71
72
|
return {
|
|
72
73
|
hits: getHits(searchResults),
|
|
@@ -74,6 +74,7 @@ function transformValue(values) {
|
|
|
74
74
|
|
|
75
75
|
export default createConnector({
|
|
76
76
|
displayName: 'AlgoliaBreadcrumb',
|
|
77
|
+
$$type: 'ais.breadcrumb',
|
|
77
78
|
propTypes: {
|
|
78
79
|
attributes: function attributes(props, propName, componentName) {
|
|
79
80
|
var isNotString = function isNotString(val) {
|
|
@@ -71,6 +71,7 @@ function getSearchParametersFromProps(props) {
|
|
|
71
71
|
|
|
72
72
|
export default createConnector({
|
|
73
73
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
74
|
+
$$type: 'ais.configureRelatedItems',
|
|
74
75
|
defaultProps: defaultProps,
|
|
75
76
|
getProvidedProps: function getProvidedProps() {
|
|
76
77
|
return {};
|
|
@@ -4,6 +4,7 @@ import { getResults } from "../core/indexUtils.js";
|
|
|
4
4
|
var MAX_WILDCARD_FACETS = 20;
|
|
5
5
|
export default createConnector({
|
|
6
6
|
displayName: 'AlgoliaDynamicWidgets',
|
|
7
|
+
$$type: 'ais.dynamicWidgets',
|
|
7
8
|
defaultProps: {
|
|
8
9
|
transformItems: function transformItems(items) {
|
|
9
10
|
return items;
|
|
@@ -108,6 +108,7 @@ var _refine = function refine(searchState, nextValue, context) {
|
|
|
108
108
|
|
|
109
109
|
export default createConnector({
|
|
110
110
|
displayName: 'AlgoliaGeoSearch',
|
|
111
|
+
$$type: 'ais.geoSearch',
|
|
111
112
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
112
113
|
var context = {
|
|
113
114
|
ais: props.contextValue,
|
|
@@ -136,6 +136,7 @@ var sortBy = ['name:asc'];
|
|
|
136
136
|
|
|
137
137
|
export default createConnector({
|
|
138
138
|
displayName: 'AlgoliaHierarchicalMenu',
|
|
139
|
+
$$type: 'ais.hierarchicalMenu',
|
|
139
140
|
propTypes: {
|
|
140
141
|
attributes: function attributes(props, propName, componentName) {
|
|
141
142
|
var isNotString = function isNotString(val) {
|
|
@@ -61,6 +61,7 @@ var wrapInsightsClient = function wrapInsightsClient(aa, results, currentHit) {
|
|
|
61
61
|
export default (function (insightsClient) {
|
|
62
62
|
return createConnector({
|
|
63
63
|
displayName: 'AlgoliaInsights',
|
|
64
|
+
$$type: 'ais.insights',
|
|
64
65
|
getProvidedProps: function getProvidedProps(props, _, searchResults) {
|
|
65
66
|
var results = getResults(searchResults, {
|
|
66
67
|
ais: props.contextValue,
|
|
@@ -47,6 +47,7 @@ import { addAbsolutePositions, addQueryID } from "../core/utils.js";
|
|
|
47
47
|
|
|
48
48
|
export default createConnector({
|
|
49
49
|
displayName: 'AlgoliaHits',
|
|
50
|
+
$$type: 'ais.hits',
|
|
50
51
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
51
52
|
var results = getResults(searchResults, {
|
|
52
53
|
ais: props.contextValue,
|
|
@@ -39,6 +39,7 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
39
39
|
|
|
40
40
|
export default createConnector({
|
|
41
41
|
displayName: 'AlgoliaHitsPerPage',
|
|
42
|
+
$$type: 'ais.hitsPerPage',
|
|
42
43
|
propTypes: {
|
|
43
44
|
defaultRefinement: PropTypes.number.isRequired,
|
|
44
45
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -69,6 +69,7 @@ function extractHitsFromCachedHits(cachedHits) {
|
|
|
69
69
|
|
|
70
70
|
export default createConnector({
|
|
71
71
|
displayName: 'AlgoliaInfiniteHits',
|
|
72
|
+
$$type: 'ais.infiniteHits',
|
|
72
73
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
73
74
|
var _this = this;
|
|
74
75
|
|
|
@@ -46,6 +46,7 @@ function _refine(props, searchState, nextPage, context) {
|
|
|
46
46
|
|
|
47
47
|
export default createConnector({
|
|
48
48
|
displayName: 'AlgoliaPagination',
|
|
49
|
+
$$type: 'ais.pagination',
|
|
49
50
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
50
51
|
var results = getResults(searchResults, {
|
|
51
52
|
ais: props.contextValue,
|
|
@@ -9,6 +9,7 @@ import createConnector from "../core/createConnector.js";
|
|
|
9
9
|
|
|
10
10
|
export default createConnector({
|
|
11
11
|
displayName: 'AlgoliaPoweredBy',
|
|
12
|
+
$$type: 'ais.poweredBy',
|
|
12
13
|
getProvidedProps: function getProvidedProps() {
|
|
13
14
|
var hostname = typeof window === 'undefined' || typeof window.location === 'undefined' ? '' : window.location.hostname;
|
|
14
15
|
var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + "utm_content=".concat(hostname, "&") + 'utm_campaign=poweredby';
|
|
@@ -77,6 +77,7 @@ var defaultProps = {
|
|
|
77
77
|
};
|
|
78
78
|
export default createConnector({
|
|
79
79
|
displayName: 'AlgoliaQueryRules',
|
|
80
|
+
$$type: 'ais.queryRules',
|
|
80
81
|
defaultProps: defaultProps,
|
|
81
82
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
82
83
|
var results = getResults(searchResults, {
|
|
@@ -87,6 +87,7 @@ function _cleanUp(props, searchState, context) {
|
|
|
87
87
|
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
88
88
|
export default createConnector({
|
|
89
89
|
displayName: 'AlgoliaRefinementList',
|
|
90
|
+
$$type: 'ais.refinementList',
|
|
90
91
|
propTypes: {
|
|
91
92
|
id: PropTypes.string,
|
|
92
93
|
attribute: PropTypes.string.isRequired,
|
|
@@ -14,6 +14,7 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
14
14
|
|
|
15
15
|
export default createConnector({
|
|
16
16
|
displayName: 'AlgoliaRelevantSort',
|
|
17
|
+
$$type: 'ais.relevantSort',
|
|
17
18
|
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
18
19
|
var results = getResults(searchResults, {
|
|
19
20
|
ais: props.contextValue,
|
|
@@ -52,6 +52,7 @@ import { getResults } from "../core/indexUtils.js";
|
|
|
52
52
|
|
|
53
53
|
export default createConnector({
|
|
54
54
|
displayName: 'AlgoliaStateResults',
|
|
55
|
+
$$type: 'ais.stateResults',
|
|
55
56
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
56
57
|
var results = getResults(searchResults, {
|
|
57
58
|
ais: props.contextValue,
|
|
@@ -12,6 +12,7 @@ import { getResults } from "../core/indexUtils.js";
|
|
|
12
12
|
|
|
13
13
|
export default createConnector({
|
|
14
14
|
displayName: 'AlgoliaStats',
|
|
15
|
+
$$type: 'ais.stats',
|
|
15
16
|
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
16
17
|
var results = getResults(searchResults, {
|
|
17
18
|
ais: props.contextValue,
|