@tap-payments/os-micro-frontend-shared 0.1.110 → 0.1.111-test.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/ReceiptViewer/ReceiptViewer.d.ts +2 -0
  4. package/build/components/ReceiptViewer/ReceiptViewer.js +122 -0
  5. package/build/components/ReceiptViewer/ReceiptViewerList.d.ts +9 -0
  6. package/build/components/ReceiptViewer/ReceiptViewerList.js +10 -0
  7. package/build/components/ReceiptViewer/components/FooterButton/FooterButton.d.ts +5 -0
  8. package/build/components/ReceiptViewer/components/FooterButton/FooterButton.js +44 -0
  9. package/build/components/ReceiptViewer/components/FooterButton/index.d.ts +2 -0
  10. package/build/components/ReceiptViewer/components/FooterButton/index.js +2 -0
  11. package/build/components/ReceiptViewer/components/ReceiptTitleBar/ReceiptTitleBar.d.ts +5 -0
  12. package/build/components/ReceiptViewer/components/ReceiptTitleBar/ReceiptTitleBar.js +9 -0
  13. package/build/components/ReceiptViewer/components/ReceiptTitleBar/index.d.ts +3 -0
  14. package/build/components/ReceiptViewer/components/ReceiptTitleBar/index.js +3 -0
  15. package/build/components/ReceiptViewer/components/ReceiptTitleBar/type.d.ts +11 -0
  16. package/build/components/ReceiptViewer/components/ReceiptTitleBar/type.js +1 -0
  17. package/build/components/ReceiptViewer/components/index.d.ts +2 -0
  18. package/build/components/ReceiptViewer/components/index.js +2 -0
  19. package/build/components/ReceiptViewer/context/Provider.d.ts +6 -0
  20. package/build/components/ReceiptViewer/context/Provider.js +42 -0
  21. package/build/components/ReceiptViewer/context/context.d.ts +3 -0
  22. package/build/components/ReceiptViewer/context/context.js +7 -0
  23. package/build/components/ReceiptViewer/context/index.d.ts +2 -0
  24. package/build/components/ReceiptViewer/context/index.js +2 -0
  25. package/build/components/ReceiptViewer/hooks/index.d.ts +1 -0
  26. package/build/components/ReceiptViewer/hooks/index.js +1 -0
  27. package/build/components/ReceiptViewer/hooks/useReceiptViewerContext.d.ts +8 -0
  28. package/build/components/ReceiptViewer/hooks/useReceiptViewerContext.js +18 -0
  29. package/build/components/ReceiptViewer/index.d.ts +7 -0
  30. package/build/components/ReceiptViewer/index.js +7 -0
  31. package/build/components/ReceiptViewer/style.d.ts +631 -0
  32. package/build/components/ReceiptViewer/style.js +176 -0
  33. package/build/components/ReceiptViewer/type.d.ts +22 -0
  34. package/build/components/ReceiptViewer/type.js +1 -0
  35. package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -0
  36. package/build/components/TableCells/CustomCells/ActionCell/constant.js +2 -1
  37. package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
  38. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
  39. package/build/components/index.d.ts +1 -0
  40. package/build/components/index.js +1 -0
  41. package/build/utils/object.d.ts +1 -0
  42. package/build/utils/object.js +4 -3
  43. package/package.json +139 -139
@@ -0,0 +1,176 @@
1
+ import { Box, Input, Popover, Typography, styled } from '@mui/material';
2
+ import { motion } from 'framer-motion';
3
+ export const FOOTER_HEIGHT = 37;
4
+ export const TITLE_BAR_HEIGHT = '32px';
5
+ export const VIEWER_HEIGHT = 545;
6
+ export const StyledPopover = styled(Popover)(({ theme }) => ({
7
+ backgroundColor: theme.palette.background.default,
8
+ boxShadow: theme.shadows[21],
9
+ '& .MuiPaper-root': {
10
+ borderRadius: '12px',
11
+ },
12
+ }));
13
+ export const HEADER_HEIGHT = 44;
14
+ export const jsonTheme = {
15
+ '--w-rjv-color': '#9cdcfe',
16
+ '--w-rjv-key-string': '#357fb9',
17
+ '--w-rjv-background-color': '#ffffff',
18
+ '--w-rjv-line-color': '#ffffff',
19
+ '--w-rjv-arrow-color': '#116e6bed',
20
+ '--w-rjv-edit-color': '#9cdcfe',
21
+ '--w-rjv-info-color': '#9c9c9c7a',
22
+ '--w-rjv-update-color': '#FFE20B',
23
+ '--w-rjv-copied-color': '#9cdcfe',
24
+ '--w-rjv-copied-success-color': '#28a745',
25
+ '--w-rjv-curlybraces-color': '#000000',
26
+ '--w-rjv-colon-color': '#000000',
27
+ '--w-rjv-brackets-color': '#000000',
28
+ '--w-rjv-quotes-color': '#9cdcfe',
29
+ '--w-rjv-quotes-string-color': '#c27c46',
30
+ '--w-rjv-type-string-color': '#c27c46',
31
+ '--w-rjv-type-int-color': '#956ea5',
32
+ '--w-rjv-type-float-color': '#956ea5',
33
+ '--w-rjv-type-bigint-color': '#956ea5',
34
+ '--w-rjv-type-boolean-color': '#956ea5',
35
+ '--w-rjv-type-date-color': '#956ea5',
36
+ '--w-rjv-type-url-color': '#3b89cf',
37
+ '--w-rjv-type-null-color': '#956ea5',
38
+ '--w-rjv-type-nan-color': '#956ea5',
39
+ '--w-rjv-type-undefined-color': '#956ea5',
40
+ padding: '1rem',
41
+ height: `calc(100% - ${HEADER_HEIGHT + FOOTER_HEIGHT}px`,
42
+ overflow: 'auto',
43
+ };
44
+ export const requestJsonTheme = Object.assign(Object.assign({}, jsonTheme), { background: 'transparent', '--w-rjv-line-color': 'transparent' });
45
+ export const StyledAnimatedButton = styled('button')(({ theme }) => ({
46
+ padding: '0rem',
47
+ borderRadius: '0.25rem',
48
+ backgroundColor: theme.palette.background.paper,
49
+ display: 'flex',
50
+ alignItems: 'center',
51
+ justifyContent: 'center',
52
+ gap: '0.25rem',
53
+ color: theme.palette.text.primary,
54
+ fontSize: '0.625rem',
55
+ fontWeight: theme.typography.fontWeightBold,
56
+ outline: 'none',
57
+ cursor: 'pointer',
58
+ border: `1px solid ${theme.palette.grey['100']}`,
59
+ '&:hover': {
60
+ boxShadow: '0px 0px 8px 0px rgba(31, 136, 208, 0.30)',
61
+ border: `1px solid ${theme.palette.info.dark};`,
62
+ },
63
+ position: 'relative',
64
+ overflow: 'hidden',
65
+ transition: 'all 0.2s ease-in-out',
66
+ width: '24px',
67
+ height: '24px',
68
+ flexShrink: 0,
69
+ }));
70
+ export const StyledCopyButton = styled('button')(({ theme }) => ({
71
+ outline: 'none',
72
+ cursor: 'pointer',
73
+ border: `1px solid transparent`,
74
+ '&:hover': {
75
+ boxShadow: theme.shadows[8],
76
+ },
77
+ borderRadius: '0.25rem',
78
+ position: 'relative',
79
+ backgroundColor: theme.palette.background.transparent,
80
+ display: 'inline-flex',
81
+ alignItems: 'center',
82
+ justifyContent: 'center',
83
+ }));
84
+ export const StyledSearchInput = styled(Input)(({ theme }) => ({
85
+ border: `1px solid ${theme.palette.grey[100]}`,
86
+ borderRadius: '0.25rem',
87
+ padding: '0.375rem',
88
+ fontSize: '0.625rem',
89
+ outline: 'none',
90
+ width: '100%',
91
+ maxWidth: '150px',
92
+ height: '1.5rem',
93
+ backgroundColor: theme.palette.background.paper,
94
+ '&:focus': {
95
+ border: `1px solid ${theme.palette.info.dark}`,
96
+ },
97
+ }));
98
+ export const StyledTitle = styled(Typography)(() => ({
99
+ border: '1px solid rgba(242, 242, 242, 0.70);',
100
+ display: 'inline-flex',
101
+ height: '24px',
102
+ padding: '0px 8px',
103
+ justifyContent: 'center',
104
+ alignItems: 'center',
105
+ borderRadius: '37.5px',
106
+ backgroundColor: '#fff',
107
+ }));
108
+ export const SectionWrapper = styled(Box, {
109
+ shouldForwardProp: (prop) => !['isMaximized', 'isScrollingRequest', 'isRequestShown'].includes(prop),
110
+ })(({ isScrollingRequest, isMaximized, isRequestShown, theme }) => (Object.assign(Object.assign({ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '4px', paddingBlock: '0px', paddingInlineStart: '12px', paddingInlineEnd: '12px', position: 'sticky', left: 0, right: 0, top: 0, background: '#fff', zIndex: 5 }, (isScrollingRequest && {
111
+ boxShadow: theme.shadows[23],
112
+ })), (isMaximized && Object.assign({ paddingTop: TITLE_BAR_HEIGHT, transition: 'padding 0.3s ease-in-out' }, (isRequestShown && {
113
+ width: '50%',
114
+ }))))));
115
+ export const FooterWrapper = styled(Box, {
116
+ shouldForwardProp: (prop) => !['isMaximized', 'isRequestShown'].includes(prop),
117
+ })(({ isMaximized, isRequestShown }) => (Object.assign({ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '8px', height: FOOTER_HEIGHT, position: 'fixed', bottom: 0, right: 0, left: isMaximized ? '50vw' : 0 }, (!isRequestShown && {
118
+ left: 0,
119
+ }))));
120
+ export const ButtonsWrapper = styled(Box)(() => ({
121
+ display: 'flex',
122
+ justifyContent: 'flex-end',
123
+ alignItems: 'center',
124
+ gap: '4px',
125
+ paddingBlock: '10px',
126
+ paddingInlineStart: '8px',
127
+ paddingInlineEnd: '0px',
128
+ }));
129
+ export const StyledHeaderWrapper = styled(Box)(() => ({
130
+ display: 'flex',
131
+ justifyContent: 'flex-start',
132
+ alignItems: 'center',
133
+ gap: '4px',
134
+ paddingBlock: '10px',
135
+ paddingInlineStart: '0px',
136
+ paddingInlineEnd: '12px',
137
+ }));
138
+ export const JSONViewerWrapper = styled(motion.div, {
139
+ shouldForwardProp: (prop) => !['isRequestShown', 'isMaximized'].includes(prop),
140
+ })(({ isRequestShown, isMaximized }) => (Object.assign({ width: '100%', height: '100%', overflowY: 'auto', background: '#fff', zIndex: 20, position: 'relative', display: 'flex', flexDirection: 'column', borderBottomRightRadius: '12px', borderBottomLeftRadius: isRequestShown ? 0 : '12px' }, (isMaximized && {
141
+ borderBottomLeftRadius: 0,
142
+ borderBottomRightRadius: 0,
143
+ height: '100vh',
144
+ }))));
145
+ export const JSONViewerWrapperRequest = styled(motion.div, {
146
+ shouldForwardProp: (prop) => !['isMaximized', 'currentRequestWidth'].includes(prop),
147
+ })(({ isMaximized, currentRequestWidth }) => ({
148
+ backgroundColor: '#E7E7E7B2',
149
+ backdropFilter: 'blur(12px)',
150
+ height: isMaximized ? '100vh' : '100%',
151
+ overflowY: 'auto',
152
+ position: 'absolute',
153
+ width: isMaximized ? '100vw' : currentRequestWidth,
154
+ zIndex: 19,
155
+ display: 'flex',
156
+ flexDirection: 'column',
157
+ borderBottomLeftRadius: '12px',
158
+ }));
159
+ export const JSONViewerScreenContainer = styled(Box, {
160
+ shouldForwardProp: (prop) => !['isMaximized', 'currentHeight'].includes(prop),
161
+ })(({ isMaximized, currentHeight }) => ({
162
+ display: 'flex',
163
+ flexDirection: 'row',
164
+ justifyContent: 'space-between',
165
+ alignItems: 'flex-start',
166
+ height: isMaximized ? `calc(100vh - ${FOOTER_HEIGHT}px)` : (currentHeight || VIEWER_HEIGHT) - FOOTER_HEIGHT + 5,
167
+ background: 'transparent',
168
+ position: 'fixed',
169
+ width: '100%',
170
+ }));
171
+ export const JSONContainer = styled(Box)(() => ({
172
+ position: 'fixed',
173
+ width: '100%',
174
+ background: 'transparent',
175
+ height: '100%',
176
+ }));
@@ -0,0 +1,22 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export type ReceiptViewerProps = JsonViewer & {
3
+ index: number;
4
+ onClose: () => void;
5
+ isWindowMinimized?: boolean;
6
+ windowOrder?: number;
7
+ };
8
+ export interface AnimatedButtonProps extends HTMLAttributes<HTMLButtonElement> {
9
+ label?: ReactNode;
10
+ icon?: string;
11
+ disableAnimation?: boolean;
12
+ }
13
+ export type JsonViewer = {
14
+ json: Record<string, any>;
15
+ requestJson?: Record<string, any>;
16
+ };
17
+ export type ReceiptViewerContext = {
18
+ receiptViewerList: JsonViewer[];
19
+ handleReceiptViewerDialogOpen: (jsonViewer: JsonViewer) => void;
20
+ handleWindowMinimize: (value: boolean) => void;
21
+ handleWindowOrder: (value: number) => void;
22
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -29,4 +29,5 @@ export declare const actionIcons: {
29
29
  brand: string;
30
30
  clipboard: string;
31
31
  viewApi: string;
32
+ viewReceipt: string;
32
33
  };
@@ -1,5 +1,5 @@
1
1
  import { BadgeVariants } from '../../../CountBadge';
2
- import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, jsonBlackIcon, } from '../../../../constants/index.js';
2
+ import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, jsonBlackIcon, receiptBillIcon, } from '../../../../constants/index.js';
3
3
  export const flags = {
4
4
  GRAY: { icon: closedFlagIcon, color: '#CFCFCF' },
5
5
  ORANGE: { icon: orangeFlagIcon, color: '#FFD503' },
@@ -25,4 +25,5 @@ export const actionIcons = {
25
25
  brand: brandPlaceholderIcon,
26
26
  clipboard: clipboardIcon,
27
27
  viewApi: jsonBlackIcon,
28
+ viewReceipt: receiptBillIcon,
28
29
  };
@@ -13,7 +13,7 @@ export declare function useActionCell({ actions, isDropdownShown, onCloseDropdow
13
13
  label: string;
14
14
  onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
15
15
  onRightClick?: ((e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void) | undefined;
16
- icon: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi";
16
+ icon: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | "viewReceipt";
17
17
  isLoading?: boolean | undefined;
18
18
  isError?: boolean | undefined;
19
19
  isSuccess?: boolean | undefined;
@@ -283,5 +283,5 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
283
283
  fetchPriority?: "auto" | "high" | "low" | undefined;
284
284
  srcSet?: string | undefined;
285
285
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
286
- icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | undefined;
286
+ icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | "viewReceipt" | undefined;
287
287
  }, {}, {}>;
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip, type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as ReceiptViewer, type ReceiptTitleBarProps, type ReceiptViewerProps, ReceiptTitleBar, ReceiptViewerDialogContext, ReceiptViewerList, useReceiptViewerContext, ReceiptViewerDialogContextProvider, } from './ReceiptViewer';
@@ -108,3 +108,4 @@ export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip } from './AmountStatusChip';
109
109
  export { default as AuthenticationTypeChip } from './AuthenticationTypeChip';
110
110
  export * from './LazyImage';
111
+ export { default as ReceiptViewer, ReceiptTitleBar, ReceiptViewerDialogContext, ReceiptViewerList, useReceiptViewerContext, ReceiptViewerDialogContextProvider, } from './ReceiptViewer';
@@ -1,6 +1,7 @@
1
1
  export declare function removeUndefinedValues(obj: Record<string, unknown>): {
2
2
  [k: string]: unknown;
3
3
  };
4
+ export declare const isEmptyValue: (value: unknown) => boolean;
4
5
  export declare function removeUndefinedArrayValues(obj: Record<string, unknown>): {
5
6
  [k: string]: unknown;
6
7
  };
@@ -1,14 +1,15 @@
1
1
  export function removeUndefinedValues(obj) {
2
2
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
3
3
  }
4
+ export const isEmptyValue = (value) => value === undefined || value === null || value === '';
4
5
  export function removeUndefinedArrayValues(obj) {
5
6
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => {
6
7
  if (Array.isArray(value)) {
7
- return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => v !== undefined && v !== null && v !== ''));
8
+ return value.length > 0 && (value === null || value === void 0 ? void 0 : value.some((v) => !isEmptyValue(v)));
8
9
  }
9
10
  if (typeof value === 'object') {
10
- return Object.values(value || {}).some((v) => v !== undefined && v !== null && v !== '');
11
+ return Object.values(value || {}).some((v) => !isEmptyValue(v));
11
12
  }
12
- return !!value;
13
+ return !isEmptyValue(value);
13
14
  }));
14
15
  }
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.110",
5
- "testVersion": 1,
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.111-test.3",
5
+ "testVersion": 3,
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
+ }