@tap-payments/os-micro-frontend-shared 0.1.259 → 0.1.261-test.1
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/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/CountryFilter/CountryFilter.d.ts +13 -0
- package/build/components/CountryFilter/CountryFilter.js +71 -0
- package/build/components/CountryFilter/index.d.ts +2 -0
- package/build/components/CountryFilter/index.js +2 -0
- package/build/components/CountryFilter/style.d.ts +6 -0
- package/build/components/CountryFilter/style.js +7 -0
- package/build/components/Customer/CustomerDropdown/CustomerDropdown.d.ts +8 -0
- package/build/components/Customer/CustomerDropdown/CustomerDropdown.js +39 -0
- package/build/components/Customer/CustomerDropdown/index.d.ts +1 -0
- package/build/components/Customer/CustomerDropdown/index.js +1 -0
- package/build/components/Customer/CustomerDropdown/style.d.ts +10 -0
- package/build/components/Customer/CustomerDropdown/style.js +30 -0
- package/build/components/Customer/CustomerForms/EmailForm.d.ts +12 -0
- package/build/components/Customer/CustomerForms/EmailForm.js +76 -0
- package/build/components/Customer/CustomerForms/FullInfo.d.ts +13 -0
- package/build/components/Customer/CustomerForms/FullInfo.js +72 -0
- package/build/components/Customer/CustomerForms/FullInfoForm.d.ts +12 -0
- package/build/components/Customer/CustomerForms/FullInfoForm.js +74 -0
- package/build/components/Customer/CustomerForms/PhoneNumberForm.d.ts +12 -0
- package/build/components/Customer/CustomerForms/PhoneNumberForm.js +71 -0
- package/build/components/Customer/CustomerForms/index.d.ts +9 -0
- package/build/components/Customer/CustomerForms/index.js +9 -0
- package/build/components/Customer/CustomerForms/style.d.ts +25 -0
- package/build/components/Customer/CustomerForms/style.js +71 -0
- package/build/components/Customer/CustomerForms/validation.d.ts +30 -0
- package/build/components/Customer/CustomerForms/validation.js +42 -0
- package/build/components/Customer/index.d.ts +2 -0
- package/build/components/Customer/index.js +2 -0
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/Error/Error.d.ts +1 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/Inputs/CountriesDropDown/CountriesDropdown.d.ts +3 -3
- package/build/components/Inputs/CountriesDropDown/CountriesDropdown.js +3 -3
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/PhoneFilter/PhoneFilter.d.ts +9 -0
- package/build/components/PhoneFilter/PhoneFilter.js +13 -0
- package/build/components/PhoneFilter/index.d.ts +2 -0
- package/build/components/PhoneFilter/index.js +2 -0
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/components/index.d.ts +3 -0
- package/build/components/index.js +3 -0
- package/build/constants/apps.d.ts +11 -0
- package/build/constants/apps.js +4 -0
- package/build/types/account.d.ts +2 -1
- package/build/types/account.js +1 -0
- package/build/types/apps.d.ts +13 -0
- package/build/utils/localStorage.d.ts +4 -1
- package/build/utils/localStorage.js +41 -0
- package/package.json +20 -19
package/build/types/apps.d.ts
CHANGED
|
@@ -76,6 +76,19 @@ export type NavigateFunction = (params: {
|
|
|
76
76
|
sandboxMode?: boolean;
|
|
77
77
|
state?: any;
|
|
78
78
|
}) => void;
|
|
79
|
+
export interface PreviewStorageData {
|
|
80
|
+
id: string;
|
|
81
|
+
img: string;
|
|
82
|
+
timestamp: number;
|
|
83
|
+
}
|
|
84
|
+
export interface PreviewData {
|
|
85
|
+
id: string;
|
|
86
|
+
img: string;
|
|
87
|
+
isGenerating: boolean;
|
|
88
|
+
serviceCode?: string;
|
|
89
|
+
appCode: string;
|
|
90
|
+
isMinimized: boolean;
|
|
91
|
+
}
|
|
79
92
|
export type MFWidgetBaseProps = {
|
|
80
93
|
windowId: string;
|
|
81
94
|
i18n?: i18n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppDetails, Segment, TableMode, Timezone } from '../types/index.js';
|
|
1
|
+
import { AppDetails, PreviewData, Segment, TableMode, Timezone } from '../types/index.js';
|
|
2
2
|
import { SheetViewColumnsData } from './columnResizeStorage';
|
|
3
3
|
export declare function setSecretKey(): void;
|
|
4
4
|
export declare function getSecretKey(): string | null;
|
|
@@ -32,4 +32,7 @@ export declare const getGlobalTableModeStorage: () => TableMode;
|
|
|
32
32
|
export declare const removeGlobalTableModeStorage: () => void;
|
|
33
33
|
export declare const setSheetViewColumnsStorage: (data: SheetViewColumnsData) => void;
|
|
34
34
|
export declare const getSheetViewColumnsStorage: () => SheetViewColumnsData;
|
|
35
|
+
export declare const setPreviewStorage: (previews: PreviewData[]) => void;
|
|
36
|
+
export declare const getPreviewStorage: () => Map<string, string>;
|
|
37
|
+
export declare const removePreviewStorage: () => void;
|
|
35
38
|
export declare const clearTapOsLocalStorage: () => void;
|
|
@@ -12,6 +12,7 @@ const CALENDER_TIMEZONE = 'tap-dashboard-calender-timezone';
|
|
|
12
12
|
const CALENDER_TIMEZONE_HISTORY = 'tap-dashboard-calender-timezone-history';
|
|
13
13
|
const GLOBAL_TABLE_MODE_KEY = 'tap-dashboard-global-table-mode';
|
|
14
14
|
const SHEETVIEW_COLUMNS_KEY = 'sheetview_columns';
|
|
15
|
+
const PREVIEW_STORAGE_KEY = 'dock-preview-windows';
|
|
15
16
|
export function setSecretKey() {
|
|
16
17
|
localStorage.setItem(SECRET_KEY_LOCAL_STORAGE, TEST_SECRET_KEY);
|
|
17
18
|
}
|
|
@@ -169,6 +170,45 @@ export const removeGlobalTableModeStorage = () => {
|
|
|
169
170
|
};
|
|
170
171
|
export const setSheetViewColumnsStorage = (data) => localStorage.setItem(SHEETVIEW_COLUMNS_KEY, JSON.stringify(data));
|
|
171
172
|
export const getSheetViewColumnsStorage = () => JSON.parse(localStorage.getItem(SHEETVIEW_COLUMNS_KEY) || '{}');
|
|
173
|
+
export const setPreviewStorage = (previews) => {
|
|
174
|
+
try {
|
|
175
|
+
const data = previews
|
|
176
|
+
.filter((p) => p.img)
|
|
177
|
+
.map((p) => ({
|
|
178
|
+
id: p.id,
|
|
179
|
+
img: p.img,
|
|
180
|
+
timestamp: Date.now(),
|
|
181
|
+
}));
|
|
182
|
+
localStorage.setItem(PREVIEW_STORAGE_KEY, JSON.stringify(data));
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
console.warn('Failed to save preview cache:', error);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
export const getPreviewStorage = () => {
|
|
189
|
+
try {
|
|
190
|
+
const cached = localStorage.getItem(PREVIEW_STORAGE_KEY);
|
|
191
|
+
if (!cached)
|
|
192
|
+
return new Map();
|
|
193
|
+
const data = JSON.parse(cached);
|
|
194
|
+
const previewMap = new Map();
|
|
195
|
+
data.forEach((item) => {
|
|
196
|
+
previewMap.set(item.id, item.img);
|
|
197
|
+
});
|
|
198
|
+
return previewMap;
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
return new Map();
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
export const removePreviewStorage = () => {
|
|
205
|
+
try {
|
|
206
|
+
localStorage.removeItem(PREVIEW_STORAGE_KEY);
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
console.warn('Failed to remove preview storage:', error);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
172
212
|
export const clearTapOsLocalStorage = () => {
|
|
173
213
|
removeSecretKey();
|
|
174
214
|
removeConnectMetaData();
|
|
@@ -180,4 +220,5 @@ export const clearTapOsLocalStorage = () => {
|
|
|
180
220
|
removeCalenderTimezone();
|
|
181
221
|
removeCalenderTimezoneHistory();
|
|
182
222
|
removeGlobalTableModeStorage();
|
|
223
|
+
removePreviewStorage();
|
|
183
224
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.261-test.1",
|
|
5
|
+
"testVersion": 1,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -102,7 +102,8 @@
|
|
|
102
102
|
"react-window": "^1.8.9",
|
|
103
103
|
"react-window-infinite-loader": "^1.0.9",
|
|
104
104
|
"react18-input-otp": "^1.1.4",
|
|
105
|
-
"recharts": "^2.15.1"
|
|
105
|
+
"recharts": "^2.15.1",
|
|
106
|
+
"yup": "^1.7.1"
|
|
106
107
|
},
|
|
107
108
|
"devDependencies": {
|
|
108
109
|
"@eslint/js": "^9.17.0",
|
|
@@ -129,30 +130,30 @@
|
|
|
129
130
|
"vite-tsconfig-paths": "^4.2.0"
|
|
130
131
|
},
|
|
131
132
|
"peerDependencies": {
|
|
132
|
-
"react": "^18",
|
|
133
|
-
"react-dom": "^18",
|
|
134
|
-
"@mui/material": "^5",
|
|
135
133
|
"@emotion/react": "^11",
|
|
136
134
|
"@emotion/styled": "^11",
|
|
137
|
-
"framer-motion": "^10",
|
|
138
|
-
"react-hook-form": "^7",
|
|
139
135
|
"@hookform/resolvers": "^3",
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"react-i18next": "^12",
|
|
143
|
-
"react-multi-date-picker": "^4",
|
|
136
|
+
"@mui/material": "^5",
|
|
137
|
+
"@uiw/react-json-view": "^2.0.0-alpha",
|
|
144
138
|
"dayjs": "^1",
|
|
139
|
+
"framer-motion": "^10",
|
|
140
|
+
"i18next": "^22",
|
|
141
|
+
"re-resizable": "^6",
|
|
142
|
+
"react": "^18",
|
|
143
|
+
"react-currency-input-field": "^3",
|
|
144
|
+
"react-dom": "^18",
|
|
145
|
+
"react-draggable": "^4",
|
|
145
146
|
"react-dropzone": "^14",
|
|
147
|
+
"react-hook-form": "^7",
|
|
146
148
|
"react-hot-toast": "^2",
|
|
147
|
-
"
|
|
149
|
+
"react-i18next": "^12",
|
|
150
|
+
"react-multi-date-picker": "^4",
|
|
151
|
+
"react-router-dom": "^7",
|
|
152
|
+
"react-virtualized-auto-sizer": "^1",
|
|
148
153
|
"react-window": "^1.8",
|
|
149
154
|
"react-window-infinite-loader": "^1",
|
|
150
|
-
"react-virtualized-auto-sizer": "^1",
|
|
151
|
-
"re-resizable": "^6",
|
|
152
|
-
"react-draggable": "^4",
|
|
153
|
-
"react-currency-input-field": "^3",
|
|
154
155
|
"react18-input-otp": "^1",
|
|
155
|
-
"
|
|
156
|
+
"recharts": "^2"
|
|
156
157
|
},
|
|
157
158
|
"lint-staged": {
|
|
158
159
|
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
@@ -163,4 +164,4 @@
|
|
|
163
164
|
"publishConfig": {
|
|
164
165
|
"registry": "https://registry.npmjs.org/"
|
|
165
166
|
}
|
|
166
|
-
}
|
|
167
|
+
}
|