@tap-payments/os-micro-frontend-shared 0.1.277-test.2 → 0.1.277-test.3
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,5 +1,6 @@
|
|
|
1
1
|
import { CustomColumnFilterProps } from '../VirtualTables';
|
|
2
|
-
import {
|
|
2
|
+
import { StatusValue } from './type';
|
|
3
|
+
import { ColumnFilterValues } from '../../types/index.js';
|
|
3
4
|
interface StatusFilterProps extends CustomColumnFilterProps {
|
|
4
5
|
options: {
|
|
5
6
|
icon: string;
|
|
@@ -7,9 +8,9 @@ interface StatusFilterProps extends CustomColumnFilterProps {
|
|
|
7
8
|
value: string;
|
|
8
9
|
}[];
|
|
9
10
|
apiKey?: string;
|
|
10
|
-
|
|
11
|
+
initialStatuses?: Record<string, StatusValue>;
|
|
11
12
|
onClear: (apiKeys: string[]) => void;
|
|
12
13
|
onConfirm: (filterValues: ColumnFilterValues) => void;
|
|
13
14
|
}
|
|
14
|
-
export default function StatusFilter({ anchorEl,
|
|
15
|
+
export default function StatusFilter({ anchorEl, options, apiKey, initialStatuses, onCloseDropdown, onClear, onConfirm, }: Readonly<StatusFilterProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -8,12 +8,11 @@ import { rightArrow } from '../../constants/index.js';
|
|
|
8
8
|
import { ClickAwayListener, Popper } from '@mui/material';
|
|
9
9
|
import { StatusValue } from './type';
|
|
10
10
|
import { getInitialStatuses } from './utils';
|
|
11
|
-
export default function StatusFilter({ anchorEl,
|
|
11
|
+
export default function StatusFilter({ anchorEl, options, apiKey = 'statuses', initialStatuses, onCloseDropdown, onClear, onConfirm, }) {
|
|
12
12
|
const open = Boolean(anchorEl);
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const [statuses, setStatuses] = useState(() => {
|
|
15
|
-
|
|
16
|
-
return getInitialStatuses((_a = appPayload === null || appPayload === void 0 ? void 0 : appPayload.columnFilters) === null || _a === void 0 ? void 0 : _a[apiKey], options);
|
|
15
|
+
return getInitialStatuses(initialStatuses, options);
|
|
17
16
|
});
|
|
18
17
|
const containerRef = useRef(null);
|
|
19
18
|
const [childAnchorEl, setChildAnchorEl] = useState(null);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.1.277-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.277-test.3",
|
|
5
|
+
"testVersion": 3,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|