@tap-payments/os-micro-frontend-shared 0.0.199-alpha.0 → 0.0.199-alpha.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.
@@ -1,8 +1,8 @@
1
1
  import type { IColumnFilter, IColumnFilterInputs } from '../../../../../types/index.js';
2
2
  interface InputsI {
3
- onClearClick?: () => void;
3
+ onClearValuesClick?: () => void;
4
4
  onCloseDropdown: () => void;
5
5
  filter: IColumnFilter & IColumnFilterInputs;
6
6
  }
7
- declare function Inputs({ onClearClick, onCloseDropdown, filter: { options, onConfirm, data, isOnlyOneFilter } }: InputsI): import("react/jsx-runtime").JSX.Element;
7
+ declare function Inputs({ onClearValuesClick, onCloseDropdown, filter: { options, onConfirm, data, isOnlyOneFilter } }: InputsI): import("react/jsx-runtime").JSX.Element;
8
8
  export default Inputs;
@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';
7
7
  import { grayCloseIcon, searchIcon } from '../../../../../constants/index.js';
8
8
  import { Wrapper, Text, InputStyled, InputsWrapper, ClearButton, ClearWrapper } from './style';
9
9
  import { CancelButton, Footer, OkayButton } from '../style';
10
- function Inputs({ onClearClick, onCloseDropdown, filter: { options = [], onConfirm, data, isOnlyOneFilter } }) {
10
+ function Inputs({ onClearValuesClick, onCloseDropdown, filter: { options = [], onConfirm, data, isOnlyOneFilter } }) {
11
11
  const [values, setValues] = useState({});
12
12
  useEffect(() => {
13
13
  setValues((options || []).reduce((acc, { apiKey }) => { var _a; return (Object.assign(Object.assign({}, acc), { [apiKey]: (_a = data === null || data === void 0 ? void 0 : data[apiKey]) !== null && _a !== void 0 ? _a : '' })); }, {}));
@@ -21,7 +21,7 @@ function Inputs({ onClearClick, onCloseDropdown, filter: { options = [], onConfi
21
21
  onCloseDropdown();
22
22
  };
23
23
  const onClickClear = () => {
24
- onClearClick === null || onClearClick === void 0 ? void 0 : onClearClick();
24
+ onClearValuesClick === null || onClearValuesClick === void 0 ? void 0 : onClearValuesClick();
25
25
  setValues(options.reduce((acc, { apiKey }) => (Object.assign(Object.assign({}, acc), { [apiKey]: '' })), {}));
26
26
  };
27
27
  const isInputHasValue = (key) => values[key] !== undefined && values[key].length > 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.199-alpha.0",
4
+ "version": "0.0.199-alpha.1",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",