react-instantsearch
Advanced tools
Comparing version 7.2.0 to 7.2.1
@@ -9,3 +9,3 @@ "use strict"; | ||
var _lib = require("./lib"); | ||
var _excluded = ["classNames", "items", "onRemove", "hasRefinements"]; | ||
var _excluded = ["classNames", "items", "hasRefinements"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -20,4 +20,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); } | ||
items = _ref$items === void 0 ? [] : _ref$items, | ||
_ref$onRemove = _ref.onRemove, | ||
onRemove = _ref$onRemove === void 0 ? function () {} : _ref$onRemove, | ||
_ref$hasRefinements = _ref.hasRefinements, | ||
@@ -49,3 +47,3 @@ hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements, | ||
} | ||
onRemove(refinement); | ||
item.refine(refinement); | ||
}, | ||
@@ -52,0 +50,0 @@ className: (0, _lib.cx)('ais-CurrentRefinements-delete', classNames.delete) |
@@ -28,7 +28,5 @@ "use strict"; | ||
items = _useCurrentRefinement.items, | ||
refine = _useCurrentRefinement.refine, | ||
canRefine = _useCurrentRefinement.canRefine; | ||
var uiProps = { | ||
items: items, | ||
onRemove: refine, | ||
hasRefinements: canRefine | ||
@@ -35,0 +33,0 @@ }; |
@@ -60,6 +60,6 @@ "use strict"; | ||
}, | ||
firstPageItemAriaLabel: 'First', | ||
previousPageItemAriaLabel: 'Previous', | ||
nextPageItemAriaLabel: 'Next', | ||
lastPageItemAriaLabel: 'Last', | ||
firstPageItemAriaLabel: 'First Page', | ||
previousPageItemAriaLabel: 'Previous Page', | ||
nextPageItemAriaLabel: 'Next Page', | ||
lastPageItemAriaLabel: "Last Page, Page ".concat(nbPages), | ||
pageItemAriaLabel: function pageItemAriaLabel(_ref3) { | ||
@@ -66,0 +66,0 @@ var currentPage = _ref3.currentPage; |
import React from 'react'; | ||
import type { CurrentRefinementsConnectorParamsItem, CurrentRefinementsConnectorParamsRefinement } from 'instantsearch.js/es/connectors/current-refinements/connectCurrentRefinements'; | ||
import type { CurrentRefinementsConnectorParamsItem } from 'instantsearch.js/es/connectors/current-refinements/connectCurrentRefinements'; | ||
export type CurrentRefinementsProps = React.ComponentProps<'div'> & { | ||
classNames?: Partial<CurrentRefinementsClassNames>; | ||
items?: Array<Pick<CurrentRefinementsConnectorParamsItem, 'label' | 'refinements'> & Record<string, unknown>>; | ||
onRemove?: (refinement: CurrentRefinementsConnectorParamsRefinement) => void; | ||
items?: Array<Pick<CurrentRefinementsConnectorParamsItem, 'label' | 'refinements' | 'refine'> & Record<string, unknown>>; | ||
hasRefinements?: boolean; | ||
@@ -47,2 +46,2 @@ }; | ||
}; | ||
export declare function CurrentRefinements({ classNames, items, onRemove, hasRefinements, ...props }: CurrentRefinementsProps): JSX.Element; | ||
export declare function CurrentRefinements({ classNames, items, hasRefinements, ...props }: CurrentRefinementsProps): JSX.Element; |
@@ -1,2 +0,2 @@ | ||
var _excluded = ["classNames", "items", "onRemove", "hasRefinements"]; | ||
var _excluded = ["classNames", "items", "hasRefinements"]; | ||
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); } | ||
@@ -12,4 +12,2 @@ 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; } | ||
items = _ref$items === void 0 ? [] : _ref$items, | ||
_ref$onRemove = _ref.onRemove, | ||
onRemove = _ref$onRemove === void 0 ? function () {} : _ref$onRemove, | ||
_ref$hasRefinements = _ref.hasRefinements, | ||
@@ -41,3 +39,3 @@ hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements, | ||
} | ||
onRemove(refinement); | ||
item.refine(refinement); | ||
}, | ||
@@ -44,0 +42,0 @@ className: cx('ais-CurrentRefinements-delete', classNames.delete) |
import type { CurrentRefinementsProps as CurrentRefinementsUiComponentProps } from '../ui/CurrentRefinements'; | ||
import type { UseCurrentRefinementsProps } from 'react-instantsearch-core'; | ||
type UiProps = Pick<CurrentRefinementsUiComponentProps, 'items' | 'onRemove' | 'hasRefinements'>; | ||
type UiProps = Pick<CurrentRefinementsUiComponentProps, 'items' | 'hasRefinements'>; | ||
export type CurrentRefinementsProps = Omit<CurrentRefinementsUiComponentProps, keyof UiProps> & UseCurrentRefinementsProps; | ||
export declare function CurrentRefinements({ includedAttributes, excludedAttributes, transformItems, ...props }: CurrentRefinementsProps): JSX.Element; | ||
export {}; |
@@ -21,7 +21,5 @@ var _excluded = ["includedAttributes", "excludedAttributes", "transformItems"]; | ||
items = _useCurrentRefinement.items, | ||
refine = _useCurrentRefinement.refine, | ||
canRefine = _useCurrentRefinement.canRefine; | ||
var uiProps = { | ||
items: items, | ||
onRemove: refine, | ||
hasRefinements: canRefine | ||
@@ -28,0 +26,0 @@ }; |
@@ -53,6 +53,6 @@ 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); } | ||
}, | ||
firstPageItemAriaLabel: 'First', | ||
previousPageItemAriaLabel: 'Previous', | ||
nextPageItemAriaLabel: 'Next', | ||
lastPageItemAriaLabel: 'Last', | ||
firstPageItemAriaLabel: 'First Page', | ||
previousPageItemAriaLabel: 'Previous Page', | ||
nextPageItemAriaLabel: 'Next Page', | ||
lastPageItemAriaLabel: "Last Page, Page ".concat(nbPages), | ||
pageItemAriaLabel: function pageItemAriaLabel(_ref3) { | ||
@@ -59,0 +59,0 @@ var currentPage = _ref3.currentPage; |
{ | ||
"name": "react-instantsearch", | ||
"version": "7.2.0", | ||
"version": "7.2.1", | ||
"description": "⚡ Lightning-fast search for React, by Algolia", | ||
@@ -51,4 +51,4 @@ "source": "src/index.ts", | ||
"@babel/runtime": "^7.1.2", | ||
"instantsearch.js": "4.58.0", | ||
"react-instantsearch-core": "7.2.0" | ||
"instantsearch.js": "4.59.0", | ||
"react-instantsearch-core": "7.2.1" | ||
}, | ||
@@ -60,3 +60,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "d21e0ed006139e5635df70d7a4caf0c99ab85f5a" | ||
"gitHead": "8fb537f2301a5e133e9e5df20c7c208cae16b3aa" | ||
} |
@@ -0,1 +1,7 @@ | ||
<p align="center"> | ||
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/"> | ||
<img alt="React InstantSearch" src="https://github.com/algolia/instantsearch/blob/master/.github/react-instantsearch-banner.png?raw=true"> | ||
</a> | ||
</p> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
@@ -2,0 +8,0 @@ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4073231
25803
126
5
+ Addedalgoliasearch-helper@3.15.0(transitive)
+ Addedinstantsearch.js@4.59.0(transitive)
+ Addedreact-instantsearch-core@7.2.1(transitive)
- Removedalgoliasearch-helper@3.14.2(transitive)
- Removedinstantsearch.js@4.58.0(transitive)
- Removedreact-instantsearch-core@7.2.0(transitive)
Updatedinstantsearch.js@4.59.0