@tap-payments/os-micro-frontend-shared 0.0.12 → 0.0.13

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 (72) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/AccordionAdapter/style.d.ts +2 -2
  4. package/build/components/AccountDropdown/Dropdown.d.ts +13 -0
  5. package/build/components/AccountDropdown/Dropdown.js +17 -0
  6. package/build/components/AccountDropdown/index.d.ts +2 -0
  7. package/build/components/AccountDropdown/index.js +2 -0
  8. package/build/components/AccountDropdown/style.d.ts +20 -0
  9. package/build/components/AccountDropdown/style.js +26 -0
  10. package/build/components/AppWindowWrapper/AppWindow/style.d.ts +2 -2
  11. package/build/components/AppWindowWrapper/headers/AccountHeader/index.d.ts +1 -1
  12. package/build/components/AppWindowWrapper/index.d.ts +1 -1
  13. package/build/components/Button/style.d.ts +1 -1
  14. package/build/components/Calender/style.d.ts +4 -4
  15. package/build/components/ConfirmDialog/styles.d.ts +1 -1
  16. package/build/components/DropdownButton/constants.d.ts +2 -2
  17. package/build/components/DropdownButton/style.d.ts +2 -2
  18. package/build/components/DropdownMenu/styles.d.ts +2 -2
  19. package/build/components/ErrorBoundary/style.d.ts +1 -1
  20. package/build/components/FileUpload/style.d.ts +1 -1
  21. package/build/components/InputBase/AmountInputBase/InputNumber/InputNumber.d.ts +1 -5
  22. package/build/components/InputBase/AmountInputBase/InputNumber/index.d.ts +2 -2
  23. package/build/components/InputBase/AmountInputBase/InputNumber/index.js +1 -0
  24. package/build/components/InputBase/AmountInputBase/InputNumber/type.d.ts +5 -0
  25. package/build/components/InputBase/AmountInputBase/InputNumber/type.js +1 -0
  26. package/build/components/InputBase/AmountInputBase/index.d.ts +1 -1
  27. package/build/components/InputBase/SelectBase/index.d.ts +1 -1
  28. package/build/components/InputBase/SelectBase/style.d.ts +1 -1
  29. package/build/components/Inputs/FileInput/style.d.ts +1 -1
  30. package/build/components/JSONViewer/components/index.d.ts +1 -1
  31. package/build/components/RFH/Inputs/AmountInput/AmountInput.d.ts +1 -5
  32. package/build/components/RFH/Inputs/AmountInput/index.d.ts +2 -2
  33. package/build/components/RFH/Inputs/AmountInput/index.js +1 -0
  34. package/build/components/RFH/Inputs/AmountInput/type.d.ts +5 -0
  35. package/build/components/RFH/Inputs/AmountInput/type.js +1 -0
  36. package/build/components/RFH/Inputs/index.d.ts +3 -3
  37. package/build/components/SearchButton/styles.d.ts +1 -1
  38. package/build/components/StatusButton/style.d.ts +2 -2
  39. package/build/components/StatusIcons/index.d.ts +3 -3
  40. package/build/components/TableCells/CustomCells/ApplicationStatusCell/ApplicationStatusCell.js +3 -3
  41. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.js +1 -2
  42. package/build/components/TableCells/CustomCells/CheckoutStatusCell/index.d.ts +1 -1
  43. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.d.ts +3 -0
  44. package/build/components/TableCells/CustomCells/SegmentsCell/SegmentsCell.js +41 -0
  45. package/build/components/TableCells/CustomCells/SegmentsCell/constant.d.ts +6 -0
  46. package/build/components/TableCells/CustomCells/SegmentsCell/constant.js +7 -0
  47. package/build/components/TableCells/CustomCells/SegmentsCell/index.d.ts +2 -0
  48. package/build/components/TableCells/CustomCells/SegmentsCell/index.js +2 -0
  49. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +288 -0
  50. package/build/components/TableCells/CustomCells/SegmentsCell/style.js +55 -0
  51. package/build/components/TableCells/CustomCells/SegmentsCell/type.d.ts +10 -0
  52. package/build/components/TableCells/CustomCells/SegmentsCell/type.js +1 -0
  53. package/build/components/TableCells/CustomCells/index.d.ts +2 -0
  54. package/build/components/TableCells/CustomCells/index.js +2 -0
  55. package/build/components/VirtualTable/components/ColumnFilter/Inputs/style.d.ts +1 -1
  56. package/build/components/VirtualTable/components/ColumnFilter/style.d.ts +2 -2
  57. package/build/components/VirtualTable/components/ErrorList/styles.d.ts +1 -1
  58. package/build/components/WindowSideBar/WindowSideBar.d.ts +4 -7
  59. package/build/components/index.d.ts +1 -0
  60. package/build/components/index.js +1 -0
  61. package/build/constants/assets.d.ts +5 -0
  62. package/build/constants/assets.js +5 -0
  63. package/build/types/account.d.ts +6 -0
  64. package/build/types/account.js +7 -0
  65. package/build/types/apps.d.ts +7 -1
  66. package/build/types/index.d.ts +1 -0
  67. package/build/types/index.js +1 -0
  68. package/build/types/merchant.d.ts +152 -0
  69. package/build/types/user.d.ts +55 -0
  70. package/package.json +88 -88
  71. package/build/components/TableCells/CustomCells/ApplicationStatusCell/constants.d.ts +0 -6
  72. package/build/components/TableCells/CustomCells/ApplicationStatusCell/constants.js +0 -7
@@ -0,0 +1,7 @@
1
+ export var ACCOUNT_SECTION;
2
+ (function (ACCOUNT_SECTION) {
3
+ ACCOUNT_SECTION["BRAND"] = "brand";
4
+ ACCOUNT_SECTION["ENTITY"] = "entity";
5
+ ACCOUNT_SECTION["USERS"] = "users";
6
+ ACCOUNT_SECTION["USER_ROLES"] = "userRoles";
7
+ })(ACCOUNT_SECTION || (ACCOUNT_SECTION = {}));
@@ -1,6 +1,12 @@
1
1
  import { ColumnsView } from './column';
2
2
  import { TextAndLang } from './user';
3
- export interface AppPayload {
3
+ import { BusinessMerchant } from './merchant';
4
+ export interface AccountAppPayload {
5
+ disabledAccountDataFetching?: boolean;
6
+ isAccountDetailsOpen: boolean;
7
+ selectedMerchant?: BusinessMerchant;
8
+ }
9
+ export interface AppPayload extends Partial<AccountAppPayload> {
4
10
  columnFilters?: Record<string, any>;
5
11
  filteredIds?: string[];
6
12
  dateRange?: [Date, Date];
@@ -22,3 +22,4 @@ export * from './source';
22
22
  export * from './analytics';
23
23
  export * from './refund';
24
24
  export * from './destination';
25
+ export * from './account';
@@ -22,3 +22,4 @@ export * from './source';
22
22
  export * from './analytics';
23
23
  export * from './refund';
24
24
  export * from './destination';
25
+ export * from './account';
@@ -8,3 +8,155 @@ export interface Merchant {
8
8
  status: string;
9
9
  display_name: string;
10
10
  }
11
+ export type VerificationStatus = 'incomplete' | 'complete' | 'reviewed' | 'verified';
12
+ export type MerchantStatus = 'completed' | 'all';
13
+ export interface BusinessMerchant {
14
+ id: string;
15
+ status: MerchantStatus;
16
+ created: number;
17
+ object: string;
18
+ live_mode: boolean;
19
+ api_version: string;
20
+ comments_count: number;
21
+ reference_id: string;
22
+ control_by: string;
23
+ business: {
24
+ id: string;
25
+ status: MerchantStatus;
26
+ brand: {
27
+ id: string;
28
+ status: VerificationStatus;
29
+ name: {
30
+ textId: string;
31
+ ar: string;
32
+ en: string;
33
+ };
34
+ logo: string;
35
+ };
36
+ entity: {
37
+ id: string;
38
+ status: VerificationStatus;
39
+ merchant: {
40
+ id: string;
41
+ status: MerchantStatus;
42
+ commerceplatform: {
43
+ id: string;
44
+ name: {
45
+ en: string;
46
+ };
47
+ logo: string;
48
+ operator_id: string;
49
+ };
50
+ wallet: {
51
+ id: string;
52
+ status: MerchantStatus;
53
+ bank_account: {
54
+ id: string;
55
+ status: MerchantStatus;
56
+ iban: string;
57
+ };
58
+ payout_status: string;
59
+ payout_status_control: string;
60
+ };
61
+ created: number;
62
+ country: string;
63
+ terminal: {
64
+ id: string;
65
+ authorizes: {
66
+ status: string;
67
+ status_message: string;
68
+ };
69
+ charges: {
70
+ status: string;
71
+ status_message: string;
72
+ };
73
+ refunds: {
74
+ status: string;
75
+ status_message: string;
76
+ };
77
+ virtual: boolean;
78
+ acceptance_status: string;
79
+ acceptance_status_control: string;
80
+ };
81
+ payout_status: 'enabled' | 'disabled';
82
+ acceptance_status: 'enabled' | 'disabled';
83
+ legacy_id: string;
84
+ base_currency: string;
85
+ payment_provider: {
86
+ technology_id: string;
87
+ settlement_by: string;
88
+ };
89
+ development_house: {
90
+ id: string;
91
+ name: {
92
+ ar: string | null;
93
+ en: string;
94
+ };
95
+ logo: string;
96
+ };
97
+ payment_provider_info: {
98
+ technology: {
99
+ id: string;
100
+ name: {
101
+ ar: string | null;
102
+ en: string;
103
+ };
104
+ logo: string;
105
+ };
106
+ settlement_by: {
107
+ id: string;
108
+ name: {
109
+ ar: string | null;
110
+ en: string;
111
+ };
112
+ logo: string;
113
+ };
114
+ };
115
+ };
116
+ country: string;
117
+ license: {
118
+ number: string;
119
+ };
120
+ tax_status: MerchantStatus;
121
+ };
122
+ user: {
123
+ id: string;
124
+ status: VerificationStatus;
125
+ names: {
126
+ ar: {
127
+ first: string;
128
+ middle: string;
129
+ third: string;
130
+ };
131
+ en: {
132
+ first: string;
133
+ middle: string;
134
+ last: string;
135
+ third: string;
136
+ };
137
+ };
138
+ identification_id: string;
139
+ };
140
+ individuals: {
141
+ status: VerificationStatus;
142
+ count: number;
143
+ };
144
+ primary_contact: {
145
+ email: string;
146
+ phone: {
147
+ country_code: string;
148
+ number: string;
149
+ };
150
+ };
151
+ };
152
+ lead: {
153
+ id: string;
154
+ status: MerchantStatus;
155
+ created: number;
156
+ };
157
+ track: Array<{
158
+ id: string;
159
+ status: MerchantStatus;
160
+ created: number;
161
+ }>;
162
+ }
@@ -2,6 +2,8 @@ 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';
6
+ import { Country } from './appConfig';
5
7
  export interface TextAndLang {
6
8
  lang: string;
7
9
  text: string;
@@ -155,4 +157,57 @@ export interface SegmentRole {
155
157
  segment_id: string;
156
158
  role_id: string;
157
159
  }
160
+ export interface UserSection {
161
+ id: ACCOUNT_SECTION;
162
+ title?: string;
163
+ icon?: string;
164
+ }
165
+ export interface UserSections {
166
+ sections: UserSection[];
167
+ }
168
+ export interface UserListItem {
169
+ id: string | number;
170
+ label: string | number;
171
+ }
172
+ export interface UserFormValues {
173
+ firstName: string;
174
+ lastName: string;
175
+ email: string;
176
+ nationality: Country;
177
+ country: Country;
178
+ phoneNumber: string;
179
+ identificationNumber?: string;
180
+ identificationType?: UserListItem;
181
+ expiryDay?: UserListItem;
182
+ expiryMonth?: UserListItem;
183
+ expiryYear?: UserListItem;
184
+ issuedCountry?: Country;
185
+ isAuthorized?: boolean;
186
+ }
187
+ export interface CreateUserFormValues extends UserFormValues {
188
+ userRole: UserListItem;
189
+ }
190
+ export interface UserFormI {
191
+ name: {
192
+ first: string;
193
+ last: string;
194
+ };
195
+ email: string;
196
+ user_role?: string;
197
+ phone: string;
198
+ nationality: string;
199
+ country: {
200
+ countryId: string;
201
+ idd_prefix: number;
202
+ };
203
+ expiry?: {
204
+ day?: number;
205
+ month?: number;
206
+ year?: number;
207
+ } | null;
208
+ id_number?: string;
209
+ issued_country?: string;
210
+ id_type?: string;
211
+ is_authorized?: boolean;
212
+ }
158
213
  export {};
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.12",
5
- "type": "module",
6
- "main": "build/index.js",
7
- "module": "build/index.js",
8
- "types": "build/index.d.ts",
9
- "license": "MIT",
10
- "author": {
11
- "name": "Ahmed Sharkawy",
12
- "email": "a.elsharkawy@tap.company"
13
- },
14
- "files": [
15
- "build",
16
- "readme.md"
17
- ],
18
- "scripts": {
19
- "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
20
- "push": "npm run ts:build && npm publish --access public",
21
- "dev": "vite",
22
- "build": "tsc -b && vite build ",
23
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
24
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
25
- "lint": "eslint . --color",
26
- "lint:fix": "eslint src --fix --color",
27
- "preview": "vite preview",
28
- "prepare": "husky"
29
- },
30
- "dependencies": {
31
- "@emotion/react": "^11.11.0",
32
- "@emotion/styled": "^11.11.0",
33
- "@hookform/resolvers": "^3.3.1",
34
- "@mui/material": "^5.12.3",
35
- "@uiw/react-json-view": "^2.0.0-alpha.16",
36
- "axios": "^1.4.0",
37
- "dayjs": "^1.11.8",
38
- "framer-motion": "10.11.0",
39
- "i18next": "^22.4.15",
40
- "memoize-one": "^6.0.0",
41
- "re-resizable": "^6.9.9",
42
- "react": "^18.2.0",
43
- "react-currency-input-field": "^3.6.11",
44
- "react-dom": "^18.2.0",
45
- "react-draggable": "^4.4.6",
46
- "react-dropzone": "^14.2.3",
47
- "react-hook-form": "^7.45.4",
48
- "react-hot-toast": "^2.4.1",
49
- "react-i18next": "^12.2.2",
50
- "react-multi-date-picker": "^4.1.2",
51
- "react-query": "^3.39.3",
52
- "react-router-dom": "^6.14.2",
53
- "react-virtualized-auto-sizer": "^1.0.20",
54
- "react-window": "^1.8.9",
55
- "react-window-infinite-loader": "^1.0.9",
56
- "recharts": "^2.15.1"
57
- },
58
- "devDependencies": {
59
- "@eslint/js": "^9.17.0",
60
- "@testing-library/jest-dom": "^5.16.5",
61
- "@types/lodash": "^4.17.15",
62
- "@types/react": "^18.2.6",
63
- "@types/react-dom": "^18.3.5",
64
- "@types/react-virtualized-auto-sizer": "^1.0.8",
65
- "@types/react-window": "^1.8.5",
66
- "@types/react-window-infinite-loader": "^1.0.6",
67
- "@vitejs/plugin-react": "^4.3.4",
68
- "eslint": "^9.17.0",
69
- "eslint-plugin-react-hooks": "^5.0.0",
70
- "eslint-plugin-react-refresh": "^0.4.16",
71
- "globals": "^15.14.0",
72
- "husky": "^8.0.3",
73
- "lint-staged": "^13.2.2",
74
- "prettier": "^2.8.8",
75
- "tsc-alias": "^1.8.16",
76
- "typescript": "5.0.2",
77
- "typescript-eslint": "^8.18.2",
78
- "vite": "6.0.5",
79
- "vite-plugin-svgr": "^4.3.0",
80
- "vite-tsconfig-paths": "^4.2.0"
81
- },
82
- "lint-staged": {
83
- "src/**/*.{ts,tsx,json,js,jsx}": [
84
- "yarn run prettier:fix",
85
- "yarn run lint"
86
- ]
87
- }
88
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.0.13",
5
+ "type": "module",
6
+ "main": "build/index.js",
7
+ "module": "build/index.js",
8
+ "types": "build/index.d.ts",
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "Ahmed Sharkawy",
12
+ "email": "a.elsharkawy@tap.company"
13
+ },
14
+ "files": [
15
+ "build",
16
+ "readme.md"
17
+ ],
18
+ "scripts": {
19
+ "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
20
+ "push": "npm run ts:build && npm publish --access public",
21
+ "dev": "vite",
22
+ "build": "tsc -b && vite build ",
23
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
24
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
25
+ "lint": "eslint . --color",
26
+ "lint:fix": "eslint src --fix --color",
27
+ "preview": "vite preview",
28
+ "prepare": "husky"
29
+ },
30
+ "dependencies": {
31
+ "@emotion/react": "^11.11.0",
32
+ "@emotion/styled": "^11.11.0",
33
+ "@hookform/resolvers": "^3.3.1",
34
+ "@mui/material": "^5.12.3",
35
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
36
+ "axios": "^1.4.0",
37
+ "dayjs": "^1.11.8",
38
+ "framer-motion": "10.11.0",
39
+ "i18next": "^22.4.15",
40
+ "memoize-one": "^6.0.0",
41
+ "re-resizable": "^6.9.9",
42
+ "react": "^18.2.0",
43
+ "react-currency-input-field": "^3.6.11",
44
+ "react-dom": "^18.2.0",
45
+ "react-draggable": "^4.4.6",
46
+ "react-dropzone": "^14.2.3",
47
+ "react-hook-form": "^7.45.4",
48
+ "react-hot-toast": "^2.4.1",
49
+ "react-i18next": "^12.2.2",
50
+ "react-multi-date-picker": "^4.1.2",
51
+ "react-query": "^3.39.3",
52
+ "react-router-dom": "^6.14.2",
53
+ "react-virtualized-auto-sizer": "^1.0.20",
54
+ "react-window": "^1.8.9",
55
+ "react-window-infinite-loader": "^1.0.9",
56
+ "recharts": "^2.15.1"
57
+ },
58
+ "devDependencies": {
59
+ "@eslint/js": "^9.17.0",
60
+ "@testing-library/jest-dom": "^5.16.5",
61
+ "@types/lodash": "^4.17.15",
62
+ "@types/react": "^18.2.6",
63
+ "@types/react-dom": "^18.3.5",
64
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
65
+ "@types/react-window": "^1.8.5",
66
+ "@types/react-window-infinite-loader": "^1.0.6",
67
+ "@vitejs/plugin-react": "^4.3.4",
68
+ "eslint": "^9.17.0",
69
+ "eslint-plugin-react-hooks": "^5.0.0",
70
+ "eslint-plugin-react-refresh": "^0.4.16",
71
+ "globals": "^15.14.0",
72
+ "husky": "^8.0.3",
73
+ "lint-staged": "^13.2.2",
74
+ "prettier": "^2.8.8",
75
+ "tsc-alias": "^1.8.16",
76
+ "typescript": "5.0.2",
77
+ "typescript-eslint": "^8.18.2",
78
+ "vite": "6.0.5",
79
+ "vite-plugin-svgr": "^4.3.0",
80
+ "vite-tsconfig-paths": "^4.2.0"
81
+ },
82
+ "lint-staged": {
83
+ "src/**/*.{ts,tsx,json,js,jsx}": [
84
+ "yarn run prettier:fix",
85
+ "yarn run lint"
86
+ ]
87
+ }
88
+ }
@@ -1,6 +0,0 @@
1
- export declare const verificationIcon: {
2
- readonly incomplete: string;
3
- readonly complete: string;
4
- readonly reviewed: string;
5
- readonly verified: string;
6
- };
@@ -1,7 +0,0 @@
1
- import { blueVerifyIcon, grayVerifyIcon, greenVerifyIcon } from '../../../../constants/index.js';
2
- export const verificationIcon = {
3
- incomplete: grayVerifyIcon,
4
- complete: blueVerifyIcon,
5
- reviewed: blueVerifyIcon,
6
- verified: greenVerifyIcon,
7
- };