@tap-payments/os-micro-frontend-shared 0.0.120 → 0.0.122
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/Calender/Calender.d.ts +14 -0
- package/build/components/Calender/Calender.js +54 -0
- package/build/components/Calender/index.d.ts +2 -0
- package/build/components/Calender/index.js +2 -0
- package/build/components/Calender/style.d.ts +32 -0
- package/build/components/Calender/style.js +273 -0
- package/build/components/CountryFlag/CountryFlag.js +2 -2
- package/build/components/MultiSelectStatusButton/MultiSelectStatusButton.js +4 -4
- package/build/components/MultiSelectStatusButton/style.js +6 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/utils/billing.d.ts +1 -1
- package/build/utils/billing.js +1 -1
- package/package.json +132 -132
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
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
|
+
import { PopperPlacementType } from '@mui/material/Popper';
|
|
4
|
+
import { CalendarProps, DateObject } from 'react-multi-date-picker';
|
|
5
|
+
interface CalenderI extends CalendarProps {
|
|
6
|
+
isAr?: boolean;
|
|
7
|
+
value?: DateObject;
|
|
8
|
+
setValue?: (v: DateObject) => void;
|
|
9
|
+
enableTimePicker?: boolean;
|
|
10
|
+
placement?: PopperPlacementType;
|
|
11
|
+
}
|
|
12
|
+
declare function Calender({ isAr, value, setValue, enableTimePicker, placement, ...props }: CalenderI & BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const _default: import("react").MemoExoticComponent<typeof Calender>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { memo, useState } from 'react';
|
|
14
|
+
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
15
|
+
import Popper from '@mui/material/Popper';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
17
|
+
import DatePicker, { Calendar, DateObject } from 'react-multi-date-picker';
|
|
18
|
+
import TimePicker from 'react-multi-date-picker/plugins/time_picker';
|
|
19
|
+
import { darkLeftArrowIcon, darkRightArrowIcon } from '../../constants/index.js';
|
|
20
|
+
import { ArrowButton, CalenderWrapper, SelectedDate, Wrapper, ButtonsWrapper, CancelButton, OkayButton, TimePickerWrapper, FooterButtonsWrapper, } from './style';
|
|
21
|
+
const weekDays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
22
|
+
function Calender(_a) {
|
|
23
|
+
var { isAr = false, value, setValue, enableTimePicker, placement } = _a, props = __rest(_a, ["isAr", "value", "setValue", "enableTimePicker", "placement"]);
|
|
24
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
25
|
+
const [date, setDate] = useState(value ? new DateObject(new Date(value.toLocaleString())) : new DateObject(new Date()));
|
|
26
|
+
const [tempDate, setTempDate] = useState(value ? new DateObject(new Date(value.toLocaleString())) : new DateObject(new Date()));
|
|
27
|
+
const [time, setTime] = useState(new DateObject(new Date().getTime()));
|
|
28
|
+
const { t } = useTranslation();
|
|
29
|
+
const open = Boolean(anchorEl);
|
|
30
|
+
const getArrow = (direction) => {
|
|
31
|
+
if (direction === 'right') {
|
|
32
|
+
return isAr ? darkLeftArrowIcon : darkRightArrowIcon;
|
|
33
|
+
}
|
|
34
|
+
return isAr ? darkRightArrowIcon : darkLeftArrowIcon;
|
|
35
|
+
};
|
|
36
|
+
const onOpen = (e) => {
|
|
37
|
+
setAnchorEl(e.currentTarget);
|
|
38
|
+
};
|
|
39
|
+
const handleClose = () => {
|
|
40
|
+
setAnchorEl(null);
|
|
41
|
+
};
|
|
42
|
+
const handleSubmit = () => {
|
|
43
|
+
setDate(tempDate);
|
|
44
|
+
if (setValue)
|
|
45
|
+
setValue(tempDate);
|
|
46
|
+
handleClose();
|
|
47
|
+
};
|
|
48
|
+
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(Wrapper, Object.assign({ sx: Object.assign({}, props.sx) }, { children: [_jsx(SelectedDate, Object.assign({ onClick: onOpen, open: open, className: "date-button" }, { children: date.format('MMM D, YYYY') })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: placement }, { children: _jsxs(CalenderWrapper, Object.assign({ className: "calender-content", open: open }, { children: [_jsx(Calendar, Object.assign({ numberOfMonths: 1, format: "MMM DD", monthYearSeparator: ' ', renderButton: (direction, handleClick) => (_jsx(ArrowButton, Object.assign({ onClick: handleClick }, { children: _jsx("img", { src: getArrow(direction), alt: "arrow" }) }))), onChange: (v) => {
|
|
49
|
+
setTempDate(v);
|
|
50
|
+
}, weekDays: !isAr ? weekDays : undefined, minDate: new Date(), value: date }, props)), _jsxs(ButtonsWrapper, { children: [enableTimePicker && (_jsx(TimePickerWrapper, { children: _jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: time, onChange: (timeValue) => {
|
|
51
|
+
setTime(timeValue);
|
|
52
|
+
}, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] }) })), _jsxs(FooterButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: handleClose }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: handleSubmit }, { children: t('okay') }))] })] })] })) }))] })) })));
|
|
53
|
+
}
|
|
54
|
+
export default memo(Calender);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ArrowButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
+
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
+
export declare const CalenderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
|
+
open: boolean;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export declare const SelectedDate: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
14
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
15
|
+
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
16
|
+
open: boolean;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
export declare const ButtonsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
|
+
export declare const CancelButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
22
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
23
|
+
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
24
|
+
export declare const OkayButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
25
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
26
|
+
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
27
|
+
export declare const TimePickerWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
28
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
29
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
30
|
+
export declare const FooterButtonsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
32
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { styled, Button, Box } from '@mui/material';
|
|
2
|
+
import { grayUpArrowIcon } from '../../constants/index.js';
|
|
3
|
+
export const ArrowButton = styled(Button)(() => ({
|
|
4
|
+
minWidth: 'auto',
|
|
5
|
+
padding: 0,
|
|
6
|
+
'& > img': {
|
|
7
|
+
cursor: 'pointer',
|
|
8
|
+
},
|
|
9
|
+
}));
|
|
10
|
+
export const Wrapper = styled(Box)(() => ({
|
|
11
|
+
position: 'relative',
|
|
12
|
+
}));
|
|
13
|
+
export const CalenderWrapper = styled(Box, { shouldForwardProp: (props) => props !== 'open' })(({ open, theme }) => ({
|
|
14
|
+
display: open ? 'flex' : 'none',
|
|
15
|
+
flexDirection: 'column',
|
|
16
|
+
background: theme.palette.common.white,
|
|
17
|
+
boxShadow: theme.shadows[9],
|
|
18
|
+
borderRadius: theme.spacing(1),
|
|
19
|
+
top: 37,
|
|
20
|
+
color: theme.palette.text.primary,
|
|
21
|
+
fontSize: '11px',
|
|
22
|
+
margin: '8px 0',
|
|
23
|
+
'.rmdp-calendar': {
|
|
24
|
+
padding: '8px 16px 16px',
|
|
25
|
+
},
|
|
26
|
+
'.rmdp-rtl *': {
|
|
27
|
+
fontFamily: 'Tajawal',
|
|
28
|
+
},
|
|
29
|
+
'.rmdp-rtl .sd': {
|
|
30
|
+
paddingTop: '4px',
|
|
31
|
+
},
|
|
32
|
+
'.rmdp-wrapper': {
|
|
33
|
+
position: 'relative',
|
|
34
|
+
borderRadius: '8px',
|
|
35
|
+
boxShadow: 'none',
|
|
36
|
+
},
|
|
37
|
+
'.rmdp-day span': {
|
|
38
|
+
fontSize: '11px',
|
|
39
|
+
fontWeight: 500,
|
|
40
|
+
},
|
|
41
|
+
'.rmdp-day, .rmdp-week-day': {
|
|
42
|
+
width: 40,
|
|
43
|
+
height: 40,
|
|
44
|
+
marginBottom: '2px',
|
|
45
|
+
padding: '4px',
|
|
46
|
+
fontSize: '11px',
|
|
47
|
+
color: theme.palette.grey[900],
|
|
48
|
+
},
|
|
49
|
+
'.rmdp-day-picker': {
|
|
50
|
+
padding: 0,
|
|
51
|
+
},
|
|
52
|
+
'.rmdp-day.rmdp-today span': {
|
|
53
|
+
backgroundColor: 'transparent',
|
|
54
|
+
color: theme.palette.info.dark,
|
|
55
|
+
},
|
|
56
|
+
'.rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span': {
|
|
57
|
+
color: theme.palette.common.white,
|
|
58
|
+
},
|
|
59
|
+
'.rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover': {
|
|
60
|
+
background: theme.palette.info.light,
|
|
61
|
+
boxShadow: 'none',
|
|
62
|
+
color: theme.palette.grey[900],
|
|
63
|
+
},
|
|
64
|
+
'.rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end': {
|
|
65
|
+
borderRadius: '50%',
|
|
66
|
+
background: theme.palette.background.gradient.darkShadedBlue,
|
|
67
|
+
color: theme.palette.common.white,
|
|
68
|
+
},
|
|
69
|
+
'.rmdp-range.start:after': {
|
|
70
|
+
content: '""',
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
background: theme.palette.info.light,
|
|
73
|
+
height: '100%',
|
|
74
|
+
width: '50%',
|
|
75
|
+
right: 0,
|
|
76
|
+
top: 0,
|
|
77
|
+
zIndex: -1,
|
|
78
|
+
},
|
|
79
|
+
'.rmdp-rtl .rmdp-range.start:after': {
|
|
80
|
+
right: 'unset',
|
|
81
|
+
left: 0,
|
|
82
|
+
},
|
|
83
|
+
'.rmdp-range.end:after': {
|
|
84
|
+
content: '""',
|
|
85
|
+
position: 'absolute',
|
|
86
|
+
background: theme.palette.info.light,
|
|
87
|
+
height: '100%',
|
|
88
|
+
width: '50%',
|
|
89
|
+
left: 0,
|
|
90
|
+
top: 0,
|
|
91
|
+
zIndex: -1,
|
|
92
|
+
},
|
|
93
|
+
'.rmdp-rtl .rmdp-range.end:after': {
|
|
94
|
+
left: 'unset',
|
|
95
|
+
right: 0,
|
|
96
|
+
},
|
|
97
|
+
'.rmdp-week-day': {
|
|
98
|
+
color: theme.palette.grey[700],
|
|
99
|
+
marginBottom: '4px',
|
|
100
|
+
fontSize: '11px',
|
|
101
|
+
padding: '4px',
|
|
102
|
+
},
|
|
103
|
+
'.rmdp-header-values': {
|
|
104
|
+
color: theme.palette.grey[900],
|
|
105
|
+
fontSize: '12px',
|
|
106
|
+
fontWeight: 500,
|
|
107
|
+
lineHeight: '20px',
|
|
108
|
+
letterSpacing: '0.1px',
|
|
109
|
+
},
|
|
110
|
+
'.rmdp-header-values span:nth-of-type(2)': {
|
|
111
|
+
display: 'none',
|
|
112
|
+
},
|
|
113
|
+
'.rmdp-header': {
|
|
114
|
+
padding: '4px 0',
|
|
115
|
+
margin: 0,
|
|
116
|
+
fontSize: '12px',
|
|
117
|
+
},
|
|
118
|
+
'.rmdp-top-class': {
|
|
119
|
+
display: 'block !important',
|
|
120
|
+
},
|
|
121
|
+
'.rmdp-day.rmdp-selected span:not(.highlight)': {
|
|
122
|
+
background: theme.palette.info.dark,
|
|
123
|
+
},
|
|
124
|
+
'.rmdp-day.start.end': {
|
|
125
|
+
overflow: 'hidden',
|
|
126
|
+
},
|
|
127
|
+
}));
|
|
128
|
+
export const SelectedDate = styled(Button, { shouldForwardProp: (props) => props !== 'open' })(({ open, theme }) => (Object.assign({ color: theme.palette.text.primary, fontSize: '11px', fontWeight: 500, padding: theme.spacing(1), borderRadius: '4px', border: '1px solid', borderColor: theme.palette.divider, background: theme.palette.common.white, textTransform: 'none', height: 32 }, (open && { border: '1px solid', borderColor: theme.palette.info.dark, boxShadow: theme.shadows[7] }))));
|
|
129
|
+
export const ButtonsWrapper = styled(Box)(({ theme }) => ({
|
|
130
|
+
display: 'flex',
|
|
131
|
+
justifyContent: 'space-between',
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
gap: 8,
|
|
134
|
+
padding: '16px',
|
|
135
|
+
borderTop: `1px solid ${theme.palette.divider}`,
|
|
136
|
+
marginLeft: 'auto',
|
|
137
|
+
}));
|
|
138
|
+
export const CancelButton = styled(Button)(({ theme }) => ({
|
|
139
|
+
textTransform: 'capitalize',
|
|
140
|
+
padding: '8px 24px',
|
|
141
|
+
width: 75,
|
|
142
|
+
height: 32,
|
|
143
|
+
fontSize: '11px',
|
|
144
|
+
background: 'transparent',
|
|
145
|
+
color: theme.palette.text.primary,
|
|
146
|
+
border: '1px solid',
|
|
147
|
+
borderColor: theme.palette.divider,
|
|
148
|
+
fontWeight: 500,
|
|
149
|
+
borderRadius: '4px',
|
|
150
|
+
'&:hover': {
|
|
151
|
+
background: 'transparent',
|
|
152
|
+
color: theme.palette.text.primary,
|
|
153
|
+
},
|
|
154
|
+
}));
|
|
155
|
+
export const OkayButton = styled(Button)(({ theme }) => ({
|
|
156
|
+
textTransform: 'capitalize',
|
|
157
|
+
padding: '8px 24px',
|
|
158
|
+
width: 75,
|
|
159
|
+
height: 32,
|
|
160
|
+
fontSize: '11px',
|
|
161
|
+
borderRadius: '4px',
|
|
162
|
+
fontWeight: 700,
|
|
163
|
+
background: theme.palette.info.dark,
|
|
164
|
+
'&:hover': {
|
|
165
|
+
background: theme.palette.info.dark,
|
|
166
|
+
},
|
|
167
|
+
}));
|
|
168
|
+
export const TimePickerWrapper = styled(Box)(({ theme }) => ({
|
|
169
|
+
display: 'flex',
|
|
170
|
+
gap: '4px',
|
|
171
|
+
'.rmdp-input': {
|
|
172
|
+
width: '64px',
|
|
173
|
+
borderRadius: '19px',
|
|
174
|
+
border: '1px solid',
|
|
175
|
+
borderColor: theme.palette.divider,
|
|
176
|
+
color: theme.palette.text.primary,
|
|
177
|
+
fontSize: '11px',
|
|
178
|
+
fontWeight: 500,
|
|
179
|
+
background: 'transparent',
|
|
180
|
+
cursor: 'pointer',
|
|
181
|
+
},
|
|
182
|
+
'.rmdp-input:focus': {
|
|
183
|
+
boxShadow: theme.shadows[7],
|
|
184
|
+
border: `1px solid ${theme.palette.info.dark}`,
|
|
185
|
+
borderRadius: '19px',
|
|
186
|
+
},
|
|
187
|
+
'.rmdp-time-picker': {
|
|
188
|
+
boxShadow: theme.shadows[5],
|
|
189
|
+
borderRadius: theme.spacing(1),
|
|
190
|
+
padding: theme.spacing(2),
|
|
191
|
+
minWidth: 'auto !important',
|
|
192
|
+
div: {
|
|
193
|
+
marginTop: 0,
|
|
194
|
+
display: 'block',
|
|
195
|
+
},
|
|
196
|
+
'> div': {
|
|
197
|
+
width: 32,
|
|
198
|
+
height: 64,
|
|
199
|
+
},
|
|
200
|
+
'.rmdp-arrow': {
|
|
201
|
+
borderColor: `${theme.palette.background.transparent[1]} !important`,
|
|
202
|
+
},
|
|
203
|
+
'.rmdp-arrow-container': {
|
|
204
|
+
justifyContent: 'center',
|
|
205
|
+
'&:hover': {
|
|
206
|
+
backgroundColor: 'transparent',
|
|
207
|
+
boxShadow: 'unset',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
input: {
|
|
211
|
+
borderRadius: '4px',
|
|
212
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
213
|
+
padding: 0,
|
|
214
|
+
width: 32,
|
|
215
|
+
height: 32,
|
|
216
|
+
fontSize: '11px',
|
|
217
|
+
color: theme.palette.text.primary,
|
|
218
|
+
fontWeight: 500,
|
|
219
|
+
'&:focus, &:focus-visible': {
|
|
220
|
+
border: `1px solid ${theme.palette.info.dark}`,
|
|
221
|
+
outline: 'unset',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
'.dvdr': {
|
|
225
|
+
margin: '7px 4px 0',
|
|
226
|
+
},
|
|
227
|
+
'.rmdp-am, .rmdp-pm': {
|
|
228
|
+
margin: 0,
|
|
229
|
+
width: 32,
|
|
230
|
+
height: 32,
|
|
231
|
+
flex: 'auto',
|
|
232
|
+
justifyContent: 'center',
|
|
233
|
+
fontSize: '11px',
|
|
234
|
+
color: theme.palette.text.primary,
|
|
235
|
+
fontWeight: 500,
|
|
236
|
+
display: 'flex',
|
|
237
|
+
cursor: 'default',
|
|
238
|
+
},
|
|
239
|
+
'> div:last-child': {
|
|
240
|
+
marginInlineStart: '4px',
|
|
241
|
+
display: 'block !important',
|
|
242
|
+
},
|
|
243
|
+
'.rmdp-down, .rmdp-up': {
|
|
244
|
+
position: 'relative',
|
|
245
|
+
i: {
|
|
246
|
+
display: 'none',
|
|
247
|
+
},
|
|
248
|
+
'&:before': {
|
|
249
|
+
content: '""',
|
|
250
|
+
position: 'absolute',
|
|
251
|
+
top: '5px',
|
|
252
|
+
width: '10px',
|
|
253
|
+
height: '10px',
|
|
254
|
+
backgroundImage: `url(${grayUpArrowIcon})`,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
'.rmdp-down:before': {
|
|
258
|
+
transform: 'rotate(180deg)',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
'.rmdp-container': {
|
|
262
|
+
position: 'relative',
|
|
263
|
+
'> div': {
|
|
264
|
+
top: 'unset !important',
|
|
265
|
+
bottom: '28px',
|
|
266
|
+
transform: 'unset !important',
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
}));
|
|
270
|
+
export const FooterButtonsWrapper = styled(Box)(() => ({
|
|
271
|
+
display: 'flex',
|
|
272
|
+
gap: '8px',
|
|
273
|
+
}));
|
|
@@ -12,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
14
|
import Box from '@mui/material/Box';
|
|
15
|
-
import { defaultCountryIcon
|
|
15
|
+
import { defaultCountryIcon } from '../../constants/index.js';
|
|
16
16
|
function CountryFlag(_a) {
|
|
17
17
|
var { code } = _a, props = __rest(_a, ["code"]);
|
|
18
|
-
return (_jsx(Box, Object.assign({}, props, { component: "img", src: code
|
|
18
|
+
return (_jsx(Box, Object.assign({}, props, { component: "img", src: code || defaultCountryIcon, alt: code, sx: Object.assign(Object.assign({ width: 16 }, (code && { height: 12, borderRadius: '3px' })), props.sx), loading: "lazy" })));
|
|
19
19
|
}
|
|
20
20
|
export default memo(CountryFlag);
|
|
@@ -5,10 +5,10 @@ import { Typography, Checkbox } from '@mui/material';
|
|
|
5
5
|
import { ChevronIcon } from '../TableHeader_V2/components/StatusButtons/ChevronIcon';
|
|
6
6
|
import StyledBadge, { BadgeVariants } from '../CountBadge';
|
|
7
7
|
import CountryFlag from '../CountryFlag';
|
|
8
|
-
import { formatNumber } from '../../utils/index.js';
|
|
8
|
+
import { formatNumber, getCurrencyCodeFlag } from '../../utils/index.js';
|
|
9
9
|
import { closeXIcon } from '../../constants/index.js';
|
|
10
10
|
import { ChevronContainer, Label, LabelWrapper, StyledDropdown, MenuItemContainer, CheckboxStyles, StyledStatusButton, ClearIcon, ChevronIconWrapper, } from './style';
|
|
11
|
-
function MultiSelectStatusButton({ options, selectedValues, onSelectionChange, label, variant = 'inActive' }) {
|
|
11
|
+
function MultiSelectStatusButton({ options = [], selectedValues, onSelectionChange, label, variant = 'inActive' }) {
|
|
12
12
|
const { t } = useTranslation();
|
|
13
13
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
14
14
|
const buttonRef = useRef(null);
|
|
@@ -63,7 +63,7 @@ function MultiSelectStatusButton({ options, selectedValues, onSelectionChange, l
|
|
|
63
63
|
const countBadge = (_jsx(StyledBadge, Object.assign({ pointer: true, variant: variant === 'active' ? BadgeVariants.ACTIVE : BadgeVariants.INACTIVE }, { children: formatNumber(selectedValues.length > 0 ? selectedValues.length : options.length) })));
|
|
64
64
|
return (_jsxs(_Fragment, { children: [_jsx(StyledStatusButton, Object.assign({ buttonVariant: variant, ref: buttonRef, sx: {
|
|
65
65
|
paddingInlineEnd: '27px',
|
|
66
|
-
}, "data-testid": "MultiSelectStatusButton", onClick: handleDropdownClick, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) }, { children: _jsxs(LabelWrapper, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [getDisplayLabel(), countBadge] })), _jsxs(ChevronContainer, Object.assign({ onClick: isHovered && internalSelectedValues.length > 0 ? handleClearAll : undefined, sx: {
|
|
66
|
+
}, "data-testid": "MultiSelectStatusButton", onClick: handleDropdownClick, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), disabled: !options.length }, { children: _jsxs(LabelWrapper, { children: [_jsxs(Label, Object.assign({ variant: variant }, { children: [getDisplayLabel(), countBadge] })), _jsxs(ChevronContainer, Object.assign({ onClick: isHovered && internalSelectedValues.length > 0 ? handleClearAll : undefined, sx: {
|
|
67
67
|
'&:hover': {
|
|
68
68
|
backgroundColor: 'transparent',
|
|
69
69
|
},
|
|
@@ -85,7 +85,7 @@ function MultiSelectStatusButton({ options, selectedValues, onSelectionChange, l
|
|
|
85
85
|
var _a;
|
|
86
86
|
e.stopPropagation();
|
|
87
87
|
handleOptionToggle((_a = option.status) !== null && _a !== void 0 ? _a : '', e);
|
|
88
|
-
} }), _jsx(CountryFlag, { code: option.
|
|
88
|
+
} }), _jsx(CountryFlag, { code: getCurrencyCodeFlag(option.code), sx: { border: '1px solid white', borderRadius: '3px' } }), _jsx(Typography, Object.assign({ variant: "body2" }, { children: option.name }))] })),
|
|
89
89
|
onClick: (e) => {
|
|
90
90
|
var _a;
|
|
91
91
|
e.preventDefault();
|
|
@@ -8,6 +8,9 @@ export const StyledStatusButton = styled(Button, {
|
|
|
8
8
|
? {
|
|
9
9
|
background: theme.palette.background.gradient.shadedBlue,
|
|
10
10
|
color: theme.palette.common.white,
|
|
11
|
+
'&:disabled': {
|
|
12
|
+
color: theme.palette.common.white,
|
|
13
|
+
},
|
|
11
14
|
}
|
|
12
15
|
: {
|
|
13
16
|
backgroundColor: theme.palette.common.white,
|
|
@@ -16,6 +19,9 @@ export const StyledStatusButton = styled(Button, {
|
|
|
16
19
|
'&:hover': {
|
|
17
20
|
backgroundColor: 'white',
|
|
18
21
|
},
|
|
22
|
+
'&:disabled': {
|
|
23
|
+
color: theme.palette.text.primary,
|
|
24
|
+
},
|
|
19
25
|
}))));
|
|
20
26
|
export const FlagContainer = styled(Box)(({ theme }) => ({
|
|
21
27
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDa
|
|
|
4
4
|
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation, type BlobGradient, type Blob } from './BackgroundAnimation';
|
|
6
6
|
export { default as Button, PlusButton } from './Button';
|
|
7
|
+
export { default as Calender } from './Calender';
|
|
7
8
|
export { default as CardEmptyState, type CardEmptyStateProps } from './CardEmptyState';
|
|
8
9
|
export { default as CardHeadline } from './CardHeadline';
|
|
9
10
|
export { default as Checkbox } from './Checkbox';
|
|
@@ -4,6 +4,7 @@ export { default as ActivityAreaChart, ChartTooltip, LoadingChart, } from './Act
|
|
|
4
4
|
export { default as AppWindowWrapper, AccountHeaderTitle, AppWindow, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation } from './BackgroundAnimation';
|
|
6
6
|
export { default as Button, PlusButton } from './Button';
|
|
7
|
+
export { default as Calender } from './Calender';
|
|
7
8
|
export { default as CardEmptyState } from './CardEmptyState';
|
|
8
9
|
export { default as CardHeadline } from './CardHeadline';
|
|
9
10
|
export { default as Checkbox } from './Checkbox';
|
package/build/utils/billing.d.ts
CHANGED
package/build/utils/billing.js
CHANGED
|
@@ -18,7 +18,7 @@ export const getDefaultInvoiceInfo = () => ({
|
|
|
18
18
|
isAdvanced: false,
|
|
19
19
|
dueDate: new Date(new Date().setDate(new Date().getDate() + 30)).getTime(),
|
|
20
20
|
graceDate: new Date(new Date().setMonth(1)).getTime(),
|
|
21
|
-
expiryDate:
|
|
21
|
+
expiryDate: new Date(new Date().setFullYear(new Date().getFullYear() + 1)).getTime(),
|
|
22
22
|
note: '',
|
|
23
23
|
frequency: '',
|
|
24
24
|
documents: [],
|
package/package.json
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "build/index.js",
|
|
7
|
-
"module": "build/index.js",
|
|
8
|
-
"types": "build/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./build/index.d.ts",
|
|
12
|
-
"import": "./build/index.js",
|
|
13
|
-
"require": "./build/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./constants": {
|
|
16
|
-
"types": "./build/constants/index.d.ts",
|
|
17
|
-
"import": "./build/constants/index.js",
|
|
18
|
-
"require": "./build/constants/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./components": {
|
|
21
|
-
"types": "./build/components/index.d.ts",
|
|
22
|
-
"import": "./build/components/index.js",
|
|
23
|
-
"require": "./build/components/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./components/*": {
|
|
26
|
-
"types": "./build/components/*/index.d.ts",
|
|
27
|
-
"import": "./build/components/*/index.js",
|
|
28
|
-
"require": "./build/components/*/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./hooks": {
|
|
31
|
-
"types": "./build/hooks/index.d.ts",
|
|
32
|
-
"import": "./build/hooks/index.js",
|
|
33
|
-
"require": "./build/hooks/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./utils": {
|
|
36
|
-
"types": "./build/utils/index.d.ts",
|
|
37
|
-
"import": "./build/utils/index.js",
|
|
38
|
-
"require": "./build/utils/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./theme": {
|
|
41
|
-
"types": "./build/theme/index.d.ts",
|
|
42
|
-
"import": "./build/theme/index.js",
|
|
43
|
-
"require": "./build/theme/index.js"
|
|
44
|
-
},
|
|
45
|
-
"./types": {
|
|
46
|
-
"types": "./build/types/index.d.ts",
|
|
47
|
-
"import": "./build/types/index.js",
|
|
48
|
-
"require": "./build/types/index.js"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"license": "MIT",
|
|
52
|
-
"author": {
|
|
53
|
-
"name": "Ahmed Sharkawy",
|
|
54
|
-
"email": "a.elsharkawy@tap.company"
|
|
55
|
-
},
|
|
56
|
-
"files": [
|
|
57
|
-
"build",
|
|
58
|
-
"readme.md"
|
|
59
|
-
],
|
|
60
|
-
"scripts": {
|
|
61
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
62
|
-
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
63
|
-
"dev": "vite",
|
|
64
|
-
"build": "tsc -b && vite build ",
|
|
65
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
66
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
67
|
-
"lint": "eslint . --color",
|
|
68
|
-
"lint:fix": "eslint src --fix --color",
|
|
69
|
-
"preview": "vite preview",
|
|
70
|
-
"prepare": "husky"
|
|
71
|
-
},
|
|
72
|
-
"dependencies": {
|
|
73
|
-
"@emotion/react": "^11.11.0",
|
|
74
|
-
"@emotion/styled": "^11.11.0",
|
|
75
|
-
"@hookform/resolvers": "^3.3.1",
|
|
76
|
-
"@mui/material": "^5.12.3",
|
|
77
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
78
|
-
"axios": "^1.4.0",
|
|
79
|
-
"dayjs": "^1.11.8",
|
|
80
|
-
"framer-motion": "10.11.0",
|
|
81
|
-
"i18next": "^22.4.15",
|
|
82
|
-
"memoize-one": "^6.0.0",
|
|
83
|
-
"re-resizable": "^6.9.9",
|
|
84
|
-
"react": "^18.2.0",
|
|
85
|
-
"react-currency-input-field": "^3.6.11",
|
|
86
|
-
"react-dom": "^18.2.0",
|
|
87
|
-
"react-draggable": "^4.4.6",
|
|
88
|
-
"react-dropzone": "^14.2.3",
|
|
89
|
-
"react-hook-form": "^7.45.4",
|
|
90
|
-
"react-hot-toast": "^2.4.1",
|
|
91
|
-
"react-i18next": "^12.2.2",
|
|
92
|
-
"react-multi-date-picker": "^4.1.2",
|
|
93
|
-
"react-router-dom": "^6.14.2",
|
|
94
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
95
|
-
"react-window": "^1.8.9",
|
|
96
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
97
|
-
"react18-input-otp": "^1.1.4",
|
|
98
|
-
"recharts": "^2.15.1"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@eslint/js": "^9.17.0",
|
|
102
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
103
|
-
"@types/lodash": "^4.17.15",
|
|
104
|
-
"@types/react": "^18.2.6",
|
|
105
|
-
"@types/react-dom": "^18.3.5",
|
|
106
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
107
|
-
"@types/react-window": "^1.8.5",
|
|
108
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
109
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
110
|
-
"eslint": "^9.17.0",
|
|
111
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
112
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
113
|
-
"globals": "^15.14.0",
|
|
114
|
-
"husky": "^8.0.3",
|
|
115
|
-
"lint-staged": "^13.2.2",
|
|
116
|
-
"prettier": "^2.8.8",
|
|
117
|
-
"tsc-alias": "^1.8.16",
|
|
118
|
-
"typescript": "5.0.2",
|
|
119
|
-
"typescript-eslint": "^8.18.2",
|
|
120
|
-
"vite": "6.0.5",
|
|
121
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
122
|
-
},
|
|
123
|
-
"lint-staged": {
|
|
124
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
125
|
-
"yarn run prettier:fix",
|
|
126
|
-
"yarn run lint"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"publishConfig": {
|
|
130
|
-
"registry": "https://registry.npmjs.org/"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.0.122",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/index.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./build/index.d.ts",
|
|
12
|
+
"import": "./build/index.js",
|
|
13
|
+
"require": "./build/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./constants": {
|
|
16
|
+
"types": "./build/constants/index.d.ts",
|
|
17
|
+
"import": "./build/constants/index.js",
|
|
18
|
+
"require": "./build/constants/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./components": {
|
|
21
|
+
"types": "./build/components/index.d.ts",
|
|
22
|
+
"import": "./build/components/index.js",
|
|
23
|
+
"require": "./build/components/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./components/*": {
|
|
26
|
+
"types": "./build/components/*/index.d.ts",
|
|
27
|
+
"import": "./build/components/*/index.js",
|
|
28
|
+
"require": "./build/components/*/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./hooks": {
|
|
31
|
+
"types": "./build/hooks/index.d.ts",
|
|
32
|
+
"import": "./build/hooks/index.js",
|
|
33
|
+
"require": "./build/hooks/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./utils": {
|
|
36
|
+
"types": "./build/utils/index.d.ts",
|
|
37
|
+
"import": "./build/utils/index.js",
|
|
38
|
+
"require": "./build/utils/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./theme": {
|
|
41
|
+
"types": "./build/theme/index.d.ts",
|
|
42
|
+
"import": "./build/theme/index.js",
|
|
43
|
+
"require": "./build/theme/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./types": {
|
|
46
|
+
"types": "./build/types/index.d.ts",
|
|
47
|
+
"import": "./build/types/index.js",
|
|
48
|
+
"require": "./build/types/index.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"author": {
|
|
53
|
+
"name": "Ahmed Sharkawy",
|
|
54
|
+
"email": "a.elsharkawy@tap.company"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"build",
|
|
58
|
+
"readme.md"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
62
|
+
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
63
|
+
"dev": "vite",
|
|
64
|
+
"build": "tsc -b && vite build ",
|
|
65
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
66
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
67
|
+
"lint": "eslint . --color",
|
|
68
|
+
"lint:fix": "eslint src --fix --color",
|
|
69
|
+
"preview": "vite preview",
|
|
70
|
+
"prepare": "husky"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@emotion/react": "^11.11.0",
|
|
74
|
+
"@emotion/styled": "^11.11.0",
|
|
75
|
+
"@hookform/resolvers": "^3.3.1",
|
|
76
|
+
"@mui/material": "^5.12.3",
|
|
77
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
78
|
+
"axios": "^1.4.0",
|
|
79
|
+
"dayjs": "^1.11.8",
|
|
80
|
+
"framer-motion": "10.11.0",
|
|
81
|
+
"i18next": "^22.4.15",
|
|
82
|
+
"memoize-one": "^6.0.0",
|
|
83
|
+
"re-resizable": "^6.9.9",
|
|
84
|
+
"react": "^18.2.0",
|
|
85
|
+
"react-currency-input-field": "^3.6.11",
|
|
86
|
+
"react-dom": "^18.2.0",
|
|
87
|
+
"react-draggable": "^4.4.6",
|
|
88
|
+
"react-dropzone": "^14.2.3",
|
|
89
|
+
"react-hook-form": "^7.45.4",
|
|
90
|
+
"react-hot-toast": "^2.4.1",
|
|
91
|
+
"react-i18next": "^12.2.2",
|
|
92
|
+
"react-multi-date-picker": "^4.1.2",
|
|
93
|
+
"react-router-dom": "^6.14.2",
|
|
94
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
95
|
+
"react-window": "^1.8.9",
|
|
96
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
97
|
+
"react18-input-otp": "^1.1.4",
|
|
98
|
+
"recharts": "^2.15.1"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@eslint/js": "^9.17.0",
|
|
102
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
103
|
+
"@types/lodash": "^4.17.15",
|
|
104
|
+
"@types/react": "^18.2.6",
|
|
105
|
+
"@types/react-dom": "^18.3.5",
|
|
106
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
107
|
+
"@types/react-window": "^1.8.5",
|
|
108
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
109
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
110
|
+
"eslint": "^9.17.0",
|
|
111
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
112
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
113
|
+
"globals": "^15.14.0",
|
|
114
|
+
"husky": "^8.0.3",
|
|
115
|
+
"lint-staged": "^13.2.2",
|
|
116
|
+
"prettier": "^2.8.8",
|
|
117
|
+
"tsc-alias": "^1.8.16",
|
|
118
|
+
"typescript": "5.0.2",
|
|
119
|
+
"typescript-eslint": "^8.18.2",
|
|
120
|
+
"vite": "6.0.5",
|
|
121
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
122
|
+
},
|
|
123
|
+
"lint-staged": {
|
|
124
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
125
|
+
"yarn run prettier:fix",
|
|
126
|
+
"yarn run lint"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"registry": "https://registry.npmjs.org/"
|
|
131
|
+
}
|
|
132
|
+
}
|