ados-rcm 1.1.438 → 1.1.439

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.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * React Hook - IndexedDB 사용을 위한 Hook
3
+ * 로딩 상태, 오류 처리 등의 상태를 포함합니다.
4
+ */
5
+ export declare function useIndexedDB(dbName: string, storeName: string): {
6
+ save: (id: string, data: any) => Promise<boolean>;
7
+ get: (id: string) => Promise<any | null>;
8
+ delete: (id: string) => Promise<boolean>;
9
+ getAll: () => Promise<Record<string, any>>;
10
+ clear: () => Promise<boolean>;
11
+ getFromCache: (id: string) => any;
12
+ clearCache: () => void;
13
+ isLoading: boolean;
14
+ error: Error | null;
15
+ cancelOperation: () => void;
16
+ };
17
+ /**
18
+ * 레이아웃 관리를 위한 향상된 React Hook
19
+ * 로딩 상태와 오류 상태 처리가 포함된 React 전용 Hook
20
+ */
21
+ export declare function useALayoutDB(): {
22
+ saveLayout: (id: string, lengths: number[]) => Promise<boolean>;
23
+ getLayout: (id: string) => Promise<number[] | null>;
24
+ getCachedLayout: (id: string) => number[] | null;
25
+ deleteLayout: (id: string) => Promise<boolean>;
26
+ getAllLayouts: () => Promise<Record<string, number[]>>;
27
+ clearAllLayouts: () => Promise<boolean>;
28
+ isLoading: boolean;
29
+ error: Error | null;
30
+ cancelOperation: () => void;
31
+ };
32
+ export declare function useLayout(): {
33
+ saveLayout: (id: string, lengths: number[]) => Promise<boolean>;
34
+ getLayout: (id: string) => Promise<number[] | null>;
35
+ getCachedLayout: (id: string) => number[] | null;
36
+ deleteLayout: (id: string) => Promise<boolean>;
37
+ getAllLayouts: () => Promise<Record<string, number[]>>;
38
+ clearAllLayouts: () => Promise<boolean>;
39
+ };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * IndexedDB - IndexedDB를 간단하게 사용할 수 있는 공통 모듈
3
+ * 레이아웃 저장 기능을 포함한 통합 데이터 관리 모듈입니다.
4
+ *
5
+ * 객체 방식으로 사용하기 위한 모듈입니다.
6
+ */
1
7
  export interface IRecord {
2
8
  id: string;
3
9
  [key: string]: any;
@@ -5,17 +11,17 @@ export interface IRecord {
5
11
  /**
6
12
  * IndexedDB 관리 클래스
7
13
  */
8
- export declare class AIndexedDB {
14
+ export declare class IndexedDB {
9
15
  private static instance;
10
16
  private databases;
11
17
  private cache;
12
- private static LAYOUT_DB_NAME;
13
- private static LAYOUT_STORE_NAME;
18
+ static LAYOUT_DB_NAME: string;
19
+ static LAYOUT_STORE_NAME: string;
14
20
  private constructor();
15
21
  /**
16
22
  * 싱글톤 인스턴스 가져오기
17
23
  */
18
- static getInstance(): AIndexedDB;
24
+ static getInstance(): IndexedDB;
19
25
  /**
20
26
  * 캐시에서 데이터 가져오기
21
27
  */
@@ -74,33 +80,26 @@ export declare class AIndexedDB {
74
80
  clearAllLayouts(): Promise<void>;
75
81
  }
76
82
  /**
77
- * ALayout - AIndexedDB이용한 레이아웃 관리를 위한 편의 객체
78
- * 이전 버전과의 호환성을 위해 유지
79
- */
80
- export declare const ALayout: {
81
- saveLayout: (id: string, lengths: number[]) => Promise<void>;
82
- getLayout: (id: string) => Promise<number[] | null>;
83
- getCachedLayout: (id: string) => number[] | null;
84
- deleteLayout: (id: string) => Promise<void>;
85
- getAllLayouts: () => Promise<Record<string, number[]>>;
86
- clearAllLayouts: () => Promise<void>;
87
- };
88
- /**
89
- * React Hook - AIndexedDB 사용을 위한 Hook
83
+ * DB - IndexedDB직접 접근할 있는 편의 객체
84
+ * 객체 방식으로 사용할 있도록 제공됩니다.
90
85
  */
91
- export declare function useAIndexedDB(dbName: string, storeName: string): {
92
- save: (id: string, data: any) => Promise<void>;
93
- get: (id: string) => Promise<any>;
94
- delete: (id: string) => Promise<void>;
95
- getAll: () => Promise<Record<string, any>>;
96
- clear: () => Promise<void>;
97
- getFromCache: (id: string) => any;
98
- clearCache: () => void;
86
+ export declare const DB: {
87
+ save: (dbName: string, storeName: string, record: IRecord) => Promise<void>;
88
+ get: (dbName: string, storeName: string, id: string) => Promise<any | null>;
89
+ delete: (dbName: string, storeName: string, id: string) => Promise<void>;
90
+ getAll: (dbName: string, storeName: string) => Promise<Record<string, any>>;
91
+ clear: (dbName: string, storeName: string) => Promise<void>;
92
+ getFromCache: (dbName: string, storeName: string, id: string) => any | null;
93
+ clearCache: (dbName: string, storeName: string) => void;
94
+ LAYOUT_DB_NAME: string;
95
+ LAYOUT_STORE_NAME: string;
96
+ getInstance: () => IndexedDB;
99
97
  };
100
98
  /**
101
- * 레이아웃 관리를 위한 React Hook
99
+ * Layout - 레이아웃 관리를 위한 편의 객체
100
+ * 객체 방식으로 직접 접근할 수 있습니다.
102
101
  */
103
- export declare function useALayout(): {
102
+ export declare const LayoutDB: {
104
103
  saveLayout: (id: string, lengths: number[]) => Promise<void>;
105
104
  getLayout: (id: string) => Promise<number[] | null>;
106
105
  getCachedLayout: (id: string) => number[] | null;