@tap-payments/os-micro-frontend-shared 0.1.60-test.6 → 0.1.61

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 (50) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/AccountDropdown/style.d.ts +1 -1
  4. package/build/components/ActivityAreaChart/styles.d.ts +3 -3
  5. package/build/components/AppServices/style.d.ts +1 -1
  6. package/build/components/CircularProgressWithLabel/style.d.ts +1 -1
  7. package/build/components/DockButton/style.d.ts +1 -1
  8. package/build/components/FileUpload/style.d.ts +2 -2
  9. package/build/components/FileUploader/style.d.ts +1 -1
  10. package/build/components/IconWithLabel/style.d.ts +1 -1
  11. package/build/components/IconsDropdown/style.d.ts +2 -2
  12. package/build/components/JSONViewer/style.d.ts +1 -1
  13. package/build/components/LabeledIconDropdown/style.d.ts +3 -3
  14. package/build/components/MultiSelectWithSearch/style.d.ts +3 -3
  15. package/build/components/NestedDropdown/styles.d.ts +1 -1
  16. package/build/components/ProgressBar/style.d.ts +1 -1
  17. package/build/components/ProgressRing/style.d.ts +2 -2
  18. package/build/components/RFH/Inputs/SelectWithAccordion/style.d.ts +3 -3
  19. package/build/components/SelectDropdown/style.d.ts +1 -1
  20. package/build/components/SelectWithSearch/style.d.ts +3 -3
  21. package/build/components/StatusChipWithCopy/utils.d.ts +1 -1
  22. package/build/components/StatusLabel/style.d.ts +1 -1
  23. package/build/components/TableHeader/style.d.ts +1 -1
  24. package/build/components/Timepicker/style.d.ts +2 -2
  25. package/build/components/ToolbarIcon/ExpandButton/style.d.ts +1 -1
  26. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.d.ts +1 -1
  27. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.js +2 -3
  28. package/build/components/VirtualTables/SheetViewVirtualTable/style.js +0 -1
  29. package/build/components/VirtualTables/components/TableFooter/style.d.ts +2 -2
  30. package/build/components/VirtualTables/components/TableRow.js +4 -8
  31. package/build/components/VirtualTables/components/style.d.ts +0 -2
  32. package/build/components/VirtualTables/components/style.js +3 -7
  33. package/build/components/Widget/style.d.ts +1 -1
  34. package/build/components/WindowAppIcon/style.d.ts +1 -1
  35. package/build/components/WindowSideBar/WindowSideBar.d.ts +8 -4
  36. package/build/components/WindowSideBar/index.d.ts +0 -1
  37. package/build/components/index.d.ts +0 -1
  38. package/build/components/index.js +0 -1
  39. package/build/constants/assets.d.ts +0 -1
  40. package/build/constants/assets.js +0 -1
  41. package/build/types/user.d.ts +2 -1
  42. package/build/utils/style.d.ts +3 -5
  43. package/build/utils/style.js +11 -27
  44. package/package.json +134 -134
  45. package/build/components/WindowBackdrop/WindowBackdrop.d.ts +0 -6
  46. package/build/components/WindowBackdrop/WindowBackdrop.js +0 -9
  47. package/build/components/WindowBackdrop/index.d.ts +0 -1
  48. package/build/components/WindowBackdrop/index.js +0 -1
  49. package/build/components/WindowSideBar/type.d.ts +0 -10
  50. package/build/components/WindowSideBar/type.js +0 -1
@@ -107,7 +107,6 @@ export const checkIcon = `${appBaseUrl}/check.svg`;
107
107
  export const closeXIcon = `${appBaseUrl}/closeX.svg`;
108
108
  export const dragIcon = `${appBaseUrl}/drag.svg`;
109
109
  export const checkboxIcon = `${appBaseUrl}/checkboxIcon.svg`;
110
- export const whitePlusIcon = `${lightUrl}/plusWhite.svg`;
111
110
  export const protectIcon = `${appBaseUrl}/checkboxIcon.svg`;
112
111
  export const unisoIcon = `${lightUrl}/Uniso.svg`;
113
112
  export const addidasIcon = `${lightUrl}/addidas.svg`;
@@ -2,6 +2,7 @@ import { UserApp } from './apps';
2
2
  import { Brand } from './brand';
3
3
  import { Entity } from './entity';
4
4
  import { Merchant } from './merchant';
5
+ import { ACCOUNT_SECTION } from './account';
5
6
  import { Country } from './appConfig';
6
7
  export interface TextAndLang {
7
8
  lang: string;
@@ -160,7 +161,7 @@ export interface SegmentRole {
160
161
  role_id: string;
161
162
  }
162
163
  export interface UserSection {
163
- id: string;
164
+ id: ACCOUNT_SECTION;
164
165
  title?: string;
165
166
  icon?: string;
166
167
  }
@@ -14,11 +14,9 @@ interface GetSelectionStylesParams {
14
14
  type SelectionStyles = Record<string, string | Record<string, string>>;
15
15
  export declare const getSelectionStyles: ({ isSelected, isCellSelected, isColumnSelected, isRowSelected, isLastRow, }: GetSelectionStylesParams) => SelectionStyles;
16
16
  interface GetRowSelectionBorderStylesParams {
17
- isCellSelected: boolean;
18
- isNextCellSelected: boolean;
19
- effectiveLast: boolean;
17
+ effectiveFirst: boolean;
18
+ isPinnedStart: boolean;
20
19
  isPinnedEnd: boolean;
21
- colIndex: number;
22
20
  }
23
- export declare const getRowSelectionBorderStyles: ({ isCellSelected, isNextCellSelected, effectiveLast, isPinnedEnd, colIndex, }: GetRowSelectionBorderStylesParams) => SelectionStyles;
21
+ export declare const getRowSelectionBorderStyles: ({ effectiveFirst, isPinnedStart, isPinnedEnd }: GetRowSelectionBorderStylesParams) => SelectionStyles;
24
22
  export {};
@@ -37,16 +37,13 @@ const getRowSelectionStyles = () => ({
37
37
  },
38
38
  });
39
39
  const getSingleCellSelectionStyles = () => ({
40
- border: `1.5px solid ${SELECTION_COLORS.primary}`,
40
+ border: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
41
41
  backgroundColor: SELECTION_COLORS.background,
42
42
  color: SELECTION_COLORS.primary,
43
43
  borderRadius: '2px',
44
- '&:before': {
45
- border: `1.5px solid ${SELECTION_COLORS.primary}`,
46
- },
47
44
  });
48
45
  const getColumnSelectionStyles = (isLastRow) => {
49
- const borderWidth = getBorderWidthForColumn(isLastRow);
46
+ const borderWidth = getBorderWidthForColumn();
50
47
  const borderBottom = getBorderBottomForColumn(isLastRow);
51
48
  return {
52
49
  borderWidth,
@@ -57,31 +54,18 @@ const getColumnSelectionStyles = (isLastRow) => {
57
54
  minHeight: CELL_DIMENSIONS.minHeight,
58
55
  display: 'flex',
59
56
  alignItems: 'center',
60
- '&:before': {
61
- borderWidth,
62
- borderBottom: isLastRow
63
- ? `${BORDER_STYLES.thick} solid ${SELECTION_COLORS.primary}`
64
- : `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.transparent}`,
65
- },
66
57
  };
67
58
  };
68
- const getBorderWidthForColumn = (isLastRow) => {
69
- const { none, thick } = BORDER_STYLES;
70
- return isLastRow ? `${none} ${thick} ${thick} ${thick}` : `${none} ${thick} ${none} ${thick}`;
59
+ const getBorderWidthForColumn = () => {
60
+ const { none, thin } = BORDER_STYLES;
61
+ return `${none} ${thin} ${thin} ${thin}`;
71
62
  };
72
63
  const getBorderBottomForColumn = (isLastRow) => {
73
64
  return isLastRow ? `${BORDER_STYLES.thick} solid ${SELECTION_COLORS.primary}` : `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.border}`;
74
65
  };
75
- export const getRowSelectionBorderStyles = ({ isCellSelected, isNextCellSelected, effectiveLast, isPinnedEnd, colIndex, }) => (Object.assign(Object.assign(Object.assign({ borderRadius: '0px', '&:before': {
76
- border: 'none',
77
- }, '&:after': {
78
- border: 'none',
79
- }, border: `1.5px solid ${SELECTION_COLORS.primary}` }, (isCellSelected && Object.assign({ border: `1.5px solid ${SELECTION_COLORS.primary}` }, (isNextCellSelected && {
80
- borderRight: `1.5px solid ${SELECTION_COLORS.primary}`,
81
- })))), (isCellSelected &&
82
- colIndex > 0 && {
83
- borderLeft: `1.5px solid ${SELECTION_COLORS.primary}`,
84
- })), (effectiveLast &&
85
- isPinnedEnd && {
86
- borderRight: `2.5px solid ${SELECTION_COLORS.primary}`,
87
- })));
66
+ export const getRowSelectionBorderStyles = ({ effectiveFirst, isPinnedStart, isPinnedEnd }) => ({
67
+ borderTop: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
68
+ borderBottom: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
69
+ borderRight: `${BORDER_STYLES.thin} solid ${isPinnedEnd ? SELECTION_COLORS.primary : 'none'}`,
70
+ borderLeft: `${BORDER_STYLES.thin} solid ${isPinnedStart && effectiveFirst ? SELECTION_COLORS.primary : 'transparent'}`,
71
+ });
package/package.json CHANGED
@@ -1,134 +1,134 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.60-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": "npm run ts:build && npm publish --access public",
64
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
65
- "dev": "vite",
66
- "build": "tsc -b && vite build ",
67
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
68
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
69
- "lint": "eslint . --color",
70
- "lint:fix": "eslint src --fix --color",
71
- "preview": "vite preview",
72
- "prepare": "husky"
73
- },
74
- "dependencies": {
75
- "@emotion/react": "^11.11.0",
76
- "@emotion/styled": "^11.11.0",
77
- "@hookform/resolvers": "^3.3.1",
78
- "@mui/material": "^5.12.3",
79
- "@uiw/react-json-view": "^2.0.0-alpha.16",
80
- "axios": "^1.4.0",
81
- "dayjs": "^1.11.8",
82
- "framer-motion": "10.11.0",
83
- "i18next": "^22.4.15",
84
- "memoize-one": "^6.0.0",
85
- "re-resizable": "^6.9.9",
86
- "react": "^18.2.0",
87
- "react-currency-input-field": "^3.6.11",
88
- "react-dom": "^18.2.0",
89
- "react-draggable": "^4.4.6",
90
- "react-dropzone": "^14.2.3",
91
- "react-hook-form": "^7.45.4",
92
- "react-hot-toast": "^2.4.1",
93
- "react-i18next": "^12.2.2",
94
- "react-multi-date-picker": "^4.1.2",
95
- "react-router-dom": "^7.7.0",
96
- "react-virtualized-auto-sizer": "^1.0.20",
97
- "react-window": "^1.8.9",
98
- "react-window-infinite-loader": "^1.0.9",
99
- "react18-input-otp": "^1.1.4",
100
- "recharts": "^2.15.1"
101
- },
102
- "devDependencies": {
103
- "@eslint/js": "^9.17.0",
104
- "@testing-library/jest-dom": "^5.16.5",
105
- "@types/lodash": "^4.17.15",
106
- "@types/react": "^18.2.6",
107
- "@types/react-dom": "^18.3.5",
108
- "@types/react-virtualized-auto-sizer": "^1.0.8",
109
- "@types/react-window": "^1.8.5",
110
- "@types/react-window-infinite-loader": "^1.0.6",
111
- "@vitejs/plugin-react": "^4.3.4",
112
- "eslint": "^9.17.0",
113
- "eslint-plugin-react-hooks": "^5.0.0",
114
- "eslint-plugin-react-refresh": "^0.4.16",
115
- "globals": "^15.14.0",
116
- "husky": "^8.0.3",
117
- "lint-staged": "^13.2.2",
118
- "prettier": "^2.8.8",
119
- "tsc-alias": "^1.8.16",
120
- "typescript": "5.0.2",
121
- "typescript-eslint": "^8.18.2",
122
- "vite": "6.0.5",
123
- "vite-tsconfig-paths": "^4.2.0"
124
- },
125
- "lint-staged": {
126
- "src/**/*.{ts,tsx,json,js,jsx}": [
127
- "yarn run prettier:fix",
128
- "yarn run lint"
129
- ]
130
- },
131
- "publishConfig": {
132
- "registry": "https://registry.npmjs.org/"
133
- }
134
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.61",
5
+ "testVersion": 2,
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": "npm run ts:build && npm publish --access public",
64
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
65
+ "dev": "vite",
66
+ "build": "tsc -b && vite build ",
67
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
68
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
69
+ "lint": "eslint . --color",
70
+ "lint:fix": "eslint src --fix --color",
71
+ "preview": "vite preview",
72
+ "prepare": "husky"
73
+ },
74
+ "dependencies": {
75
+ "@emotion/react": "^11.11.0",
76
+ "@emotion/styled": "^11.11.0",
77
+ "@hookform/resolvers": "^3.3.1",
78
+ "@mui/material": "^5.12.3",
79
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
80
+ "axios": "^1.4.0",
81
+ "dayjs": "^1.11.8",
82
+ "framer-motion": "10.11.0",
83
+ "i18next": "^22.4.15",
84
+ "memoize-one": "^6.0.0",
85
+ "re-resizable": "^6.9.9",
86
+ "react": "^18.2.0",
87
+ "react-currency-input-field": "^3.6.11",
88
+ "react-dom": "^18.2.0",
89
+ "react-draggable": "^4.4.6",
90
+ "react-dropzone": "^14.2.3",
91
+ "react-hook-form": "^7.45.4",
92
+ "react-hot-toast": "^2.4.1",
93
+ "react-i18next": "^12.2.2",
94
+ "react-multi-date-picker": "^4.1.2",
95
+ "react-router-dom": "^7.7.0",
96
+ "react-virtualized-auto-sizer": "^1.0.20",
97
+ "react-window": "^1.8.9",
98
+ "react-window-infinite-loader": "^1.0.9",
99
+ "react18-input-otp": "^1.1.4",
100
+ "recharts": "^2.15.1"
101
+ },
102
+ "devDependencies": {
103
+ "@eslint/js": "^9.17.0",
104
+ "@testing-library/jest-dom": "^5.16.5",
105
+ "@types/lodash": "^4.17.15",
106
+ "@types/react": "^18.2.6",
107
+ "@types/react-dom": "^18.3.5",
108
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
109
+ "@types/react-window": "^1.8.5",
110
+ "@types/react-window-infinite-loader": "^1.0.6",
111
+ "@vitejs/plugin-react": "^4.3.4",
112
+ "eslint": "^9.17.0",
113
+ "eslint-plugin-react-hooks": "^5.0.0",
114
+ "eslint-plugin-react-refresh": "^0.4.16",
115
+ "globals": "^15.14.0",
116
+ "husky": "^8.0.3",
117
+ "lint-staged": "^13.2.2",
118
+ "prettier": "^2.8.8",
119
+ "tsc-alias": "^1.8.16",
120
+ "typescript": "5.0.2",
121
+ "typescript-eslint": "^8.18.2",
122
+ "vite": "6.0.5",
123
+ "vite-tsconfig-paths": "^4.2.0"
124
+ },
125
+ "lint-staged": {
126
+ "src/**/*.{ts,tsx,json,js,jsx}": [
127
+ "yarn run prettier:fix",
128
+ "yarn run lint"
129
+ ]
130
+ },
131
+ "publishConfig": {
132
+ "registry": "https://registry.npmjs.org/"
133
+ }
134
+ }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { BackdropProps as MuiBackdropProps } from '@mui/material/Backdrop';
3
- export type WindowBackdropProps = MuiBackdropProps;
4
- declare function WindowBackdrop(props: WindowBackdropProps): import("react").ReactPortal;
5
- declare const _default: import("react").MemoExoticComponent<typeof WindowBackdrop>;
6
- export default _default;
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { createPortal } from 'react-dom';
4
- import Backdrop from '@mui/material/Backdrop';
5
- import { alpha } from '@mui/material/styles';
6
- function WindowBackdrop(props) {
7
- return createPortal(_jsx(Backdrop, Object.assign({ sx: { zIndex: 1, backgroundColor: (theme) => alpha(theme.palette.common.black, 0.3) } }, props)), document.body);
8
- }
9
- export default memo(WindowBackdrop);
@@ -1 +0,0 @@
1
- export { default } from './WindowBackdrop';
@@ -1 +0,0 @@
1
- export { default } from './WindowBackdrop';
@@ -1,10 +0,0 @@
1
- export interface Section {
2
- id: string;
3
- title: string;
4
- icon?: string;
5
- subSections?: {
6
- id: string;
7
- title: string;
8
- icon?: string;
9
- }[];
10
- }
@@ -1 +0,0 @@
1
- export {};