@tap-payments/os-micro-frontend-shared 0.1.196-test.11 → 0.1.196-test.5
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.
|
@@ -17,7 +17,7 @@ import { RadioButton } from '../RadioButton';
|
|
|
17
17
|
function RadioItem(_a) {
|
|
18
18
|
var { option, size = 'small', customLabelRenderer, labelPosition = 'end', showHoverEffects = true, customRadioProps, labelSx } = _a, props = __rest(_a, ["option", "size", "customLabelRenderer", "labelPosition", "showHoverEffects", "customRadioProps", "labelSx"]);
|
|
19
19
|
const label = customLabelRenderer ? customLabelRenderer(option) : option.label;
|
|
20
|
-
return (_jsx(StyledFormControlLabel, Object.assign({ control: _jsx(RadioButton, Object.assign({ size: size }, customRadioProps, option.customProps)), label: label, disabled: option.disabled, size: size, labelPlacement: labelPosition, showHoverEffects: showHoverEffects, labelSx: labelSx }, props)
|
|
20
|
+
return (_jsx(StyledFormControlLabel, Object.assign({ value: option.value, control: _jsx(RadioButton, Object.assign({ size: size }, customRadioProps, option.customProps)), label: label, disabled: option.disabled, size: size, labelPlacement: labelPosition, showHoverEffects: showHoverEffects, labelSx: labelSx }, props)));
|
|
21
21
|
}
|
|
22
22
|
function RadioGroup(_a) {
|
|
23
23
|
var { options, onOptionChange, size = 'small', customLabelRenderer, layout = 'vertical', spacing = 0, labelPosition = 'end', showHoverEffects = true, customRadioProps, labelSx, onChange, sx } = _a, props = __rest(_a, ["options", "onOptionChange", "size", "customLabelRenderer", "layout", "spacing", "labelPosition", "showHoverEffects", "customRadioProps", "labelSx", "onChange", "sx"]);
|
|
@@ -26,6 +26,6 @@ function RadioGroup(_a) {
|
|
|
26
26
|
onOptionChange === null || onOptionChange === void 0 ? void 0 : onOptionChange(value);
|
|
27
27
|
onChange === null || onChange === void 0 ? void 0 : onChange(event, value);
|
|
28
28
|
};
|
|
29
|
-
return (_jsx(MuiRadioGroup, Object.assign({ onChange: handleChange, sx: Object.assign({ display: 'flex', flexDirection: layout === 'horizontal' ? 'row' : 'column', gap: spacing }, sx) }, props, { children: options.map((option) => (_jsx(RadioItem, { option: option, size: size, customLabelRenderer: customLabelRenderer, labelPosition: labelPosition, showHoverEffects: showHoverEffects, customRadioProps: customRadioProps, labelSx: labelSx },
|
|
29
|
+
return (_jsx(MuiRadioGroup, Object.assign({ onChange: handleChange, sx: Object.assign({ display: 'flex', flexDirection: layout === 'horizontal' ? 'row' : 'column', gap: spacing }, sx) }, props, { children: options.map((option) => (_jsx(RadioItem, { option: option, size: size, customLabelRenderer: customLabelRenderer, labelPosition: labelPosition, showHoverEffects: showHoverEffects, customRadioProps: customRadioProps, labelSx: labelSx }, option.value))) })));
|
|
30
30
|
}
|
|
31
31
|
export default memo(RadioGroup);
|
|
@@ -3,7 +3,7 @@ import { RadioGroupProps } from '@mui/material/RadioGroup';
|
|
|
3
3
|
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
4
4
|
import { RadioButtonProps } from '../RadioButton/type';
|
|
5
5
|
export interface RadioOption {
|
|
6
|
-
value: string
|
|
6
|
+
value: string;
|
|
7
7
|
label: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
description?: string;
|
|
@@ -24,7 +24,7 @@ function ColumnFilter(filter) {
|
|
|
24
24
|
const showClearIcon = useMemo(() => Object.values(filterData || {}).some((value) => {
|
|
25
25
|
if (typeof value === 'string' || Array.isArray(value))
|
|
26
26
|
return value.length > 0;
|
|
27
|
-
return
|
|
27
|
+
return value !== undefined && value !== null;
|
|
28
28
|
}) || listFilterData.length > 0, [filterData, listFilterData]);
|
|
29
29
|
const open = Boolean(anchorEl);
|
|
30
30
|
const filterApiKeys = useMemo(() => {
|
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.196-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.196-test.5",
|
|
5
|
+
"testVersion": 5,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|