instantsearch.js 4.52.0 → 4.53.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/README.md CHANGED
@@ -10,11 +10,6 @@
10
10
 
11
11
  ---
12
12
 
13
- [![Version][version-svg]][package-url]
14
- [![License][license-image]][license-url]
15
- [![Build Status][ci-svg]][ci-url]
16
- [![Pull reminders][pull-reminders-svg]][pull-reminders-url]
17
-
18
13
  InstantSearch.js is a vanilla JavaScript library that lets you create an instant-search result experience using [Algolia][algolia-website]’s search API. It is part of the InstantSearch family:
19
14
 
20
15
  **InstantSearch.js** | [React InstantSearch][react-instantsearch-github] | [Vue InstantSearch][vue-instantsearch-github] | [Angular InstantSearch][instantsearch-angular-github] | [React InstantSearch Native][react-instantsearch-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]
@@ -176,19 +171,9 @@ Please read [our contribution process](https://github.com/algolia/instantsearch.
176
171
 
177
172
  InstantSearch.js is [MIT licensed][license-url].
178
173
 
179
- <!-- Badges -->
180
-
181
- [version-svg]: https://img.shields.io/npm/v/instantsearch.js.svg?style=flat-square
182
- [package-url]: https://npmjs.org/package/instantsearch.js
183
- [ci-svg]: https://img.shields.io/circleci/project/github/algolia/instantsearch.js.svg?style=flat-square
184
- [ci-url]: https://circleci.com/gh/algolia/instantsearch.js
185
- [pull-reminders-svg]: https://img.shields.io/badge/pull%20reminders-✓-success.svg?style=flat-square
186
- [pull-reminders-url]: https://pullreminders.com?ref=badge
187
- [license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
188
- [license-url]: LICENSE
189
-
190
174
  <!-- Links -->
191
175
 
176
+ [license-url]: LICENSE
192
177
  [algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository
193
178
  [react-instantsearch-github]: https://github.com/algolia/instantsearch.js/
194
179
  [vue-instantsearch-github]: https://github.com/algolia/vue-instantsearch
@@ -68,6 +68,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
68
68
  return transformItems(getRefinementsItems({
69
69
  results: {},
70
70
  helper: helper,
71
+ indexId: helper.state.index,
71
72
  includedAttributes: includedAttributes,
72
73
  excludedAttributes: excludedAttributes
73
74
  }), {
@@ -78,6 +79,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
78
79
  return accResults.concat(transformItems(getRefinementsItems({
79
80
  results: scopedResult.results,
80
81
  helper: scopedResult.helper,
82
+ indexId: scopedResult.indexId,
81
83
  includedAttributes: includedAttributes,
82
84
  excludedAttributes: excludedAttributes
83
85
  }), {
@@ -104,6 +106,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
104
106
  function getRefinementsItems(_ref3) {
105
107
  var results = _ref3.results,
106
108
  helper = _ref3.helper,
109
+ indexId = _ref3.indexId,
107
110
  includedAttributes = _ref3.includedAttributes,
108
111
  excludedAttributes = _ref3.excludedAttributes;
109
112
  var includesQuery = (includedAttributes || []).indexOf('query') !== -1 || (excludedAttributes || []).indexOf('query') === -1;
@@ -118,6 +121,7 @@ function getRefinementsItems(_ref3) {
118
121
  return item.attribute !== currentItem.attribute;
119
122
  })), [{
120
123
  indexName: helper.state.index,
124
+ indexId: indexId,
121
125
  attribute: currentItem.attribute,
122
126
  label: currentItem.attribute,
123
127
  refinements: items.filter(function (result) {
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '4.52.0';
7
+ var _default = '4.53.0';
8
8
  exports.default = _default;
@@ -101,7 +101,7 @@ var panel = function panel(panelWidgetParams) {
101
101
  footer: '',
102
102
  collapseButtonText: function collapseButtonText(_ref4) {
103
103
  var isCollapsed = _ref4.collapsed;
104
- return "<svg\n class=\"".concat(cssClasses.collapseIcon, "\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 500 500\"\n >\n <path d=\"").concat(isCollapsed ? 'M100 250l300-150v300z' : 'M250 400l150-300H100z', "\" fill=\"currentColor\" />\n </svg>");
104
+ return "<svg\n class=\"".concat(cssClasses.collapseIcon, "\"\n style=\"width: 1em; height: 1em;\"\n viewBox=\"0 0 500 500\"\n >\n <path d=\"").concat(isCollapsed ? 'M100 250l300-150v300z' : 'M250 400l150-300H100z', "\" fill=\"currentColor\" />\n </svg>");
105
105
  }
106
106
  };
107
107
  var renderPanel = renderer({
@@ -39,7 +39,8 @@ var defaultTemplate = {
39
39
  className: cssClasses.resetIcon,
40
40
  viewBox: "0 0 20 20",
41
41
  width: "10",
42
- height: "10"
42
+ height: "10",
43
+ "aria-hidden": "true"
43
44
  }, _ref2);
44
45
  },
45
46
  submit: function submit(_ref3) {
@@ -48,7 +49,8 @@ var defaultTemplate = {
48
49
  className: cssClasses.submitIcon,
49
50
  width: "10",
50
51
  height: "10",
51
- viewBox: "0 0 40 40"
52
+ viewBox: "0 0 40 40",
53
+ "aria-hidden": "true"
52
54
  }, _ref4);
53
55
  },
54
56
  loadingIndicator: function loadingIndicator(_ref5) {
@@ -58,7 +60,8 @@ var defaultTemplate = {
58
60
  width: "16",
59
61
  height: "16",
60
62
  viewBox: "0 0 38 38",
61
- stroke: "#444"
63
+ stroke: "#444",
64
+ "aria-hidden": "true"
62
65
  }, _ref6);
63
66
  }
64
67
  };
@@ -957,6 +957,10 @@ declare type CurrentRefinementsConnectorParamsItem = {
957
957
  * The index name.
958
958
  */
959
959
  indexName: string;
960
+ /**
961
+ * The index id as provided to the index widget.
962
+ */
963
+ indexId: string;
960
964
  /**
961
965
  * The attribute on which the refinement is applied.
962
966
  */
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.52.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
1
+ /*! InstantSearch.js 4.53.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -2108,6 +2108,7 @@
2108
2108
  return transformItems(getRefinementsItems({
2109
2109
  results: {},
2110
2110
  helper: helper,
2111
+ indexId: helper.state.index,
2111
2112
  includedAttributes: includedAttributes,
2112
2113
  excludedAttributes: excludedAttributes
2113
2114
  }), {
@@ -2118,6 +2119,7 @@
2118
2119
  return accResults.concat(transformItems(getRefinementsItems({
2119
2120
  results: scopedResult.results,
2120
2121
  helper: scopedResult.helper,
2122
+ indexId: scopedResult.indexId,
2121
2123
  includedAttributes: includedAttributes,
2122
2124
  excludedAttributes: excludedAttributes
2123
2125
  }), {
@@ -2144,6 +2146,7 @@
2144
2146
  function getRefinementsItems(_ref3) {
2145
2147
  var results = _ref3.results,
2146
2148
  helper = _ref3.helper,
2149
+ indexId = _ref3.indexId,
2147
2150
  includedAttributes = _ref3.includedAttributes,
2148
2151
  excludedAttributes = _ref3.excludedAttributes;
2149
2152
  var includesQuery = (includedAttributes || []).indexOf('query') !== -1 || (excludedAttributes || []).indexOf('query') === -1;
@@ -2158,6 +2161,7 @@
2158
2161
  return item.attribute !== currentItem.attribute;
2159
2162
  })), [{
2160
2163
  indexName: helper.state.index,
2164
+ indexId: indexId,
2161
2165
  attribute: currentItem.attribute,
2162
2166
  label: currentItem.attribute,
2163
2167
  refinements: items.filter(function (result) {
@@ -13616,7 +13620,7 @@
13616
13620
  };
13617
13621
  }
13618
13622
 
13619
- var version$1 = '4.52.0';
13623
+ var version$1 = '4.53.0';
13620
13624
 
13621
13625
  var withUsage$r = createDocumentationMessageGenerator({
13622
13626
  name: 'instantsearch'
@@ -18599,7 +18603,7 @@
18599
18603
  footer: '',
18600
18604
  collapseButtonText: function collapseButtonText(_ref4) {
18601
18605
  var isCollapsed = _ref4.collapsed;
18602
- return "<svg\n class=\"".concat(cssClasses.collapseIcon, "\"\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 500 500\"\n >\n <path d=\"").concat(isCollapsed ? 'M100 250l300-150v300z' : 'M250 400l150-300H100z', "\" fill=\"currentColor\" />\n </svg>");
18606
+ return "<svg\n class=\"".concat(cssClasses.collapseIcon, "\"\n style=\"width: 1em; height: 1em;\"\n viewBox=\"0 0 500 500\"\n >\n <path d=\"").concat(isCollapsed ? 'M100 250l300-150v300z' : 'M250 400l150-300H100z', "\" fill=\"currentColor\" />\n </svg>");
18603
18607
  }
18604
18608
  };
18605
18609
  var renderPanel = renderer$d({
@@ -20237,7 +20241,8 @@
20237
20241
  className: cssClasses.resetIcon,
20238
20242
  viewBox: "0 0 20 20",
20239
20243
  width: "10",
20240
- height: "10"
20244
+ height: "10",
20245
+ "aria-hidden": "true"
20241
20246
  }, _ref2);
20242
20247
  },
20243
20248
  submit: function submit(_ref3) {
@@ -20246,7 +20251,8 @@
20246
20251
  className: cssClasses.submitIcon,
20247
20252
  width: "10",
20248
20253
  height: "10",
20249
- viewBox: "0 0 40 40"
20254
+ viewBox: "0 0 40 40",
20255
+ "aria-hidden": "true"
20250
20256
  }, _ref4$1);
20251
20257
  },
20252
20258
  loadingIndicator: function loadingIndicator(_ref5) {
@@ -20256,7 +20262,8 @@
20256
20262
  width: "16",
20257
20263
  height: "16",
20258
20264
  viewBox: "0 0 38 38",
20259
- stroke: "#444"
20265
+ stroke: "#444",
20266
+ "aria-hidden": "true"
20260
20267
  }, _ref6$1);
20261
20268
  }
20262
20269
  };