@tap-payments/os-micro-frontend-shared 0.1.259-test.1-test.2 → 0.1.259-test.2
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/constants/apps.js
CHANGED
|
@@ -320,6 +320,10 @@ export const APP_CODES = {
|
|
|
320
320
|
code: 'BRAND',
|
|
321
321
|
functions: { view: { code: 'VIEW' }, update: { code: 'UPDATE' } },
|
|
322
322
|
},
|
|
323
|
+
appSettings: {
|
|
324
|
+
code: 'APP_SETTINGS',
|
|
325
|
+
functions: { view: { code: 'VIEW' }, update: { code: 'UPDATE' } },
|
|
326
|
+
},
|
|
323
327
|
},
|
|
324
328
|
},
|
|
325
329
|
order: {
|
package/build/types/account.d.ts
CHANGED
package/build/types/account.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { AppDetails, Segment, TableMode, Timezone } from '../types/index.js';
|
|
2
2
|
import { SheetViewColumnsData } from './columnResizeStorage';
|
|
3
|
-
export interface PreviewData {
|
|
4
|
-
id: string;
|
|
5
|
-
img: string;
|
|
6
|
-
isGenerating: boolean;
|
|
7
|
-
serviceCode?: string;
|
|
8
|
-
appCode: string;
|
|
9
|
-
isMinimized: boolean;
|
|
10
|
-
}
|
|
11
3
|
export declare function setSecretKey(): void;
|
|
12
4
|
export declare function getSecretKey(): string | null;
|
|
13
5
|
export declare function removeSecretKey(): void;
|
|
@@ -40,7 +32,4 @@ export declare const getGlobalTableModeStorage: () => TableMode;
|
|
|
40
32
|
export declare const removeGlobalTableModeStorage: () => void;
|
|
41
33
|
export declare const setSheetViewColumnsStorage: (data: SheetViewColumnsData) => void;
|
|
42
34
|
export declare const getSheetViewColumnsStorage: () => SheetViewColumnsData;
|
|
43
|
-
export declare const setPreviewStorage: (previews: PreviewData[]) => void;
|
|
44
|
-
export declare const getPreviewStorage: () => Map<string, string>;
|
|
45
|
-
export declare const removePreviewStorage: () => void;
|
|
46
35
|
export declare const clearTapOsLocalStorage: () => void;
|
|
@@ -12,7 +12,6 @@ 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';
|
|
16
15
|
export function setSecretKey() {
|
|
17
16
|
localStorage.setItem(SECRET_KEY_LOCAL_STORAGE, TEST_SECRET_KEY);
|
|
18
17
|
}
|
|
@@ -170,43 +169,6 @@ export const removeGlobalTableModeStorage = () => {
|
|
|
170
169
|
};
|
|
171
170
|
export const setSheetViewColumnsStorage = (data) => localStorage.setItem(SHEETVIEW_COLUMNS_KEY, JSON.stringify(data));
|
|
172
171
|
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
|
-
};
|
|
210
172
|
export const clearTapOsLocalStorage = () => {
|
|
211
173
|
removeSecretKey();
|
|
212
174
|
removeConnectMetaData();
|
|
@@ -218,5 +180,4 @@ export const clearTapOsLocalStorage = () => {
|
|
|
218
180
|
removeCalenderTimezone();
|
|
219
181
|
removeCalenderTimezoneHistory();
|
|
220
182
|
removeGlobalTableModeStorage();
|
|
221
|
-
removePreviewStorage();
|
|
222
183
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.259-test.
|
|
4
|
+
"version": "0.1.259-test.2",
|
|
5
5
|
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|