@tap-payments/os-micro-frontend-shared 0.1.134 → 0.1.135-test.2
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.
- package/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/BackgroundAnimation/BackgroundAnimation.js +28 -0
- package/build/components/BackgroundAnimation/Blob/Blob.js +2 -0
- package/build/components/Chip/style.js +1 -0
- package/build/components/ColorPicker/HexaFields.js +4 -0
- package/build/components/ColorPicker/style.js +1 -1
- package/build/components/Dialog/style.js +1 -0
- package/build/components/Dropdown2/style.js +2 -0
- package/build/components/HeatMap/constant.js +1 -1
- package/build/components/InputBase/AmountInputBase/CurrencyList/style.js +3 -0
- package/build/components/InputBase/PhoneInputBase/CountriesList/CountriesList.js +1 -1
- package/build/components/InputBase/PhoneInputBase/CountriesList/style.js +3 -0
- package/build/components/InputBase/SelectBase/SelectBase.js +1 -0
- package/build/components/InputBase/SelectBase/SelectBaseMultiple.js +3 -0
- package/build/components/InputBase/SelectBase/style.js +3 -2
- package/build/components/InputNumber/InputNumber.js +2 -0
- package/build/components/Inputs/Input/style.js +6 -2
- package/build/components/Inputs/Select/Select.js +1 -0
- package/build/components/Inputs/Select/style.js +3 -2
- package/build/components/JSONViewer/JSONViewer.js +10 -2
- package/build/components/JSONViewer/context/Provider.js +2 -0
- package/build/components/LeftPeekRightExpandingChip/LeftPeekRightExpandingChip.d.ts +10 -0
- package/build/components/LeftPeekRightExpandingChip/LeftPeekRightExpandingChip.js +14 -1
- package/build/components/LeftPeekRightExpandingChip/style.js +1 -0
- package/build/components/LeftPeekRightExpandingChip/useLeftPeekRightExpandingChip.js +30 -2
- package/build/components/MultiSelectStatusButton/MultiSelectStatusButton.js +3 -0
- package/build/components/NestedDropdown/Dropdown.js +3 -0
- package/build/components/RFH/Inputs/FormInput/FormInput.js +1 -0
- package/build/components/RFH/Inputs/MultiSelect/MultiSelect.js +1 -0
- package/build/components/RangeCalender/RangeCalender.js +1 -0
- package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.js +3 -1
- package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.d.ts +32 -0
- package/build/components/RightLeftExpandingCenterChip/RightLeftExpandingCenterChip.js +36 -2
- package/build/components/RightLeftExpandingCenterChip/style.js +25 -4
- package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.d.ts +5 -0
- package/build/components/RightLeftExpandingCenterChip/useRightLeftExpandingCenterChip.js +53 -1
- package/build/components/ScrollLoader/ScrollLoader.js +2 -1
- package/build/components/StatusButton/StatusButton.js +11 -3
- package/build/components/StatusButton/constant.js +3 -1
- package/build/components/StatusButton/style.d.ts +2 -1
- package/build/components/StatusButton/type.d.ts +13 -1
- package/build/components/StatusIcons/AuthIcons/constants.js +5 -0
- package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.js +11 -0
- package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.js +11 -0
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +3 -1
- package/build/components/TableCells/CustomCells/BrandCell/BrandCell.js +1 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/ReferenceCell.js +3 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStateIcon.js +1 -0
- package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +3 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/SourceMergedCell.js +7 -1
- package/build/components/TableCells/CustomCells/StatusCell/StatusCell.js +1 -0
- package/build/components/TableView/CustomViews.js +2 -0
- package/build/components/TableView/TableView.js +1 -0
- package/build/components/Timepicker/Timepicker.js +1 -0
- package/build/components/Timepicker/utils.js +9 -5
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +46 -18
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +5 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.js +6 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/index.d.ts +1 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/index.js +1 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePerformanceOptimizations.d.ts +19 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePerformanceOptimizations.js +89 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.js +2 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableData.js +1 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useTableState.js +3 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +1 -23
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.js +25 -21
- package/build/components/VirtualTables/SheetViewVirtualTable/style.js +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +12 -2
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +6 -1
- package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.js +1 -0
- package/build/components/VirtualTables/components/TableFooter/TableFooter.js +9 -0
- package/build/components/VirtualTables/components/TableRow.js +25 -18
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.js +3 -1
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapperWithCard.js +2 -0
- package/build/components/VirtualTables/components/virtualScroll/VirtualScrollList.js +16 -1
- package/build/components/Widget/style.js +1 -0
- package/build/components/Window/style.js +1 -0
- package/build/components/index.d.ts +2 -1
- package/build/components/index.js +2 -1
- package/build/constants/assets.js +4 -0
- package/build/constants/server.js +1 -0
- package/build/constants/table.d.ts +1 -1
- package/build/constants/table.js +1 -1
- package/build/hooks/useCountdown.js +4 -0
- package/build/hooks/useStickyHeaderShadow.js +6 -0
- package/build/utils/api.js +3 -0
- package/build/utils/array.js +5 -1
- package/build/utils/billing.js +1 -0
- package/build/utils/country.js +1 -0
- package/build/utils/currency.js +6 -0
- package/build/utils/date.d.ts +5 -0
- package/build/utils/date.js +31 -3
- package/build/utils/encrypt.js +3 -1
- package/build/utils/error.js +2 -0
- package/build/utils/freshdesk.js +2 -0
- package/build/utils/geography.js +1 -1
- package/build/utils/localStorage.js +7 -0
- package/build/utils/merchant.js +3 -0
- package/build/utils/number.js +1 -0
- package/build/utils/segment.js +1 -0
- package/build/utils/string.d.ts +7 -0
- package/build/utils/string.js +10 -0
- package/build/utils/style.d.ts +13 -2
- package/build/utils/style.js +30 -2
- package/build/utils/table.js +1 -1
- package/build/utils/url.js +2 -0
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Tap Payments
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tap Payments
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# os-micro-frontend-shared
|
|
2
|
-
|
|
3
|
-
## Publishing Workflow
|
|
4
|
-
|
|
5
|
-
1. Update version in package.json
|
|
6
|
-
2. Commit changes
|
|
7
|
-
3. Create and push a tag:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm version patch # or minor, major
|
|
11
|
-
git push origin main --tags
|
|
12
|
-
```
|
|
1
|
+
# os-micro-frontend-shared
|
|
2
|
+
|
|
3
|
+
## Publishing Workflow
|
|
4
|
+
|
|
5
|
+
1. Update version in package.json
|
|
6
|
+
2. Commit changes
|
|
7
|
+
3. Create and push a tag:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm version patch # or minor, major
|
|
11
|
+
git push origin main --tags
|
|
12
|
+
```
|
|
@@ -11,6 +11,34 @@ const Wrapper = styled(Box)(({ theme }) => ({
|
|
|
11
11
|
width: '100%',
|
|
12
12
|
height: '100%',
|
|
13
13
|
backgroundColor: theme.palette.grey[100],
|
|
14
|
+
// '.blob_right': {
|
|
15
|
+
// animation: 'right 35s ease infinite alternate'
|
|
16
|
+
// },
|
|
17
|
+
// '.blob_left': {
|
|
18
|
+
// animation: 'left 35s ease infinite alternate'
|
|
19
|
+
// },
|
|
20
|
+
// '@keyframes right': {
|
|
21
|
+
// '0%': {
|
|
22
|
+
// transform: 'translate(0, 0) scale(1)'
|
|
23
|
+
// },
|
|
24
|
+
// '50%': {
|
|
25
|
+
// transform: 'translate(-50%, -200%) scale(1.5)'
|
|
26
|
+
// },
|
|
27
|
+
// '100%': {
|
|
28
|
+
// transform: 'translate(0, 0) scale(1)'
|
|
29
|
+
// }
|
|
30
|
+
// },
|
|
31
|
+
// '@keyframes left': {
|
|
32
|
+
// '0%': {
|
|
33
|
+
// transform: 'translate(0, 0) scale(1)'
|
|
34
|
+
// },
|
|
35
|
+
// '50%': {
|
|
36
|
+
// transform: 'translate(50%, 100%) scale(1.5)'
|
|
37
|
+
// },
|
|
38
|
+
// '100%': {
|
|
39
|
+
// transform: 'translate(0, 0) scale(1)'
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
14
42
|
}));
|
|
15
43
|
function BackgroundAnimation({ gradient = 'purpleBlue', blobHeight = '30vw', blobWidth = '30vw' }) {
|
|
16
44
|
return (_jsxs(Wrapper, Object.assign({ "aria-label": "Background-Animation-section", className: "blobContainer", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }, { children: [_jsx(Blob, { "aria-label": "Background-Animation-Blob-right", gradient: gradient, width: blobWidth, height: blobHeight, className: "blob_right", style: {
|
|
@@ -26,6 +26,8 @@ const Wrapper = styled(Box)(() => ({
|
|
|
26
26
|
function Blob(_a) {
|
|
27
27
|
var { gradient = 'blueGreen', height = 500, width = 500, style } = _a, props = __rest(_a, ["gradient", "height", "width", "style"]);
|
|
28
28
|
const theme = useTheme();
|
|
29
|
+
// TODO: need to add direction of gradient translate.
|
|
30
|
+
// example Blob one will have a translateX of 100% and Blob two will have a translateX of -100%.
|
|
29
31
|
return (_jsx(Wrapper, Object.assign({}, props, { className: props.className || '', sx: Object.assign({ backgroundImage: theme.palette.background.gradient[gradient], width,
|
|
30
32
|
height }, style) })));
|
|
31
33
|
}
|
|
@@ -49,6 +49,7 @@ export const SourcesContainer = styled(motion.span)(({ sourcesCount }) => ({
|
|
|
49
49
|
backgroundColor: 'transparent',
|
|
50
50
|
borderRadius: '16px',
|
|
51
51
|
}));
|
|
52
|
+
// eslint-disable-next-line react-refresh/only-export-components
|
|
52
53
|
export const defaultGetSourceAnimation = (params) => {
|
|
53
54
|
const { index, xDelta = 39, shadow, itemsCount = 0, expandDirection = 'RIGHT' } = params;
|
|
54
55
|
const startDisplacement = (itemsCount - 1) * 6;
|
|
@@ -13,6 +13,7 @@ const HexaFields = ({ value, onChange }) => {
|
|
|
13
13
|
}, [value]);
|
|
14
14
|
const [hexInput, setHexInput] = useState(colorAsHex);
|
|
15
15
|
const alphaPercent = Math.round(value.a * 100);
|
|
16
|
+
// Sync hexInput whenever `value` changes externally
|
|
16
17
|
useEffect(() => {
|
|
17
18
|
const newHex = Color.rgb(value.r, value.g, value.b).hex().replace('#', '');
|
|
18
19
|
setHexInput(newHex);
|
|
@@ -26,6 +27,7 @@ const HexaFields = ({ value, onChange }) => {
|
|
|
26
27
|
const handleHexBlur = () => {
|
|
27
28
|
let formattedValue = hexInput;
|
|
28
29
|
if (formattedValue.length === 3) {
|
|
30
|
+
// Expand shorthand like FFF -> FFFFFF
|
|
29
31
|
formattedValue = formattedValue
|
|
30
32
|
.split('')
|
|
31
33
|
.map((ch) => ch + ch)
|
|
@@ -43,10 +45,12 @@ const HexaFields = ({ value, onChange }) => {
|
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
catch (_a) {
|
|
48
|
+
// invalid hex -> revert to current value
|
|
46
49
|
setHexInput(colorAsHex);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
else {
|
|
53
|
+
// revert to current value if incomplete
|
|
50
54
|
setHexInput(colorAsHex);
|
|
51
55
|
}
|
|
52
56
|
};
|
|
@@ -28,6 +28,7 @@ export const DialogContent = styled(Box)(({ theme }) => ({
|
|
|
28
28
|
export const DialogHeader = styled(Box)(({ theme }) => ({
|
|
29
29
|
minHeight: 95,
|
|
30
30
|
background: theme.palette.grey[400],
|
|
31
|
+
// backdropFilter: 'blur(4px)',
|
|
31
32
|
paddingInline: '24px',
|
|
32
33
|
paddingTop: '23px',
|
|
33
34
|
paddingBottom: '23px',
|
|
@@ -12,11 +12,13 @@ export const Info = styled(Box)(() => ({
|
|
|
12
12
|
export const Label = styled(Box)(() => ({
|
|
13
13
|
fontWeight: 600,
|
|
14
14
|
fontSize: '8px',
|
|
15
|
+
// lineHeight: '10.93px',
|
|
15
16
|
color: '#8D8D94',
|
|
16
17
|
}));
|
|
17
18
|
export const Value = styled(Box)(({ theme }) => ({
|
|
18
19
|
fontWeight: 500,
|
|
19
20
|
fontSize: '11px',
|
|
20
21
|
lineHeight: 1.1,
|
|
22
|
+
// lineHeight: '15.03px',
|
|
21
23
|
color: theme.palette.text.primary,
|
|
22
24
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const COLOR_OPACITY_DEGREE = [0.06, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0];
|
|
1
|
+
export const COLOR_OPACITY_DEGREE = [0.06, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]; // 0 - 10 so we have a fixed color degrees as per the design
|
|
@@ -10,6 +10,9 @@ export const CurrencyButton = styled('button')(({ theme }) => ({
|
|
|
10
10
|
cursor: 'pointer',
|
|
11
11
|
}));
|
|
12
12
|
export const CurrenciesWrapper = styled(Popper)(({ theme }) => ({
|
|
13
|
+
// position: 'absolute',
|
|
14
|
+
// top: 30,
|
|
15
|
+
// left: 0,
|
|
13
16
|
zIndex: 99,
|
|
14
17
|
backgroundColor: theme.palette.common.white,
|
|
15
18
|
padding: '4px 8px',
|
|
@@ -51,7 +51,7 @@ function CountriesList({ isLoading, countries, value: countryValue, onCountryCha
|
|
|
51
51
|
border: 'none',
|
|
52
52
|
height: 34,
|
|
53
53
|
paddingInlineStart: '8px',
|
|
54
|
-
} }, { children: isLoading ? (_jsx(Skeleton, { variant: "rectangular", width: 56.5, height: 20, sx: { borderRadius: '4px' } })) : (_jsxs(_Fragment, { children: [selectedCountry && (_jsxs(_Fragment, { children: [_jsx("img", { src: selectedCountry.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.idd_prefix}` })] })), required && _jsx(Required, Object.assign({ component: "span" }, { children: "*" })), _jsx(Box, { component: "img", src: downArrowIcon, alt: "d", className: "arrow", sx: Object.assign({}, (open && { transform: 'rotate(180deg)' })) })] })) })), open && _jsx(CustomBackdrop, { onClick: closeDropdown }), open && (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeDropdown }, { children: _jsxs(CountriesWrapper, Object.assign({ id: "CountriesList_CountriesWrapper", open: open, anchorEl: anchorEl, "data-testid": "CountriesList_CountriesWrapper", placement: "bottom-start" }, { children: [_jsx(InputStyled, { endAdornment: _jsx("img", { src: searchIcon, alt: "arrow" }), onChange: handleSearch, hideArrows: true, "data-testid": "CountriesList_InputStyled", value: searchValue }), _jsx(CountriesListStyled, Object.assign({ "data-testid": "CountriesList_CountriesListStyled" }, { children: filteredCountries.map((country) => {
|
|
54
|
+
} }, { children: isLoading ? (_jsx(Skeleton, { variant: "rectangular", width: 56.5, height: 20, sx: { borderRadius: '4px' } })) : (_jsxs(_Fragment, { children: [selectedCountry && (_jsxs(_Fragment, { children: [_jsx("img", { src: selectedCountry.logo, alt: "c", className: "logo" }), _jsx("span", { children: `+${selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.idd_prefix}` })] })), required && _jsx(Required, Object.assign({ component: "span" }, { children: "*" })), _jsx(Box, { component: "img", src: downArrowIcon, alt: "d", className: "arrow", sx: Object.assign({}, (open && { transform: 'rotate(180deg)' })) })] })) })), open && _jsx(CustomBackdrop, { onClick: closeDropdown, sx: { zIndex: 9999 } }), open && (_jsx(ClickAwayListener, Object.assign({ onClickAway: closeDropdown }, { children: _jsxs(CountriesWrapper, Object.assign({ id: "CountriesList_CountriesWrapper", open: open, anchorEl: anchorEl, "data-testid": "CountriesList_CountriesWrapper", placement: "bottom-start" }, { children: [_jsx(InputStyled, { endAdornment: _jsx("img", { src: searchIcon, alt: "arrow" }), onChange: handleSearch, hideArrows: true, "data-testid": "CountriesList_InputStyled", value: searchValue }), _jsx(CountriesListStyled, Object.assign({ "data-testid": "CountriesList_CountriesListStyled" }, { children: filteredCountries.map((country) => {
|
|
55
55
|
const isSelected = (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.countryId) === country.countryId;
|
|
56
56
|
return (_jsxs(CountryStyled, Object.assign({ onClick: () => {
|
|
57
57
|
handleOnCountryChange(country);
|
|
@@ -12,6 +12,9 @@ export const CountryButton = styled('button')(({ theme, disabled }) => ({
|
|
|
12
12
|
opacity: disabled ? 0.5 : 1,
|
|
13
13
|
}));
|
|
14
14
|
export const CountriesWrapper = styled(Popper)(({ theme }) => ({
|
|
15
|
+
// position: 'absolute',
|
|
16
|
+
// top: 30,
|
|
17
|
+
// left: 0,
|
|
15
18
|
zIndex: 9999,
|
|
16
19
|
backgroundColor: theme.palette.common.white,
|
|
17
20
|
padding: '4px 8px',
|
|
@@ -18,6 +18,7 @@ import { FormControlStyles, StyledErrorMessage, MuiSelect, Wrapper } from './sty
|
|
|
18
18
|
function SelectBase(_a, ref) {
|
|
19
19
|
var _b;
|
|
20
20
|
var { required, hasError, label, value, helperText, onChange, options, isOptionEqualToValue, renderOption, getOptionValue, isLoading, children, getOptionLabel } = _a, props = __rest(_a, ["required", "hasError", "label", "value", "helperText", "onChange", "options", "isOptionEqualToValue", "renderOption", "getOptionValue", "isLoading", "children", "getOptionLabel"]);
|
|
21
|
+
// eslint-disable-next-line
|
|
21
22
|
const handleChange = (option) => {
|
|
22
23
|
onChange === null || onChange === void 0 ? void 0 : onChange(option);
|
|
23
24
|
};
|
|
@@ -18,13 +18,16 @@ import { FormControlStyles, StyledErrorMessage, MuiSelect, Wrapper } from './sty
|
|
|
18
18
|
function SelectBaseMultiple(_a, ref) {
|
|
19
19
|
var _b;
|
|
20
20
|
var { required, hasError, label, value, helperText, onChange, options, isOptionEqualToValue, renderOption, getOptionValue, isLoading, children, getOptionLabel } = _a, props = __rest(_a, ["required", "hasError", "label", "value", "helperText", "onChange", "options", "isOptionEqualToValue", "renderOption", "getOptionValue", "isLoading", "children", "getOptionLabel"]);
|
|
21
|
+
// eslint-disable-next-line
|
|
21
22
|
const handleChange = (option) => {
|
|
22
23
|
onChange === null || onChange === void 0 ? void 0 : onChange(option);
|
|
23
24
|
};
|
|
24
25
|
const getMultipleValues = () => {
|
|
26
|
+
// eslint-disable-next-line
|
|
25
27
|
return getOptionValue ? value === null || value === void 0 ? void 0 : value.map(getOptionValue) : value === null || value === void 0 ? void 0 : value.map((v) => v === null || v === void 0 ? void 0 : v.id);
|
|
26
28
|
};
|
|
27
29
|
const selectedOptions = useMemo(() => options === null || options === void 0 ? void 0 : options.filter((option) => {
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
31
|
return value === null || value === void 0 ? void 0 : value.some((v) => {
|
|
29
32
|
return isOptionEqualToValue ? isOptionEqualToValue(option, v) : option.id === (v === null || v === void 0 ? void 0 : v.id);
|
|
30
33
|
});
|
|
@@ -43,10 +43,10 @@ export const StyledSelect = styled(Select)(({ theme }) => ({
|
|
|
43
43
|
},
|
|
44
44
|
'& .MuiOutlinedInput-root': {
|
|
45
45
|
'& fieldset': {
|
|
46
|
-
borderColor: 'rgba(0, 0, 0, 0.23)',
|
|
46
|
+
borderColor: 'rgba(0, 0, 0, 0.23)', // default
|
|
47
47
|
},
|
|
48
48
|
'&.Mui-focused fieldset': {
|
|
49
|
-
border: '2px solid red',
|
|
49
|
+
border: '2px solid red', // focus
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
minWidth: 52,
|
|
@@ -56,6 +56,7 @@ export const StyledSelect = styled(Select)(({ theme }) => ({
|
|
|
56
56
|
'& .MuiFormLabel-asterisk': {
|
|
57
57
|
color: 'red',
|
|
58
58
|
},
|
|
59
|
+
// style form label
|
|
59
60
|
'& .MuiFormLabel-root': {
|
|
60
61
|
fontSize: '10px',
|
|
61
62
|
fontStyle: 'normal',
|
|
@@ -25,6 +25,7 @@ function InputNumber(_a, ref) {
|
|
|
25
25
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(evt);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
+
// eslint-disable-next-line
|
|
28
29
|
if (isSafari && isNaN(evt.key) && evt.key !== 'Backspace') {
|
|
29
30
|
evt.preventDefault();
|
|
30
31
|
}
|
|
@@ -32,6 +33,7 @@ function InputNumber(_a, ref) {
|
|
|
32
33
|
return (_jsx(Box, Object.assign({ sx: { flexGrow: 1 }, onClick: (e) => {
|
|
33
34
|
e.stopPropagation();
|
|
34
35
|
} }, { children: _jsx(InputStyled, Object.assign({}, props, { ref: ref, value: props.value || '', placeholder: props.placeholder, hideArrows: true, isError: isError, disableUnderline: true, inputProps: Object.assign(Object.assign({}, inputProps), { type: 'number' }), onKeyDown: handleKeyDown, onWheel: (e) => {
|
|
36
|
+
// eslint-disable-next-line
|
|
35
37
|
e.target instanceof HTMLElement && e.target.blur();
|
|
36
38
|
} })) })));
|
|
37
39
|
}
|
|
@@ -23,7 +23,9 @@ export const StyledInput = styled(TextField, {
|
|
|
23
23
|
border: '1px solid green',
|
|
24
24
|
}, '&.Mui-focused fieldset': {
|
|
25
25
|
border: '1px solid blue',
|
|
26
|
-
}, border: '1px solid #F2F2F2', borderRadius: '4px',
|
|
26
|
+
}, border: '1px solid #F2F2F2', borderRadius: '4px',
|
|
27
|
+
// input style
|
|
28
|
+
'& .MuiInputBase-input': {
|
|
27
29
|
margin: '0px !important',
|
|
28
30
|
padding: '0px !important',
|
|
29
31
|
color: '#20232B !important',
|
|
@@ -31,7 +33,9 @@ export const StyledInput = styled(TextField, {
|
|
|
31
33
|
fontStyle: 'normal !important',
|
|
32
34
|
fontWeight: '500 !important',
|
|
33
35
|
lineHeight: '130% !important',
|
|
34
|
-
},
|
|
36
|
+
},
|
|
37
|
+
// style form label
|
|
38
|
+
'& .MuiFormLabel-root': {
|
|
35
39
|
fontSize: '10px',
|
|
36
40
|
fontStyle: 'normal',
|
|
37
41
|
fontWeight: 500,
|
|
@@ -5,6 +5,7 @@ export const StyledSelect = styled(Select)(({ theme }) => ({
|
|
|
5
5
|
color: theme.palette.common.black,
|
|
6
6
|
borderRadius: '4px',
|
|
7
7
|
boxShadow: '0px 0px 6px 0px rgba(0, 0, 0, 0.11);',
|
|
8
|
+
// padding: '4px 8px',
|
|
8
9
|
height: '32px',
|
|
9
10
|
border: 'none',
|
|
10
11
|
outline: 'none',
|
|
@@ -14,10 +15,10 @@ export const StyledSelect = styled(Select)(({ theme }) => ({
|
|
|
14
15
|
},
|
|
15
16
|
'& .MuiOutlinedInput-root': {
|
|
16
17
|
'& fieldset': {
|
|
17
|
-
borderColor: 'rgba(0, 0, 0, 0.23)',
|
|
18
|
+
borderColor: 'rgba(0, 0, 0, 0.23)', // default
|
|
18
19
|
},
|
|
19
20
|
'&.Mui-focused fieldset': {
|
|
20
|
-
border: '2px solid red',
|
|
21
|
+
border: '2px solid red', // focus
|
|
21
22
|
},
|
|
22
23
|
},
|
|
23
24
|
}));
|
|
@@ -201,7 +201,11 @@ export default function JSONViewer({ index, json, requestJson = {}, isWindowMini
|
|
|
201
201
|
if (!keyName) {
|
|
202
202
|
return _jsx("span", {});
|
|
203
203
|
}
|
|
204
|
-
} }), _jsx(JsonView.Copied
|
|
204
|
+
} }), _jsx(JsonView.Copied
|
|
205
|
+
// @ts-expect-error Type is not supported
|
|
206
|
+
, {
|
|
207
|
+
// @ts-expect-error Type is not supported
|
|
208
|
+
render: ({ 'data-copied': copied, style, onClick }, { keyName }) => {
|
|
205
209
|
if (!keyName) {
|
|
206
210
|
return _jsx("span", {});
|
|
207
211
|
}
|
|
@@ -253,7 +257,11 @@ export default function JSONViewer({ index, json, requestJson = {}, isWindowMini
|
|
|
253
257
|
if (!keyName) {
|
|
254
258
|
return _jsx("span", {});
|
|
255
259
|
}
|
|
256
|
-
} }), _jsx(JsonView.Copied
|
|
260
|
+
} }), _jsx(JsonView.Copied
|
|
261
|
+
// @ts-expect-error Type is not supported
|
|
262
|
+
, {
|
|
263
|
+
// @ts-expect-error Type is not supported
|
|
264
|
+
render: ({ 'data-copied': copied, style, onClick }, { keyName }) => {
|
|
257
265
|
if (!keyName) {
|
|
258
266
|
return _jsx("span", {});
|
|
259
267
|
}
|
|
@@ -11,9 +11,11 @@ export const JsonViewerDialogContextProvider = ({ children }) => {
|
|
|
11
11
|
alert('Maximum allowed active Json Viewer is 7 per table.');
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
+
// Prevent duplicate JsonViewer that's currently open
|
|
14
15
|
if (jsonViewerList.some((item) => item.json.id === jsonViewer.json.id)) {
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
18
|
+
// Create a copy to avoid mutating the original object
|
|
17
19
|
const jsonCopy = structuredClone(jsonViewer.json);
|
|
18
20
|
const requestData = jsonCopy.request_body;
|
|
19
21
|
const jsonViewerPreservedRequest = {
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { type LeftPeekRightExpandingChipProps } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* LeftPeekRightExpandingChip
|
|
4
|
+
*
|
|
5
|
+
* Renders the last item of `icons` in a main chip and the remaining items as a vertical,
|
|
6
|
+
* left‑aligned peek stack (collapsed to 24px). Hovering the main chip reveals and expands
|
|
7
|
+
* the peek chips to the right and shifts the main chip accordingly. The top‑most peek chip
|
|
8
|
+
* stays anchored while the rest slide out to the right preserving the original order.
|
|
9
|
+
* Uses Framer Motion for smooth enter/leave and x‑translation, with z-index control via `expandedZIndex`.
|
|
10
|
+
* Peek chip content is rendered only on hover to minimize layout work.
|
|
11
|
+
*/
|
|
2
12
|
export default function LeftPeekRightExpandingChip({ icons, expandedZIndex, sx }: LeftPeekRightExpandingChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,15 +3,28 @@ import Box from '@mui/material/Box';
|
|
|
3
3
|
import { AnimatePresence } from 'framer-motion';
|
|
4
4
|
import { Root, Container, PeekStack, PeekChip, MainChip, tableCellSx } from './style';
|
|
5
5
|
import { useLeftPeekRightExpandingChip } from './useLeftPeekRightExpandingChip';
|
|
6
|
+
/**
|
|
7
|
+
* LeftPeekRightExpandingChip
|
|
8
|
+
*
|
|
9
|
+
* Renders the last item of `icons` in a main chip and the remaining items as a vertical,
|
|
10
|
+
* left‑aligned peek stack (collapsed to 24px). Hovering the main chip reveals and expands
|
|
11
|
+
* the peek chips to the right and shifts the main chip accordingly. The top‑most peek chip
|
|
12
|
+
* stays anchored while the rest slide out to the right preserving the original order.
|
|
13
|
+
* Uses Framer Motion for smooth enter/leave and x‑translation, with z-index control via `expandedZIndex`.
|
|
14
|
+
* Peek chip content is rendered only on hover to minimize layout work.
|
|
15
|
+
*/
|
|
6
16
|
export default function LeftPeekRightExpandingChip({ icons = [], expandedZIndex = 1000, sx }) {
|
|
7
17
|
const { handleMouseEnter, handleRootMouseLeave, rootRef, mainChipRef, isHovering, peekItems, mainShiftX, mainIcon } = useLeftPeekRightExpandingChip({ icons });
|
|
8
|
-
return (_jsx(Box, Object.assign({ sx: Object.assign(Object.assign({}, tableCellSx), sx), "data-testid": "LeftPeekRightExpandingChipBox" }, { children: _jsx(Root, Object.assign({ ref: rootRef, onMouseLeave: handleRootMouseLeave, onMouseEnter: handleMouseEnter }, { children: _jsxs(Container, Object.assign({ "data-testid": "Container", initial: false }, { children: [_jsx(PeekStack, Object.assign({ "data-testid": "PeekStack",
|
|
18
|
+
return (_jsx(Box, Object.assign({ sx: Object.assign(Object.assign({}, tableCellSx), sx), "data-testid": "LeftPeekRightExpandingChipBox" }, { children: _jsx(Root, Object.assign({ ref: rootRef, onMouseLeave: handleRootMouseLeave, onMouseEnter: handleMouseEnter }, { children: _jsxs(Container, Object.assign({ "data-testid": "Container", initial: false }, { children: [_jsx(PeekStack, Object.assign({ "data-testid": "PeekStack",
|
|
19
|
+
// Allow the expanded chips area to keep hover active
|
|
20
|
+
onMouseEnter: handleMouseEnter, onMouseLeave: handleRootMouseLeave, style: { pointerEvents: isHovering ? 'auto' : 'none' } }, { children: _jsx(AnimatePresence, Object.assign({ initial: false }, { children: peekItems.map(({ key, rIdx, offX, hoverX, zIndex, refCb, content }) => (_jsx(PeekChip, Object.assign({ "data-testid": `LeftPeekChip-${rIdx}`, ref: refCb, initial: { opacity: 0, scale: 0.95, x: offX, y: 0 }, animate: { opacity: 1, scale: 1, x: isHovering ? hoverX : offX, y: 0 }, exit: { opacity: 0, scale: 0.95, x: offX, y: 0 }, transition: { duration: 0.18, ease: 'easeOut' }, style: {
|
|
9
21
|
zIndex,
|
|
10
22
|
width: isHovering ? 'auto' : 24,
|
|
11
23
|
minWidth: 24,
|
|
12
24
|
padding: isHovering ? '0 6px' : 0,
|
|
13
25
|
whiteSpace: 'nowrap',
|
|
14
26
|
overflow: isHovering ? 'visible' : 'hidden',
|
|
27
|
+
// Make the expanded chip area interactive to preserve hover
|
|
15
28
|
pointerEvents: isHovering ? 'auto' : 'none',
|
|
16
29
|
} }, { children: isHovering && _jsx(_Fragment, { children: content }) }), key))) })) })), _jsx(MainChip, Object.assign({ "data-testid": "MainChip", ref: mainChipRef, style: { zIndex: expandedZIndex + 10, padding: '0 6px' }, initial: false, animate: { x: isHovering ? mainShiftX : 0 }, transition: { duration: 0.18, ease: 'easeOut' } }, { children: mainIcon }))] })) })) })));
|
|
17
30
|
}
|
|
@@ -24,6 +24,7 @@ export const PeekStack = styled('div')(() => ({
|
|
|
24
24
|
export const PeekChip = styled(motion.div)(({ theme }) => ({
|
|
25
25
|
border: `1px solid ${theme.palette.divider}`,
|
|
26
26
|
borderRadius: 12,
|
|
27
|
+
// width controlled in component to switch between 24 and auto
|
|
27
28
|
height: 24,
|
|
28
29
|
display: 'flex',
|
|
29
30
|
alignItems: 'center',
|
|
@@ -2,19 +2,30 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
2
2
|
import { CHIP_GAP, DEFAULT_CHIP_MIN_WIDTH } from './style';
|
|
3
3
|
export function useLeftPeekRightExpandingChip({ icons }) {
|
|
4
4
|
var _a;
|
|
5
|
+
// ======================
|
|
6
|
+
// State
|
|
7
|
+
// ======================
|
|
5
8
|
const [isHovering, setIsHovering] = useState(false);
|
|
6
9
|
const [rightWidths, setRightWidths] = useState([]);
|
|
10
|
+
// ======================
|
|
11
|
+
// Refs (DOM and timers)
|
|
12
|
+
// ======================
|
|
7
13
|
const rootRef = useRef(null);
|
|
8
14
|
const mainChipRef = useRef(null);
|
|
9
15
|
const rightChipRefs = useRef([]);
|
|
10
16
|
const hoverTimeoutRef = useRef(null);
|
|
17
|
+
// Prepare icons: last is MainChip, the rest are peeks
|
|
11
18
|
const safeIcons = icons !== null && icons !== void 0 ? icons : [];
|
|
12
19
|
const lastIndex = Math.max(0, ((_a = safeIcons.length) !== null && _a !== void 0 ? _a : 1) - 1);
|
|
13
20
|
const mainIcon = safeIcons[lastIndex];
|
|
14
21
|
const peekIcons = safeIcons.slice(0, lastIndex);
|
|
22
|
+
// ======================
|
|
23
|
+
// Computed values
|
|
24
|
+
// ======================
|
|
15
25
|
const { peekItems, mainShiftX, guardLeft, guardWidth } = useMemo(() => {
|
|
16
26
|
const n = peekIcons.length;
|
|
17
27
|
const measured = rightWidths.length === n && rightWidths.every((w) => w > 0);
|
|
28
|
+
// Anchor stacked offset for all peeks
|
|
18
29
|
const anchorOffXAll = -6 * n;
|
|
19
30
|
const totalPeekWidth = measured ? rightWidths.reduce((acc, w) => acc + w, 0) : n * DEFAULT_CHIP_MIN_WIDTH;
|
|
20
31
|
const gapsTotal = Math.max(0, n - 1) * CHIP_GAP;
|
|
@@ -42,10 +53,14 @@ export function useLeftPeekRightExpandingChip({ icons }) {
|
|
|
42
53
|
content: peekIcons[origIdx],
|
|
43
54
|
});
|
|
44
55
|
}
|
|
56
|
+
// Guard box covers the full horizontal span of the expanded peeks
|
|
45
57
|
const guardLeft = anchorOffXEach;
|
|
46
58
|
const guardWidth = totalPeekWidth + gapsTotal;
|
|
47
59
|
return { peekItems: items, mainShiftX: mainShift, guardLeft, guardWidth };
|
|
48
60
|
}, [peekIcons, rightWidths, isHovering]);
|
|
61
|
+
// ======================
|
|
62
|
+
// Callbacks
|
|
63
|
+
// ======================
|
|
49
64
|
const clearHoverTimeout = useCallback(() => {
|
|
50
65
|
if (hoverTimeoutRef.current) {
|
|
51
66
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -53,8 +68,8 @@ export function useLeftPeekRightExpandingChip({ icons }) {
|
|
|
53
68
|
}
|
|
54
69
|
}, []);
|
|
55
70
|
const measureRightWidths = useCallback(() => {
|
|
56
|
-
const TARGET_PADDING_X = 12;
|
|
57
|
-
const BORDER_X = 2;
|
|
71
|
+
const TARGET_PADDING_X = 12; /* 6px each side when expanded */
|
|
72
|
+
const BORDER_X = 2; /* 1px each side */
|
|
58
73
|
const next = peekIcons.map((_, origIdx) => {
|
|
59
74
|
const el = rightChipRefs.current[origIdx];
|
|
60
75
|
if (!el)
|
|
@@ -77,12 +92,18 @@ export function useLeftPeekRightExpandingChip({ icons }) {
|
|
|
77
92
|
clearHoverTimeout();
|
|
78
93
|
hoverTimeoutRef.current = setTimeout(() => setIsHovering(false), 120);
|
|
79
94
|
}, [clearHoverTimeout]);
|
|
95
|
+
// ======================
|
|
96
|
+
// Effects
|
|
97
|
+
// ======================
|
|
80
98
|
useEffect(() => {
|
|
81
99
|
return () => clearHoverTimeout();
|
|
82
100
|
}, [clearHoverTimeout]);
|
|
101
|
+
// Measure initially and when count changes
|
|
83
102
|
useEffect(() => {
|
|
84
103
|
measureRightWidths();
|
|
104
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
105
|
}, [peekIcons.length]);
|
|
106
|
+
// Re-measure shortly after hover begins to capture dynamic size
|
|
86
107
|
useEffect(() => {
|
|
87
108
|
if (!isHovering)
|
|
88
109
|
return;
|
|
@@ -91,15 +112,22 @@ export function useLeftPeekRightExpandingChip({ icons }) {
|
|
|
91
112
|
});
|
|
92
113
|
return () => window.cancelAnimationFrame(id);
|
|
93
114
|
}, [isHovering, measureRightWidths]);
|
|
115
|
+
// ======================
|
|
116
|
+
// Public API
|
|
117
|
+
// ======================
|
|
94
118
|
return {
|
|
119
|
+
// hover state/handlers
|
|
95
120
|
isHovering,
|
|
96
121
|
handleMouseEnter,
|
|
97
122
|
handleRootMouseLeave,
|
|
123
|
+
// refs
|
|
98
124
|
rootRef,
|
|
99
125
|
mainChipRef,
|
|
126
|
+
// render data
|
|
100
127
|
peekItems,
|
|
101
128
|
mainShiftX,
|
|
102
129
|
mainIcon,
|
|
130
|
+
// guard for hover persistence over gaps
|
|
103
131
|
guardLeft,
|
|
104
132
|
guardWidth,
|
|
105
133
|
};
|
|
@@ -13,6 +13,7 @@ function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChan
|
|
|
13
13
|
const [dropdownWidth, setDropdownWidth] = useState(0);
|
|
14
14
|
const [isHovered, setIsHovered] = useState(false);
|
|
15
15
|
const isOpen = Boolean(anchorEl);
|
|
16
|
+
// Update internal state when props change (but only when dropdown is closed)
|
|
16
17
|
useEffect(() => {
|
|
17
18
|
if (!isOpen) {
|
|
18
19
|
setInternalSelectedValues(selectedValues);
|
|
@@ -27,10 +28,12 @@ function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChan
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
setAnchorEl(buttonRef.current);
|
|
31
|
+
// Set initial dropdown width to prevent shrinking
|
|
30
32
|
const buttonWidth = ((_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) || 200;
|
|
31
33
|
setDropdownWidth(Math.max(buttonWidth, 200));
|
|
32
34
|
};
|
|
33
35
|
const handleClose = () => {
|
|
36
|
+
// To prevent unnecessary updates, we check if the selection has actually changed.
|
|
34
37
|
const hasChanged = JSON.stringify([...internalSelectedValues].sort()) !== JSON.stringify([...selectedValues].sort());
|
|
35
38
|
if (hasChanged) {
|
|
36
39
|
onSelectionChange(internalSelectedValues);
|
|
@@ -38,11 +38,14 @@ function Dropdown(_a) {
|
|
|
38
38
|
return i;
|
|
39
39
|
});
|
|
40
40
|
const newList = updateList(list);
|
|
41
|
+
// update all children
|
|
41
42
|
setList(newList);
|
|
42
43
|
if (updatedList)
|
|
43
44
|
updatedList(newList);
|
|
45
|
+
// notify parent with the new children
|
|
44
46
|
if (onChildrenChange)
|
|
45
47
|
onChildrenChange(newList);
|
|
48
|
+
// notify parent with selected / unselected children
|
|
46
49
|
if (onSelect)
|
|
47
50
|
onSelect(changedChildren);
|
|
48
51
|
}
|
|
@@ -19,6 +19,7 @@ function FormInput(_a) {
|
|
|
19
19
|
return (_jsx(Controller, { name: name, control: control, defaultValue: props.defaultValue, render: ({ field, fieldState }) => {
|
|
20
20
|
var _a;
|
|
21
21
|
return (_jsx(InputBase, Object.assign({}, props, field, { hasError: !!fieldState.error, helperText: helperText !== null && helperText !== void 0 ? helperText : (_a = fieldState.error) === null || _a === void 0 ? void 0 : _a.message, hideArrows: hideArrows, onWheel: (e) => {
|
|
22
|
+
// eslint-disable-next-line
|
|
22
23
|
e.target instanceof HTMLElement && e.target.blur();
|
|
23
24
|
} })));
|
|
24
25
|
} }));
|
|
@@ -23,6 +23,7 @@ export default function MultiSelect(_a) {
|
|
|
23
23
|
field.onChange(e);
|
|
24
24
|
} }, { children: (_b = props.options) === null || _b === void 0 ? void 0 : _b.map((option) => {
|
|
25
25
|
var _a, _b, _c;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
27
|
const isSelected = (_a = field.value) === null || _a === void 0 ? void 0 : _a.some((v) => {
|
|
27
28
|
if (isOptionEqualToValue) {
|
|
28
29
|
return isOptionEqualToValue(v, option);
|
|
@@ -22,6 +22,7 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
|
|
|
22
22
|
const open = Boolean(anchorEl);
|
|
23
23
|
const [isError, setIsError] = useState(false);
|
|
24
24
|
const { t } = useTranslation();
|
|
25
|
+
// eslint-disable-next-line
|
|
25
26
|
const calendarRef = useRef();
|
|
26
27
|
const isHijri = mode === 'hijri';
|
|
27
28
|
const onCloseCalender = () => {
|
|
@@ -16,7 +16,9 @@ import { darkLeftArrowIcon, darkRightArrowIcon } from '../../../../constants/ind
|
|
|
16
16
|
import { ArrowButton } from './style';
|
|
17
17
|
import { getLocale, getCalender } from '../../utils';
|
|
18
18
|
const weekDays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
19
|
-
function RangeDatepicker(_a,
|
|
19
|
+
function RangeDatepicker(_a,
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
ref) {
|
|
20
22
|
var { isAr = false, isHijri, values, onChange, numberOfMonths = 2 } = _a, props = __rest(_a, ["isAr", "isHijri", "values", "onChange", "numberOfMonths"]);
|
|
21
23
|
const getArrow = (direction) => {
|
|
22
24
|
if (direction === 'right') {
|