@tap-payments/os-micro-frontend-shared 0.1.326-test.1 → 0.1.327-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.
@@ -11,6 +11,7 @@ export declare const StyledAnimatedSpinner: import("@emotion/styled").StyledComp
11
11
  content?: string | undefined;
12
12
  translate?: "yes" | "no" | undefined;
13
13
  id?: string | undefined;
14
+ loading?: "eager" | "lazy" | undefined;
14
15
  defaultChecked?: boolean | undefined;
15
16
  defaultValue?: string | number | readonly string[] | undefined;
16
17
  suppressContentEditableWarning?: boolean | undefined;
@@ -273,7 +274,6 @@ export declare const StyledAnimatedSpinner: import("@emotion/styled").StyledComp
273
274
  src?: string | undefined;
274
275
  alt?: string | undefined;
275
276
  decoding?: "auto" | "async" | "sync" | undefined;
276
- loading?: "eager" | "lazy" | undefined;
277
277
  fetchPriority?: "auto" | "high" | "low" | undefined;
278
278
  srcSet?: string | undefined;
279
279
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & AnimatedSpinnerIconProps, {}, {}>;
@@ -299,6 +299,7 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
299
299
  content?: string | undefined;
300
300
  translate?: "yes" | "no" | undefined;
301
301
  id?: string | undefined;
302
+ loading?: "eager" | "lazy" | undefined;
302
303
  defaultChecked?: boolean | undefined;
303
304
  defaultValue?: string | number | readonly string[] | undefined;
304
305
  suppressContentEditableWarning?: boolean | undefined;
@@ -561,7 +562,6 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
561
562
  src?: string | undefined;
562
563
  alt?: string | undefined;
563
564
  decoding?: "auto" | "async" | "sync" | undefined;
564
- loading?: "eager" | "lazy" | undefined;
565
565
  fetchPriority?: "auto" | "high" | "low" | undefined;
566
566
  srcSet?: string | undefined;
567
567
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -17,6 +17,7 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
17
17
  content?: string | undefined;
18
18
  translate?: "yes" | "no" | undefined;
19
19
  id?: string | undefined;
20
+ loading?: "eager" | "lazy" | undefined;
20
21
  defaultChecked?: boolean | undefined;
21
22
  defaultValue?: string | number | readonly string[] | undefined;
22
23
  suppressContentEditableWarning?: boolean | undefined;
@@ -279,7 +280,6 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
279
280
  src?: string | undefined;
280
281
  alt?: string | undefined;
281
282
  decoding?: "auto" | "async" | "sync" | undefined;
282
- loading?: "eager" | "lazy" | undefined;
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> & {
@@ -10,6 +10,7 @@ export declare const StyledDownloadFileImage: import("@emotion/styled").StyledCo
10
10
  content?: string | undefined;
11
11
  translate?: "yes" | "no" | undefined;
12
12
  id?: string | undefined;
13
+ loading?: "eager" | "lazy" | undefined;
13
14
  defaultChecked?: boolean | undefined;
14
15
  defaultValue?: string | number | readonly string[] | undefined;
15
16
  suppressContentEditableWarning?: boolean | undefined;
@@ -272,7 +273,6 @@ export declare const StyledDownloadFileImage: import("@emotion/styled").StyledCo
272
273
  src?: string | undefined;
273
274
  alt?: string | undefined;
274
275
  decoding?: "auto" | "async" | "sync" | undefined;
275
- loading?: "eager" | "lazy" | undefined;
276
276
  fetchPriority?: "auto" | "high" | "low" | undefined;
277
277
  srcSet?: string | undefined;
278
278
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -7,6 +7,7 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
7
7
  content?: string | undefined;
8
8
  translate?: "yes" | "no" | undefined;
9
9
  id?: string | undefined;
10
+ loading?: "eager" | "lazy" | undefined;
10
11
  defaultChecked?: boolean | undefined;
11
12
  defaultValue?: string | number | readonly string[] | undefined;
12
13
  suppressContentEditableWarning?: boolean | undefined;
@@ -269,7 +270,6 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
269
270
  src?: string | undefined;
270
271
  alt?: string | undefined;
271
272
  decoding?: "auto" | "async" | "sync" | undefined;
272
- loading?: "eager" | "lazy" | undefined;
273
273
  fetchPriority?: "auto" | "high" | "low" | undefined;
274
274
  srcSet?: string | undefined;
275
275
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -54,6 +54,7 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
54
54
  content?: string | undefined;
55
55
  translate?: "yes" | "no" | undefined;
56
56
  id?: string | undefined;
57
+ loading?: "eager" | "lazy" | undefined;
57
58
  defaultChecked?: boolean | undefined;
58
59
  defaultValue?: string | number | readonly string[] | undefined;
59
60
  suppressContentEditableWarning?: boolean | undefined;
@@ -316,7 +317,6 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
316
317
  src?: string | undefined;
317
318
  alt?: string | undefined;
318
319
  decoding?: "auto" | "async" | "sync" | undefined;
319
- loading?: "eager" | "lazy" | undefined;
320
320
  fetchPriority?: "auto" | "high" | "low" | undefined;
321
321
  srcSet?: string | undefined;
322
322
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -76,18 +76,11 @@ export type NavigateFunction = (params: {
76
76
  sandboxMode?: boolean;
77
77
  state?: any;
78
78
  }) => void;
79
- export interface PreviewStorageData {
79
+ export interface WindowPreview {
80
80
  id: string;
81
81
  img: string;
82
- timestamp: number;
83
- }
84
- export interface PreviewData {
85
- id: string;
86
- img: string;
87
- isGenerating: boolean;
88
- serviceCode?: string;
82
+ status: 'idle' | 'completed' | 'error' | 'loading';
89
83
  appCode: string;
90
- isMinimized: boolean;
91
84
  }
92
85
  export type MFWidgetBaseProps = {
93
86
  windowId: string;
@@ -1,4 +1,4 @@
1
- import { AppDetails, PreviewData, Segment, TableMode, Timezone } from '../types/index.js';
1
+ import { AppDetails, WindowPreview, 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,7 +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>;
35
+ export declare const setPreviewStorage: (previews: WindowPreview[]) => void;
36
+ export declare const getPreviewStorage: () => WindowPreview[];
37
37
  export declare const removePreviewStorage: () => void;
38
38
  export declare const clearTapOsLocalStorage: () => void;
@@ -172,14 +172,7 @@ export const setSheetViewColumnsStorage = (data) => localStorage.setItem(SHEETVI
172
172
  export const getSheetViewColumnsStorage = () => JSON.parse(localStorage.getItem(SHEETVIEW_COLUMNS_KEY) || '{}');
173
173
  export const setPreviewStorage = (previews) => {
174
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));
175
+ localStorage.setItem(PREVIEW_STORAGE_KEY, JSON.stringify(previews));
183
176
  }
184
177
  catch (error) {
185
178
  console.warn('Failed to save preview cache:', error);
@@ -189,16 +182,12 @@ export const getPreviewStorage = () => {
189
182
  try {
190
183
  const cached = localStorage.getItem(PREVIEW_STORAGE_KEY);
191
184
  if (!cached)
192
- return new Map();
185
+ return [];
193
186
  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;
187
+ return data;
199
188
  }
200
189
  catch (error) {
201
- return new Map();
190
+ return [];
202
191
  }
203
192
  };
204
193
  export const removePreviewStorage = () => {
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.326-test.1",
4
+ "version": "0.1.327-test.1",
5
5
  "testVersion": 1,
6
6
  "type": "module",
7
7
  "main": "build/index.js",