@tap-payments/os-micro-frontend-shared 0.1.99 → 0.1.101-test.5-test.6
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/build/components/StatusChip/StatusChip.d.ts +1 -1
- package/build/components/StatusChip/StatusChip.js +8 -11
- package/build/components/StatusChip/style.d.ts +0 -1
- package/build/components/StatusChip/type.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +4 -4
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +1 -1
- package/build/components/VirtualTables/components/style.js +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/build/constants/table/cell/authorizationTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/authorizationTableCellWidth.js +2 -2
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
- package/build/constants/table/cell/destinationsTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/destinationsTableCellWidth.js +2 -2
- package/build/constants/table/cell/refundTableCellWidth.d.ts +2 -2
- package/build/constants/table/cell/refundTableCellWidth.js +2 -2
- package/build/utils/object.js +2 -2
- package/build/utils/style.js +4 -0
- package/package.json +139 -139
- package/build/components/AmountStatusChip/AmountStatusChip.d.ts +0 -9
- package/build/components/AmountStatusChip/AmountStatusChip.js +0 -20
- package/build/components/AmountStatusChip/index.d.ts +0 -3
- package/build/components/AmountStatusChip/index.js +0 -2
- package/build/components/AmountStatusChip/style.d.ts +0 -4
- package/build/components/AmountStatusChip/style.js +0 -27
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChipProps } from './type';
|
|
2
|
-
declare const StatusChip: ({ children, unknownText, copyText,
|
|
2
|
+
declare const StatusChip: ({ children, unknownText, copyText, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default StatusChip;
|
|
@@ -18,7 +18,7 @@ import { copyIcon, greenCheckIcon } from '../../constants/index.js';
|
|
|
18
18
|
import { unknownGeographyColors } from './constants';
|
|
19
19
|
import { ChipStyled, Wrapper, CopyWrapper } from './style';
|
|
20
20
|
const StatusChip = (_a) => {
|
|
21
|
-
var { children, unknownText, copyText
|
|
21
|
+
var { children, unknownText, copyText } = _a, props = __rest(_a, ["children", "unknownText", "copyText"]);
|
|
22
22
|
const [showCopy, setShowCopy] = useState(false);
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const isSelected = props.isSelected;
|
|
@@ -38,15 +38,12 @@ const StatusChip = (_a) => {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width: 12,
|
|
49
|
-
objectFit: 'contain',
|
|
50
|
-
} }) })) })] })) })) }))] })));
|
|
41
|
+
return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected, style: { position: 'absolute', top: 0, left: 0, zIndex: isSelected ? 3 : 0 } }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
|
|
42
|
+
paddingRight: isSelected && copyText ? 12 : 0,
|
|
43
|
+
}, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { delay: isSelected ? 0.2 : 0, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
|
|
44
|
+
height: 12,
|
|
45
|
+
width: 12,
|
|
46
|
+
objectFit: 'contain',
|
|
47
|
+
} }) })) })] })) }))] })));
|
|
51
48
|
};
|
|
52
49
|
export default StatusChip;
|
|
@@ -11,7 +11,6 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
|
|
|
11
11
|
maxWidth?: string | undefined;
|
|
12
12
|
isSelected?: boolean | undefined;
|
|
13
13
|
copyText?: string | undefined;
|
|
14
|
-
expandDirection?: "left" | "right" | undefined;
|
|
15
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
15
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
16
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
|
package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js
CHANGED
|
@@ -30,11 +30,10 @@ export default function ApplicationStatusCell(_a) {
|
|
|
30
30
|
tooltip: 'Acceptance',
|
|
31
31
|
enabled: isAcceptanceEnabled,
|
|
32
32
|
shown: !hideAcceptance,
|
|
33
|
+
zIndex: isAcceptanceEnabled && !isPayoutEnabled ? 3 : 1,
|
|
33
34
|
},
|
|
34
|
-
{ icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout },
|
|
35
|
-
]
|
|
36
|
-
.filter((app) => app.shown)
|
|
37
|
-
.sort((a, b) => (a.enabled !== b.enabled && b.enabled ? -1 : 0)), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
|
|
35
|
+
{ icon: isPayoutEnabled ? payoutsGreenIcon : payoutWindowIcon, tooltip: 'Payout', enabled: isPayoutEnabled, shown: !hidePayout, zIndex: 2 },
|
|
36
|
+
].filter((app) => app.shown), [isAcceptanceEnabled, isPayoutEnabled, hideAcceptance, hidePayout]);
|
|
38
37
|
const appsStatus = useMemo(() => apps.map((app, index) => {
|
|
39
38
|
const sourceTooltip = app.tooltip;
|
|
40
39
|
return (_jsx(Tooltip, Object.assign({ onOpen: () => {
|
|
@@ -43,6 +42,7 @@ export default function ApplicationStatusCell(_a) {
|
|
|
43
42
|
setIsTooltipOpen(false);
|
|
44
43
|
}, title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: appStatusAnimation(index, theme.shadows[4], 40), sx: {
|
|
45
44
|
width: '36px',
|
|
45
|
+
zIndex: app.zIndex + 6,
|
|
46
46
|
} }, { children: _jsx(IconWithBadge, { mainIcon: app.icon, mainIconSize: 16, containerSize: 16, sx: { borderRadius: '40px' }, onError: (e) => {
|
|
47
47
|
e.currentTarget.src = app.icon;
|
|
48
48
|
e.currentTarget.style.borderRadius = '0px';
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js
CHANGED
|
@@ -13,7 +13,7 @@ const Wrapper = styled('section')(({ isLoaded = false, isPinned = false }) => ({
|
|
|
13
13
|
}));
|
|
14
14
|
function SheetViewTableLoading({ columns, isLoaded = false, animationType, isLoading = false, rowsCount, isPinned = false, }) {
|
|
15
15
|
let maxAllowedRows = rowsCount || calculateMaxAllowedRows(isLoaded, isLoading);
|
|
16
|
-
maxAllowedRows = rowsCount || Math.max(maxAllowedRows,
|
|
16
|
+
maxAllowedRows = rowsCount || Math.max(maxAllowedRows, 16);
|
|
17
17
|
return (_jsx(Wrapper, Object.assign({ isLoaded: isLoaded, isPinned: isPinned, "data-testid": "SheetViewTableLoading" }, { children: [...Array(maxAllowedRows)].map((_, index) => (_jsx(SheetViewTableRowLoading, { columns: columns, animationType: animationType, rowIndex: index, useTableBackground: !isPinned }, `i-${uniqueId('SheetViewTableLoadingRow_')}`))) })));
|
|
18
18
|
}
|
|
19
19
|
export default memo(SheetViewTableLoading);
|
|
@@ -146,7 +146,7 @@ export const SheetViewTableContainer = styled(Box)(() => ({
|
|
|
146
146
|
position: 'relative',
|
|
147
147
|
display: 'flex',
|
|
148
148
|
flexDirection: 'column',
|
|
149
|
-
height: '
|
|
149
|
+
height: '100%',
|
|
150
150
|
paddingInline: '28px',
|
|
151
151
|
borderRadius: '8px',
|
|
152
152
|
marginBottom: '16px !important',
|
|
@@ -105,5 +105,4 @@ export * from './LeftPeekRightExpandingChip';
|
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
107
|
export { default as LazyImage } from './LazyImage';
|
|
108
|
-
export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
|
|
109
108
|
export * from './LazyImage';
|
|
@@ -105,5 +105,4 @@ export * from './LeftPeekRightExpandingChip';
|
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
107
|
export { default as LazyImage } from './LazyImage';
|
|
108
|
-
export { default as AmountStatusChip } from './AmountStatusChip';
|
|
109
108
|
export * from './LazyImage';
|
|
@@ -57,12 +57,12 @@ export declare const authorizationTableCellWidth: {
|
|
|
57
57
|
readonly payment_agreement: {
|
|
58
58
|
readonly default: "50px";
|
|
59
59
|
readonly text: "150px";
|
|
60
|
-
readonly sheet: "
|
|
60
|
+
readonly sheet: "170px";
|
|
61
61
|
};
|
|
62
62
|
readonly amount: {
|
|
63
63
|
readonly default: "170px";
|
|
64
64
|
readonly text: "195px";
|
|
65
|
-
readonly sheet: "
|
|
65
|
+
readonly sheet: "195px";
|
|
66
66
|
};
|
|
67
67
|
readonly destinations: {
|
|
68
68
|
readonly default: "70px";
|
|
@@ -57,12 +57,12 @@ export const authorizationTableCellWidth = {
|
|
|
57
57
|
payment_agreement: {
|
|
58
58
|
default: '50px',
|
|
59
59
|
text: '150px',
|
|
60
|
-
sheet: '
|
|
60
|
+
sheet: '170px',
|
|
61
61
|
},
|
|
62
62
|
amount: {
|
|
63
63
|
default: '170px',
|
|
64
64
|
text: '195px',
|
|
65
|
-
sheet: '
|
|
65
|
+
sheet: '195px',
|
|
66
66
|
},
|
|
67
67
|
destinations: {
|
|
68
68
|
default: '70px',
|
|
@@ -52,7 +52,7 @@ export declare const chargeTableCellWidth: {
|
|
|
52
52
|
readonly payment_agreement: {
|
|
53
53
|
readonly default: "50px";
|
|
54
54
|
readonly text: "150px";
|
|
55
|
-
readonly sheet: "
|
|
55
|
+
readonly sheet: "165px";
|
|
56
56
|
};
|
|
57
57
|
readonly payment_initiated: {
|
|
58
58
|
readonly default: "150px";
|
|
@@ -222,7 +222,7 @@ export declare const chargeTableCellWidth: {
|
|
|
222
222
|
readonly consolidated_amount: {
|
|
223
223
|
readonly default: "180px";
|
|
224
224
|
readonly text: "180px";
|
|
225
|
-
readonly sheet: "
|
|
225
|
+
readonly sheet: "180px";
|
|
226
226
|
};
|
|
227
227
|
readonly customer_amount: {
|
|
228
228
|
readonly default: "150px";
|
|
@@ -52,7 +52,7 @@ export const chargeTableCellWidth = {
|
|
|
52
52
|
payment_agreement: {
|
|
53
53
|
default: '50px',
|
|
54
54
|
text: '150px',
|
|
55
|
-
sheet: '
|
|
55
|
+
sheet: '165px',
|
|
56
56
|
},
|
|
57
57
|
payment_initiated: {
|
|
58
58
|
default: '150px',
|
|
@@ -222,7 +222,7 @@ export const chargeTableCellWidth = {
|
|
|
222
222
|
consolidated_amount: {
|
|
223
223
|
default: '180px',
|
|
224
224
|
text: '180px',
|
|
225
|
-
sheet: '
|
|
225
|
+
sheet: '180px',
|
|
226
226
|
},
|
|
227
227
|
customer_amount: {
|
|
228
228
|
default: '150px',
|
|
@@ -62,12 +62,12 @@ export declare const destinationsTableCellWidth: {
|
|
|
62
62
|
readonly payment_agreement: {
|
|
63
63
|
readonly default: "50px";
|
|
64
64
|
readonly text: "250px";
|
|
65
|
-
readonly sheet: "
|
|
65
|
+
readonly sheet: "165px";
|
|
66
66
|
};
|
|
67
67
|
readonly amount: {
|
|
68
68
|
readonly default: "195px";
|
|
69
69
|
readonly text: "195px";
|
|
70
|
-
readonly sheet: "
|
|
70
|
+
readonly sheet: "195px";
|
|
71
71
|
};
|
|
72
72
|
readonly status: {
|
|
73
73
|
readonly default: "50px";
|
|
@@ -62,12 +62,12 @@ export const destinationsTableCellWidth = {
|
|
|
62
62
|
payment_agreement: {
|
|
63
63
|
default: '50px',
|
|
64
64
|
text: '250px',
|
|
65
|
-
sheet: '
|
|
65
|
+
sheet: '165px',
|
|
66
66
|
},
|
|
67
67
|
amount: {
|
|
68
68
|
default: '195px',
|
|
69
69
|
text: '195px',
|
|
70
|
-
sheet: '
|
|
70
|
+
sheet: '195px',
|
|
71
71
|
},
|
|
72
72
|
status: {
|
|
73
73
|
default: '50px',
|
|
@@ -47,7 +47,7 @@ export declare const refundTableCellWidth: {
|
|
|
47
47
|
readonly payment_agreement: {
|
|
48
48
|
readonly default: "50px";
|
|
49
49
|
readonly text: "200px";
|
|
50
|
-
readonly sheet: "
|
|
50
|
+
readonly sheet: "165px";
|
|
51
51
|
};
|
|
52
52
|
readonly payment_initiated: {
|
|
53
53
|
readonly default: "150px";
|
|
@@ -92,7 +92,7 @@ export declare const refundTableCellWidth: {
|
|
|
92
92
|
readonly amount: {
|
|
93
93
|
readonly default: "195px";
|
|
94
94
|
readonly text: "195px";
|
|
95
|
-
readonly sheet: "
|
|
95
|
+
readonly sheet: "180px";
|
|
96
96
|
};
|
|
97
97
|
readonly payouts: {
|
|
98
98
|
readonly default: "195px";
|
|
@@ -47,7 +47,7 @@ export const refundTableCellWidth = {
|
|
|
47
47
|
payment_agreement: {
|
|
48
48
|
default: '50px',
|
|
49
49
|
text: '200px',
|
|
50
|
-
sheet: '
|
|
50
|
+
sheet: '165px',
|
|
51
51
|
},
|
|
52
52
|
payment_initiated: {
|
|
53
53
|
default: '150px',
|
|
@@ -92,7 +92,7 @@ export const refundTableCellWidth = {
|
|
|
92
92
|
amount: {
|
|
93
93
|
default: '195px',
|
|
94
94
|
text: '195px',
|
|
95
|
-
sheet: '
|
|
95
|
+
sheet: '180px',
|
|
96
96
|
},
|
|
97
97
|
payouts: {
|
|
98
98
|
default: '195px',
|
package/build/utils/object.js
CHANGED
|
@@ -4,10 +4,10 @@ export function removeUndefinedValues(obj) {
|
|
|
4
4
|
export function removeUndefinedArrayValues(obj) {
|
|
5
5
|
return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
|
|
6
6
|
if (Array.isArray(value)) {
|
|
7
|
-
return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) =>
|
|
7
|
+
return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => v !== undefined && v !== null && v !== ''));
|
|
8
8
|
}
|
|
9
9
|
if (typeof value === 'object') {
|
|
10
|
-
return Object.values(value || {}).some((v) =>
|
|
10
|
+
return Object.values(value || {}).some((v) => v !== undefined && v !== null && v !== '');
|
|
11
11
|
}
|
|
12
12
|
return !!value;
|
|
13
13
|
}));
|
package/build/utils/style.js
CHANGED
|
@@ -31,6 +31,10 @@ export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelecte
|
|
|
31
31
|
const getRowSelectionStyles = () => ({
|
|
32
32
|
backgroundColor: SELECTION_COLORS.background,
|
|
33
33
|
color: SELECTION_COLORS.primary,
|
|
34
|
+
border: 'none',
|
|
35
|
+
'&:before': {
|
|
36
|
+
border: 'none',
|
|
37
|
+
},
|
|
34
38
|
});
|
|
35
39
|
const getSingleCellSelectionStyles = () => ({
|
|
36
40
|
border: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
|
package/package.json
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"testVersion":
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"module": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./build/index.d.ts",
|
|
13
|
-
"import": "./build/index.js",
|
|
14
|
-
"require": "./build/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./constants": {
|
|
17
|
-
"types": "./build/constants/index.d.ts",
|
|
18
|
-
"import": "./build/constants/index.js",
|
|
19
|
-
"require": "./build/constants/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./components": {
|
|
22
|
-
"types": "./build/components/index.d.ts",
|
|
23
|
-
"import": "./build/components/index.js",
|
|
24
|
-
"require": "./build/components/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/*": {
|
|
27
|
-
"types": "./build/components/*/index.d.ts",
|
|
28
|
-
"import": "./build/components/*/index.js",
|
|
29
|
-
"require": "./build/components/*/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./hooks": {
|
|
32
|
-
"types": "./build/hooks/index.d.ts",
|
|
33
|
-
"import": "./build/hooks/index.js",
|
|
34
|
-
"require": "./build/hooks/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./build/utils/index.d.ts",
|
|
38
|
-
"import": "./build/utils/index.js",
|
|
39
|
-
"require": "./build/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./theme": {
|
|
42
|
-
"types": "./build/theme/index.d.ts",
|
|
43
|
-
"import": "./build/theme/index.js",
|
|
44
|
-
"require": "./build/theme/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./types": {
|
|
47
|
-
"types": "./build/types/index.d.ts",
|
|
48
|
-
"import": "./build/types/index.js",
|
|
49
|
-
"require": "./build/types/index.js"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Ahmed Sharkawy",
|
|
55
|
-
"email": "a.elsharkawy@tap.company"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"build",
|
|
59
|
-
"readme.md"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
-
"push:local": "yarn ts:build && yalc publish --push",
|
|
64
|
-
"push": "npm run ts:build && npm publish --access public",
|
|
65
|
-
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
66
|
-
"dev": "vite",
|
|
67
|
-
"build": "tsc -b && vite build ",
|
|
68
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
69
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
70
|
-
"lint": "eslint . --color",
|
|
71
|
-
"lint:fix": "eslint src --fix --color",
|
|
72
|
-
"preview": "vite preview",
|
|
73
|
-
"prepare": "husky"
|
|
74
|
-
},
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@emotion/react": "^11.11.0",
|
|
77
|
-
"@emotion/styled": "^11.11.0",
|
|
78
|
-
"@hookform/resolvers": "^3.3.1",
|
|
79
|
-
"@mui/material": "^5.12.3",
|
|
80
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
81
|
-
"axios": "^1.4.0",
|
|
82
|
-
"color": "^5.0.0",
|
|
83
|
-
"dayjs": "^1.11.8",
|
|
84
|
-
"framer-motion": "10.11.0",
|
|
85
|
-
"i18next": "^22.4.15",
|
|
86
|
-
"memoize-one": "^6.0.0",
|
|
87
|
-
"re-resizable": "^6.9.9",
|
|
88
|
-
"react": "^18.2.0",
|
|
89
|
-
"react-colorful": "^5.6.1",
|
|
90
|
-
"react-currency-input-field": "^3.6.11",
|
|
91
|
-
"react-dom": "^18.2.0",
|
|
92
|
-
"react-draggable": "^4.4.6",
|
|
93
|
-
"react-dropzone": "^14.2.3",
|
|
94
|
-
"react-hook-form": "^7.45.4",
|
|
95
|
-
"react-hot-toast": "^2.4.1",
|
|
96
|
-
"react-i18next": "^12.2.2",
|
|
97
|
-
"react-lazy-load-image-component": "^1.6.3",
|
|
98
|
-
"react-multi-date-picker": "^4.1.2",
|
|
99
|
-
"react-router-dom": "^7.7.0",
|
|
100
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
101
|
-
"react-window": "^1.8.9",
|
|
102
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
103
|
-
"react18-input-otp": "^1.1.4",
|
|
104
|
-
"recharts": "^2.15.1"
|
|
105
|
-
},
|
|
106
|
-
"devDependencies": {
|
|
107
|
-
"@eslint/js": "^9.17.0",
|
|
108
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
109
|
-
"@types/lodash": "^4.17.15",
|
|
110
|
-
"@types/react": "^18.2.6",
|
|
111
|
-
"@types/react-dom": "^18.3.5",
|
|
112
|
-
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
113
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
114
|
-
"@types/react-window": "^1.8.5",
|
|
115
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
116
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
117
|
-
"eslint": "^9.17.0",
|
|
118
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
119
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
120
|
-
"globals": "^15.14.0",
|
|
121
|
-
"husky": "^8.0.3",
|
|
122
|
-
"lint-staged": "^13.2.2",
|
|
123
|
-
"prettier": "^2.8.8",
|
|
124
|
-
"tsc-alias": "^1.8.16",
|
|
125
|
-
"typescript": "5.0.2",
|
|
126
|
-
"typescript-eslint": "^8.18.2",
|
|
127
|
-
"vite": "6.0.5",
|
|
128
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
129
|
-
},
|
|
130
|
-
"lint-staged": {
|
|
131
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
132
|
-
"yarn run prettier:fix",
|
|
133
|
-
"yarn run lint"
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
"publishConfig": {
|
|
137
|
-
"registry": "https://registry.npmjs.org/"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.1.101-test.5-test.6",
|
|
5
|
+
"testVersion": 6,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push:local": "yarn ts:build && yalc publish --push",
|
|
64
|
+
"push": "npm run ts:build && npm publish --access public",
|
|
65
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
66
|
+
"dev": "vite",
|
|
67
|
+
"build": "tsc -b && vite build ",
|
|
68
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
69
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
70
|
+
"lint": "eslint . --color",
|
|
71
|
+
"lint:fix": "eslint src --fix --color",
|
|
72
|
+
"preview": "vite preview",
|
|
73
|
+
"prepare": "husky"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@emotion/react": "^11.11.0",
|
|
77
|
+
"@emotion/styled": "^11.11.0",
|
|
78
|
+
"@hookform/resolvers": "^3.3.1",
|
|
79
|
+
"@mui/material": "^5.12.3",
|
|
80
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
81
|
+
"axios": "^1.4.0",
|
|
82
|
+
"color": "^5.0.0",
|
|
83
|
+
"dayjs": "^1.11.8",
|
|
84
|
+
"framer-motion": "10.11.0",
|
|
85
|
+
"i18next": "^22.4.15",
|
|
86
|
+
"memoize-one": "^6.0.0",
|
|
87
|
+
"re-resizable": "^6.9.9",
|
|
88
|
+
"react": "^18.2.0",
|
|
89
|
+
"react-colorful": "^5.6.1",
|
|
90
|
+
"react-currency-input-field": "^3.6.11",
|
|
91
|
+
"react-dom": "^18.2.0",
|
|
92
|
+
"react-draggable": "^4.4.6",
|
|
93
|
+
"react-dropzone": "^14.2.3",
|
|
94
|
+
"react-hook-form": "^7.45.4",
|
|
95
|
+
"react-hot-toast": "^2.4.1",
|
|
96
|
+
"react-i18next": "^12.2.2",
|
|
97
|
+
"react-lazy-load-image-component": "^1.6.3",
|
|
98
|
+
"react-multi-date-picker": "^4.1.2",
|
|
99
|
+
"react-router-dom": "^7.7.0",
|
|
100
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
101
|
+
"react-window": "^1.8.9",
|
|
102
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
103
|
+
"react18-input-otp": "^1.1.4",
|
|
104
|
+
"recharts": "^2.15.1"
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@eslint/js": "^9.17.0",
|
|
108
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
109
|
+
"@types/lodash": "^4.17.15",
|
|
110
|
+
"@types/react": "^18.2.6",
|
|
111
|
+
"@types/react-dom": "^18.3.5",
|
|
112
|
+
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
113
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
114
|
+
"@types/react-window": "^1.8.5",
|
|
115
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
116
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
117
|
+
"eslint": "^9.17.0",
|
|
118
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
119
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
120
|
+
"globals": "^15.14.0",
|
|
121
|
+
"husky": "^8.0.3",
|
|
122
|
+
"lint-staged": "^13.2.2",
|
|
123
|
+
"prettier": "^2.8.8",
|
|
124
|
+
"tsc-alias": "^1.8.16",
|
|
125
|
+
"typescript": "5.0.2",
|
|
126
|
+
"typescript-eslint": "^8.18.2",
|
|
127
|
+
"vite": "6.0.5",
|
|
128
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
129
|
+
},
|
|
130
|
+
"lint-staged": {
|
|
131
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
132
|
+
"yarn run prettier:fix",
|
|
133
|
+
"yarn run lint"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"registry": "https://registry.npmjs.org/"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { StatusChipWithCopyProps } from '../StatusChipWithCopy';
|
|
3
|
-
export interface AmountStatusChipProps extends StatusChipWithCopyProps {
|
|
4
|
-
amount?: string;
|
|
5
|
-
currency?: string;
|
|
6
|
-
}
|
|
7
|
-
declare function AmountStatusChip({ amount, currency, ...rest }: AmountStatusChipProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare const _default: import("react").MemoExoticComponent<typeof AmountStatusChip>;
|
|
9
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
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 } from 'react';
|
|
14
|
-
import CurrencyIcon from '../CurrencyIcon';
|
|
15
|
-
import { AmountLabel, CurrencyIconContainer, StyledAmountStatusChip } from './style';
|
|
16
|
-
function AmountStatusChip(_a) {
|
|
17
|
-
var { amount, currency } = _a, rest = __rest(_a, ["amount", "currency"]);
|
|
18
|
-
return (_jsxs(StyledAmountStatusChip, Object.assign({ expandDirection: "left" }, rest, { children: [currency && (_jsx(AmountLabel, { children: _jsx(CurrencyIconContainer, { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }) })), amount] })));
|
|
19
|
-
}
|
|
20
|
-
export default memo(AmountStatusChip);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const StyledAmountStatusChip: import("@emotion/styled").StyledComponent<import("../StatusChipWithCopy").StatusChipWithCopyProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
3
|
-
export declare const AmountLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
|
-
export declare const CurrencyIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { styled } from '@mui/material/styles';
|
|
2
|
-
import StatusChipWithCopy from '../StatusChipWithCopy';
|
|
3
|
-
export const StyledAmountStatusChip = styled(StatusChipWithCopy)(() => ({
|
|
4
|
-
backgroundColor: '#EFF1F2',
|
|
5
|
-
border: 'none',
|
|
6
|
-
display: 'flex',
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
transition: 'none !important',
|
|
10
|
-
animation: 'none !important',
|
|
11
|
-
transform: 'none !important',
|
|
12
|
-
'& *': {
|
|
13
|
-
transition: 'none !important',
|
|
14
|
-
animation: 'none !important',
|
|
15
|
-
transform: 'none !important',
|
|
16
|
-
},
|
|
17
|
-
}));
|
|
18
|
-
export const AmountLabel = styled('span')(() => ({
|
|
19
|
-
marginRight: '2px',
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
}));
|
|
23
|
-
export const CurrencyIconContainer = styled('span')(() => ({
|
|
24
|
-
marginInline: '1.5px',
|
|
25
|
-
display: 'flex',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
}));
|