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.
@@ -34,6 +34,10 @@ export type CurrentRefinementsConnectorParamsItem = {
34
34
  * The index name.
35
35
  */
36
36
  indexName: string;
37
+ /**
38
+ * The index id as provided to the index widget.
39
+ */
40
+ indexId: string;
37
41
  /**
38
42
  * The attribute on which the refinement is applied.
39
43
  */
@@ -62,6 +62,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
62
62
  return transformItems(getRefinementsItems({
63
63
  results: {},
64
64
  helper: helper,
65
+ indexId: helper.state.index,
65
66
  includedAttributes: includedAttributes,
66
67
  excludedAttributes: excludedAttributes
67
68
  }), {
@@ -72,6 +73,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
72
73
  return accResults.concat(transformItems(getRefinementsItems({
73
74
  results: scopedResult.results,
74
75
  helper: scopedResult.helper,
76
+ indexId: scopedResult.indexId,
75
77
  includedAttributes: includedAttributes,
76
78
  excludedAttributes: excludedAttributes
77
79
  }), {
@@ -98,6 +100,7 @@ var connectCurrentRefinements = function connectCurrentRefinements(renderFn) {
98
100
  function getRefinementsItems(_ref3) {
99
101
  var results = _ref3.results,
100
102
  helper = _ref3.helper,
103
+ indexId = _ref3.indexId,
101
104
  includedAttributes = _ref3.includedAttributes,
102
105
  excludedAttributes = _ref3.excludedAttributes;
103
106
  var includesQuery = (includedAttributes || []).indexOf('query') !== -1 || (excludedAttributes || []).indexOf('query') === -1;
@@ -112,6 +115,7 @@ function getRefinementsItems(_ref3) {
112
115
  return item.attribute !== currentItem.attribute;
113
116
  })), [{
114
117
  indexName: helper.state.index,
118
+ indexId: indexId,
115
119
  attribute: currentItem.attribute,
116
120
  label: currentItem.attribute,
117
121
  refinements: items.filter(function (result) {
@@ -1,2 +1,2 @@
1
- declare const _default: "4.52.0";
1
+ declare const _default: "4.53.0";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.52.0';
1
+ export default '4.53.0';
@@ -94,7 +94,7 @@ var panel = function panel(panelWidgetParams) {
94
94
  footer: '',
95
95
  collapseButtonText: function collapseButtonText(_ref4) {
96
96
  var isCollapsed = _ref4.collapsed;
97
- 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>");
97
+ 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>");
98
98
  }
99
99
  };
100
100
  var renderPanel = renderer({
@@ -33,7 +33,8 @@ var defaultTemplate = {
33
33
  className: cssClasses.resetIcon,
34
34
  viewBox: "0 0 20 20",
35
35
  width: "10",
36
- height: "10"
36
+ height: "10",
37
+ "aria-hidden": "true"
37
38
  }, _ref2);
38
39
  },
39
40
  submit: function submit(_ref3) {
@@ -42,7 +43,8 @@ var defaultTemplate = {
42
43
  className: cssClasses.submitIcon,
43
44
  width: "10",
44
45
  height: "10",
45
- viewBox: "0 0 40 40"
46
+ viewBox: "0 0 40 40",
47
+ "aria-hidden": "true"
46
48
  }, _ref4);
47
49
  },
48
50
  loadingIndicator: function loadingIndicator(_ref5) {
@@ -52,7 +54,8 @@ var defaultTemplate = {
52
54
  width: "16",
53
55
  height: "16",
54
56
  viewBox: "0 0 38 38",
55
- stroke: "#444"
57
+ stroke: "#444",
58
+ "aria-hidden": "true"
56
59
  }, _ref6);
57
60
  }
58
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instantsearch.js",
3
- "version": "4.52.0",
3
+ "version": "4.53.0",
4
4
  "description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
5
5
  "homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
6
6
  "types": "es/index.d.ts",
@@ -55,9 +55,9 @@
55
55
  "version": "./scripts/version/update-version.js"
56
56
  },
57
57
  "devDependencies": {
58
- "@instantsearch/mocks": "1.8.0",
59
- "@instantsearch/tests": "1.8.0",
60
- "@instantsearch/testutils": "1.0.11",
58
+ "@instantsearch/mocks": "1.9.0",
59
+ "@instantsearch/tests": "1.9.0",
60
+ "@instantsearch/testutils": "1.0.12",
61
61
  "@storybook/html": "5.3.9",
62
62
  "@types/scriptjs": "0.0.2",
63
63
  "algoliasearch": "4.14.3",
@@ -65,5 +65,5 @@
65
65
  "scriptjs": "2.5.9",
66
66
  "webpack": "4.41.5"
67
67
  },
68
- "gitHead": "24ab56e4b18d69cc68919f994f8d8a3f1c880d33"
68
+ "gitHead": "a00311c99cae3e6f4b9f659945d46d62347bc6d8"
69
69
  }