@tap-payments/os-micro-frontend-shared 0.1.328 → 0.1.329

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.
@@ -12,6 +12,7 @@ export declare const StyledAnimatedSpinner: import("@emotion/styled").StyledComp
12
12
  content?: string | undefined;
13
13
  translate?: "yes" | "no" | undefined;
14
14
  id?: string | undefined;
15
+ loading?: "eager" | "lazy" | undefined;
15
16
  defaultChecked?: boolean | undefined;
16
17
  defaultValue?: string | number | readonly string[] | undefined;
17
18
  suppressContentEditableWarning?: boolean | undefined;
@@ -274,7 +275,6 @@ export declare const StyledAnimatedSpinner: import("@emotion/styled").StyledComp
274
275
  src?: string | undefined;
275
276
  alt?: string | undefined;
276
277
  decoding?: "auto" | "async" | "sync" | undefined;
277
- loading?: "eager" | "lazy" | undefined;
278
278
  fetchPriority?: "auto" | "high" | "low" | undefined;
279
279
  srcSet?: string | undefined;
280
280
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & AnimatedSpinnerIconProps, {}, {}>;
@@ -300,6 +300,7 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
300
300
  content?: string | undefined;
301
301
  translate?: "yes" | "no" | undefined;
302
302
  id?: string | undefined;
303
+ loading?: "eager" | "lazy" | undefined;
303
304
  defaultChecked?: boolean | undefined;
304
305
  defaultValue?: string | number | readonly string[] | undefined;
305
306
  suppressContentEditableWarning?: boolean | undefined;
@@ -562,7 +563,6 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
562
563
  src?: string | undefined;
563
564
  alt?: string | undefined;
564
565
  decoding?: "auto" | "async" | "sync" | undefined;
565
- loading?: "eager" | "lazy" | undefined;
566
566
  fetchPriority?: "auto" | "high" | "low" | undefined;
567
567
  srcSet?: string | undefined;
568
568
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -18,6 +18,7 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
18
18
  content?: string | undefined;
19
19
  translate?: "yes" | "no" | undefined;
20
20
  id?: string | undefined;
21
+ loading?: "eager" | "lazy" | undefined;
21
22
  defaultChecked?: boolean | undefined;
22
23
  defaultValue?: string | number | readonly string[] | undefined;
23
24
  suppressContentEditableWarning?: boolean | undefined;
@@ -280,7 +281,6 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
280
281
  src?: string | undefined;
281
282
  alt?: string | undefined;
282
283
  decoding?: "auto" | "async" | "sync" | undefined;
283
- loading?: "eager" | "lazy" | undefined;
284
284
  fetchPriority?: "auto" | "high" | "low" | undefined;
285
285
  srcSet?: string | undefined;
286
286
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
@@ -11,6 +11,7 @@ export declare const StyledDownloadFileImage: import("@emotion/styled").StyledCo
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 StyledDownloadFileImage: import("@emotion/styled").StyledCo
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>, {}, {}>;
@@ -8,6 +8,7 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
8
8
  content?: string | undefined;
9
9
  translate?: "yes" | "no" | undefined;
10
10
  id?: string | undefined;
11
+ loading?: "eager" | "lazy" | undefined;
11
12
  defaultChecked?: boolean | undefined;
12
13
  defaultValue?: string | number | readonly string[] | undefined;
13
14
  suppressContentEditableWarning?: boolean | undefined;
@@ -270,7 +271,6 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
270
271
  src?: string | undefined;
271
272
  alt?: string | undefined;
272
273
  decoding?: "auto" | "async" | "sync" | undefined;
273
- loading?: "eager" | "lazy" | undefined;
274
274
  fetchPriority?: "auto" | "high" | "low" | undefined;
275
275
  srcSet?: string | undefined;
276
276
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -55,6 +55,7 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
55
55
  content?: string | undefined;
56
56
  translate?: "yes" | "no" | undefined;
57
57
  id?: string | undefined;
58
+ loading?: "eager" | "lazy" | undefined;
58
59
  defaultChecked?: boolean | undefined;
59
60
  defaultValue?: string | number | readonly string[] | undefined;
60
61
  suppressContentEditableWarning?: boolean | undefined;
@@ -317,7 +318,6 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
317
318
  src?: string | undefined;
318
319
  alt?: string | undefined;
319
320
  decoding?: "auto" | "async" | "sync" | undefined;
320
- loading?: "eager" | "lazy" | undefined;
321
321
  fetchPriority?: "auto" | "high" | "low" | undefined;
322
322
  srcSet?: string | undefined;
323
323
  } & 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.328",
4
+ "version": "0.1.329",
5
5
  "testVersion": 0,
6
6
  "type": "module",
7
7
  "main": "build/index.js",