@daeryun/dr_components 1.1.57 → 1.1.58

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.
Files changed (90) hide show
  1. package/dist/asset/images/myCase//bfileViewer/download.webp +0 -0
  2. package/dist/asset/images/myCase//bfileViewer/rotate_ccw.webp +0 -0
  3. package/dist/asset/images/myCase//bfileViewer/zoom_in.webp +0 -0
  4. package/dist/asset/images/myCase//bfileViewer/zoom_out.webp +0 -0
  5. package/dist/asset/images/myCase/icon/arrow.webp +0 -0
  6. package/dist/asset/images/myCase/icon/chat.webp +0 -0
  7. package/dist/asset/images/myCase/icon/check_ok.webp +0 -0
  8. package/dist/asset/images/myCase/icon/search.webp +0 -0
  9. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  10. package/dist/components/page/MyCase/[id]/_component/ContactInfo.jsx +1 -1
  11. package/dist/components/page/MyCase/[id]/_component/ContactInfo.tsx +1 -1
  12. package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +1 -1
  13. package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +9 -3
  14. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +35 -14
  15. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +19 -7
  16. package/dist/components/page/MyCase/[id]/_component/TimeLine.jsx +1 -1
  17. package/dist/components/page/MyCase/[id]/_component/TimeLine.tsx +1 -1
  18. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.d.ts +4 -0
  19. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.jsx +13 -0
  20. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.tsx +18 -0
  21. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +1 -1
  22. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +1 -1
  23. package/dist/components/page/MyCase/[id]/_component/_document/Document.d.ts +2 -1
  24. package/dist/components/page/MyCase/[id]/_component/_document/Document.jsx +63 -21
  25. package/dist/components/page/MyCase/[id]/_component/_document/Document.tsx +97 -17
  26. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.d.ts +2 -1
  27. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.jsx +58 -13
  28. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.tsx +124 -25
  29. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.jsx +12 -7
  30. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.tsx +12 -7
  31. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.d.ts +5 -0
  32. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.jsx +27 -0
  33. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.tsx +46 -0
  34. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.d.ts +6 -0
  35. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.jsx +34 -0
  36. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.tsx +65 -0
  37. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.d.ts +5 -0
  38. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.jsx +27 -0
  39. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.tsx +47 -0
  40. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.d.ts +7 -0
  41. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.jsx +95 -0
  42. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.tsx +141 -0
  43. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.d.ts +10 -0
  44. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.jsx +149 -0
  45. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.tsx +212 -0
  46. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.d.ts +3 -4
  47. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.jsx +51 -34
  48. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.tsx +88 -59
  49. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.jsx +2 -2
  50. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.tsx +2 -2
  51. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.d.ts +6 -0
  52. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.jsx +154 -0
  53. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.tsx +177 -0
  54. package/dist/components/page/MyCase/_actions/action.d.ts +34 -0
  55. package/dist/components/page/MyCase/_actions/action.js +59 -0
  56. package/dist/components/page/MyCase/_actions/action.ts +79 -0
  57. package/dist/components/page/MyCase/_component/_button/SubMenuButton.jsx +2 -4
  58. package/dist/components/page/MyCase/_component/_button/SubMenuButton.tsx +2 -5
  59. package/dist/components/page/MyCase/_component/_empty/EmptyTable.d.ts +2 -1
  60. package/dist/components/page/MyCase/_component/_empty/EmptyTable.jsx +14 -6
  61. package/dist/components/page/MyCase/_component/_empty/EmptyTable.tsx +34 -6
  62. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.d.ts +14 -0
  63. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.jsx +278 -0
  64. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.tsx +411 -0
  65. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.d.ts +8 -0
  66. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.jsx +56 -0
  67. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.tsx +111 -0
  68. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.d.ts +3 -0
  69. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.jsx +10 -0
  70. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.tsx +10 -0
  71. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.jsx +8 -3
  72. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.tsx +3 -4
  73. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.d.ts +7 -0
  74. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.js +34 -0
  75. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.ts +36 -0
  76. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.d.ts +5 -0
  77. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.js +33 -0
  78. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.ts +25 -0
  79. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.d.ts +5 -0
  80. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.js +33 -0
  81. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.ts +25 -0
  82. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.d.ts +4 -0
  83. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.js +33 -0
  84. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.ts +25 -0
  85. package/dist/components/page/MyCase/_type/type.d.ts +3 -1
  86. package/dist/components/page/MyCase/_type/type.ts +3 -1
  87. package/dist/styles/globals.css +501 -94
  88. package/dist/styles/homepage_login.css +3 -3
  89. package/dist/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +6 -2
@@ -30,6 +30,23 @@ export declare const useActionGetMyCaseQuestion: (id: string, page: number, page
30
30
  isLoading: boolean;
31
31
  refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<FetchType<Question[]>, Error>>;
32
32
  };
33
+ export declare const useActionGetDaeryunFileList: (id: string, jwt?: string, enabled?: boolean) => {
34
+ data: FetchType<FileList[]> | undefined;
35
+ isLoading: boolean;
36
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<FetchType<FileList[]>, Error>>;
37
+ };
38
+ export declare const useActionPostCaseExamine: () => {
39
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
40
+ result: boolean;
41
+ data: any;
42
+ }, unknown, {
43
+ caseIdx: string;
44
+ comment: string;
45
+ idx: string;
46
+ isApproved: boolean;
47
+ }, unknown>;
48
+ isLoading: boolean;
49
+ };
33
50
  export declare const useActionPostMyCaseQuestion: (id: string, content: string, jwt?: string) => {
34
51
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<FetchType<Question[]>, Error, void, unknown>;
35
52
  isLoading: boolean;
@@ -53,3 +70,20 @@ export type UploadResponse = {
53
70
  export declare const useActionPostMyFileUpload: (id: string) => {
54
71
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<UploadResponse, unknown, File[], unknown>;
55
72
  };
73
+ export declare const useActionGetDocumentExamineHistory: ({ caseIdx, idx }: {
74
+ caseIdx: string;
75
+ idx: number;
76
+ }) => {
77
+ data: any;
78
+ isLoading: boolean;
79
+ isFetched: boolean;
80
+ isFetching: boolean;
81
+ error: Error | null;
82
+ };
83
+ export declare const useActionViewHwpToPdf: (key: number) => {
84
+ data: any;
85
+ isLoading: boolean;
86
+ isFetched: boolean;
87
+ isFetching: boolean;
88
+ error: Error | null;
89
+ };
@@ -17,6 +17,10 @@ import addMyCaseQuestion from '../_fetchers/addMyCaseQuestion';
17
17
  import getCaseList from '../_fetchers/getCaseList';
18
18
  import getContact from '../_fetchers/getContact';
19
19
  import addMyFileUpload from '../_fetchers/addMyFileUpload';
20
+ import getDaeryunFileList from '../_fetchers/getDaeryunFileList';
21
+ import addMyCaseExamine from '../_fetchers/addMyCaseExamine';
22
+ import getDocumentExamineHistory from '../_fetchers/getDocumentExamineHistory';
23
+ import getHwpToPdfFile from '../_fetchers/getHwpToPdfFile';
20
24
  const jwt2 = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
21
25
  // 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjMsImVtYWlsIjoiNjAzMDgwNEBnbWFpbC5jb20iLCJwcm92aWRlciI6Imdvb2dsZSIsImlzTmV3IjpmYWxzZSwiaWF0IjoxNzQwNDQ2Nzg1LCJleHAiOjE3NDA0ODI3ODV9.v_d7htci4fjLA5MqBXWxUqyNjsAm2GEcdRBO5se-DB8'; //빈거
22
26
  export const useActionGetCaseList = ({ tapState,
@@ -131,6 +135,41 @@ export const useActionGetMyCaseQuestion = (id, page, pageSize, jwt) => {
131
135
  });
132
136
  return { data, isLoading, refetch };
133
137
  };
138
+ export const useActionGetDaeryunFileList = (id, jwt, enabled) => {
139
+ const { data, isLoading, refetch } = useQuery({
140
+ queryKey: ['case', 'daeryunFileList', id],
141
+ queryFn: () => getDaeryunFileList({
142
+ jwt: jwt ? jwt : jwt2,
143
+ id: id
144
+ }),
145
+ gcTime: 0,
146
+ staleTime: 0,
147
+ enabled: enabled
148
+ // onSuccess: res => {},
149
+ // onError: error => {
150
+ // console.log(error);
151
+ // }
152
+ });
153
+ return { data, isLoading, refetch };
154
+ };
155
+ export const useActionPostCaseExamine = () => {
156
+ const { mutateAsync, status } = useMutation({
157
+ mutationFn: (_a) => __awaiter(void 0, [_a], void 0, function* ({ caseIdx, comment, idx, isApproved }) {
158
+ return yield addMyCaseExamine({
159
+ caseIdx: caseIdx,
160
+ comment: comment,
161
+ idx: idx,
162
+ isApproved: isApproved
163
+ });
164
+ }),
165
+ onSuccess: res => { },
166
+ onError: error => {
167
+ console.log(error);
168
+ }
169
+ });
170
+ const isLoading = status === 'pending';
171
+ return { mutateAsync, isLoading };
172
+ };
134
173
  export const useActionPostMyCaseQuestion = (id, content, jwt) => {
135
174
  const { mutateAsync, status } = useMutation({
136
175
  mutationFn: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -176,3 +215,23 @@ export const useActionPostMyFileUpload = (id) => {
176
215
  });
177
216
  return { mutateAsync };
178
217
  };
218
+ export const useActionGetDocumentExamineHistory = ({ caseIdx, idx }) => {
219
+ const { data, isLoading, isFetched, isFetching, error } = useQuery({
220
+ queryKey: ['case', 'documentExamineHistory', caseIdx, idx],
221
+ queryFn: () => getDocumentExamineHistory({ caseIdx: caseIdx, idx: idx }),
222
+ gcTime: 0,
223
+ staleTime: 0,
224
+ enabled: !!idx && !!caseIdx
225
+ });
226
+ return { data, isLoading, isFetched, isFetching, error };
227
+ };
228
+ export const useActionViewHwpToPdf = (key) => {
229
+ const { data, isLoading, isFetched, isFetching, error } = useQuery({
230
+ queryKey: ['case', 'hwpToPdf', key],
231
+ queryFn: () => getHwpToPdfFile({ key: key.toString() }),
232
+ gcTime: 0,
233
+ staleTime: 0,
234
+ enabled: !!key
235
+ });
236
+ return { data, isLoading, isFetched, isFetching, error };
237
+ };
@@ -10,6 +10,10 @@ import addMyCaseQuestion from '../_fetchers/addMyCaseQuestion';
10
10
  import getCaseList from '../_fetchers/getCaseList';
11
11
  import getContact from '../_fetchers/getContact';
12
12
  import addMyFileUpload from '../_fetchers/addMyFileUpload';
13
+ import getDaeryunFileList from '../_fetchers/getDaeryunFileList';
14
+ import addMyCaseExamine from '../_fetchers/addMyCaseExamine';
15
+ import getDocumentExamineHistory from '../_fetchers/getDocumentExamineHistory';
16
+ import getHwpToPdfFile from '../_fetchers/getHwpToPdfFile';
13
17
 
14
18
  const jwt2 =
15
19
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
@@ -148,6 +152,59 @@ export const useActionGetMyCaseQuestion = (id: string, page: number, pageSize: n
148
152
  return { data, isLoading, refetch };
149
153
  };
150
154
 
155
+ export const useActionGetDaeryunFileList = (id: string, jwt?: string, enabled?: boolean) => {
156
+ const { data, isLoading, refetch } = useQuery<FetchType<FileList[]>>({
157
+ queryKey: ['case', 'daeryunFileList', id],
158
+ queryFn: () =>
159
+ getDaeryunFileList({
160
+ jwt: jwt ? jwt : jwt2,
161
+ id: id as string
162
+ }),
163
+ gcTime: 0,
164
+ staleTime: 0,
165
+ enabled: enabled
166
+ // onSuccess: res => {},
167
+ // onError: error => {
168
+ // console.log(error);
169
+ // }
170
+ });
171
+ return { data, isLoading, refetch };
172
+ };
173
+
174
+ export const useActionPostCaseExamine = () => {
175
+ const { mutateAsync, status } = useMutation<
176
+ { result: boolean; data: any },
177
+ unknown,
178
+ { caseIdx: string; comment: string; idx: string; isApproved: boolean }
179
+ >({
180
+ mutationFn: async ({
181
+ caseIdx,
182
+ comment,
183
+ idx,
184
+ isApproved
185
+ }: {
186
+ caseIdx: string;
187
+ comment: string;
188
+ idx: string;
189
+ isApproved: boolean;
190
+ }) =>
191
+ await addMyCaseExamine({
192
+ caseIdx: caseIdx as string,
193
+ comment: comment as string,
194
+ idx: idx as string,
195
+ isApproved: isApproved as boolean
196
+ }),
197
+
198
+ onSuccess: res => {},
199
+ onError: error => {
200
+ console.log(error);
201
+ }
202
+ });
203
+
204
+ const isLoading = status === 'pending';
205
+ return { mutateAsync, isLoading };
206
+ };
207
+
151
208
  export const useActionPostMyCaseQuestion = (id: string, content: string, jwt?: string) => {
152
209
  const { mutateAsync, status } = useMutation<FetchType<Question[]>>({
153
210
  mutationFn: async () =>
@@ -204,3 +261,25 @@ export const useActionPostMyFileUpload = (id: string) => {
204
261
 
205
262
  return { mutateAsync };
206
263
  };
264
+
265
+ export const useActionGetDocumentExamineHistory = ({ caseIdx, idx }: { caseIdx: string; idx: number }) => {
266
+ const { data, isLoading, isFetched, isFetching, error } = useQuery<any>({
267
+ queryKey: ['case', 'documentExamineHistory', caseIdx, idx],
268
+ queryFn: () => getDocumentExamineHistory({ caseIdx: caseIdx as string, idx: idx as number }),
269
+ gcTime: 0,
270
+ staleTime: 0,
271
+ enabled: (!!idx as boolean) && (!!caseIdx as boolean)
272
+ });
273
+ return { data, isLoading, isFetched, isFetching, error };
274
+ };
275
+
276
+ export const useActionViewHwpToPdf = (key: number) => {
277
+ const { data, isLoading, isFetched, isFetching, error } = useQuery<any>({
278
+ queryKey: ['case', 'hwpToPdf', key],
279
+ queryFn: () => getHwpToPdfFile({ key: key.toString() }),
280
+ gcTime: 0,
281
+ staleTime: 0,
282
+ enabled: !!key as boolean
283
+ });
284
+ return { data, isLoading, isFetched, isFetching, error };
285
+ };
@@ -1,9 +1,7 @@
1
1
  import { twMerge } from 'tailwind-merge';
2
2
  const SubMenuButton = ({ onClick, title, isSelected, outerClassName }) => {
3
- return (<button className={twMerge(` sm-top:body_large2_tb lg:body_medium2 flex !h-[34px] !w-fit items-center justify-center rounded-[20px] px-[16px] transition-all duration-300 sm-top:h-[39px] sm-top:px-[16px] lg:h-[41px] lg:px-[20px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`, outerClassName)} onClick={onClick}>
4
- <p className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 !leading-none`} style={{
5
- color: isSelected ? 'white' : 'black'
6
- }}>
3
+ return (<button className={twMerge(` lg:rouned-[25px] relative flex !h-[34px] !w-fit items-center justify-center rounded-[20px] px-[16px] transition-all duration-300 sm-top:!h-[39px] sm-top:px-[16px] lg:!h-[49px] lg:rounded-[25px] lg:px-[28px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`, outerClassName)} onClick={onClick}>
4
+ <p className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 !leading-none ${isSelected ? 'text-white' : 'text-grayScale3'}`}>
7
5
  {title}
8
6
  </p>
9
7
  </button>);
@@ -14,7 +14,7 @@ const SubMenuButton = ({
14
14
  return (
15
15
  <button
16
16
  className={twMerge(
17
- ` sm-top:body_large2_tb lg:body_medium2 flex !h-[34px] !w-fit items-center justify-center rounded-[20px] px-[16px] transition-all duration-300 sm-top:h-[39px] sm-top:px-[16px] lg:h-[41px] lg:px-[20px] ${
17
+ ` lg:rouned-[25px] relative flex !h-[34px] !w-fit items-center justify-center rounded-[20px] px-[16px] transition-all duration-300 sm-top:!h-[39px] sm-top:px-[16px] lg:!h-[49px] lg:rounded-[25px] lg:px-[28px] ${
18
18
  isSelected ? 'bg-grayScale1' : 'bg-transparent'
19
19
  }`,
20
20
  outerClassName
@@ -22,10 +22,7 @@ const SubMenuButton = ({
22
22
  onClick={onClick}
23
23
  >
24
24
  <p
25
- className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 !leading-none`}
26
- style={{
27
- color: isSelected ? 'white' : 'black'
28
- }}
25
+ className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 !leading-none ${isSelected ? 'text-white' : 'text-grayScale3'}`}
29
26
  >
30
27
  {title}
31
28
  </p>
@@ -1,6 +1,7 @@
1
- declare const EmptyTable: ({ tap, subTap, isMinHeight }: {
1
+ declare const EmptyTable: ({ tap, subTap, isMinHeight, titleLabel }: {
2
2
  tap: string;
3
3
  subTap: number;
4
4
  isMinHeight?: boolean;
5
+ titleLabel?: string;
5
6
  }) => import("react").JSX.Element;
6
7
  export default EmptyTable;
@@ -44,12 +44,12 @@ const titleList = {
44
44
  },
45
45
  file: {
46
46
  0: {
47
- title: '현재 제출한 문서가 없어요.',
47
+ title: (ctx) => { var _a; return `${(_a = ctx.label) !== null && _a !== void 0 ? _a : '파일'}가 없어요.`; },
48
48
  subTitle: '',
49
49
  img: caseIcon4,
50
50
  width: 'w-[39.9px] sm-top:w-[49.4px] lg:w-[62.7px] ',
51
51
  height: 'h-[42px] sm-top:h-[52px] lg:h-[66px] ',
52
- marginTop: 'mt-[36px] sm-top:mt-[83px] lg:mt-[67px]'
52
+ marginTop: 'mt-[40px] sm-top:mt-[72px] lg:mt-[76px]'
53
53
  }
54
54
  },
55
55
  caseInquiry: {
@@ -73,7 +73,8 @@ const titleList = {
73
73
  }
74
74
  }
75
75
  };
76
- const EmptyTable = ({ tap, subTap, isMinHeight = true }) => {
76
+ const resolveText = (val, ctx) => (typeof val === 'function' ? val(ctx) : val);
77
+ const EmptyTable = ({ tap, subTap, isMinHeight = true, titleLabel }) => {
77
78
  const selectedTitleList = titleList[tap];
78
79
  const selectedSubTap = selectedTitleList ? selectedTitleList[subTap] : null;
79
80
  const { title, subTitle, img, width, height, marginTop } = selectedSubTap || {
@@ -84,11 +85,18 @@ const EmptyTable = ({ tap, subTap, isMinHeight = true }) => {
84
85
  height: '',
85
86
  marginTop: ''
86
87
  };
87
- return (<div className={`flex gap-[14px] sm-top:gap-[20px] ${isMinHeight ? 'min-h-[100px]' : ''} w-full flex-col items-center lg:gap-[40px] ${marginTop}`}>
88
+ const ctx = {
89
+ tap: tap,
90
+ subTap,
91
+ label: titleLabel
92
+ };
93
+ const titleText = resolveText(title, ctx);
94
+ const subTitleText = resolveText(subTitle, ctx);
95
+ return (<div className={`flex gap-[14px] sm-top:gap-[20px] ${isMinHeight ? 'min-h-[100px]' : ''} mb-[100px] w-full flex-col items-center lg:gap-[40px] ${marginTop}`}>
88
96
  <Image src={img} alt="case_icon" width={60} height={60} className={`${width} ${height}`}/>
89
97
  <div className="flex flex-col items-center justify-center ">
90
- <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{title}</p>
91
- {subTitle && <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{subTitle}</p>}
98
+ <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{titleText}</p>
99
+ {subTitle && <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{subTitleText}</p>}
92
100
  </div>
93
101
  </div>);
94
102
  };
@@ -7,6 +7,14 @@ import caseIcon4 from '../../../../../asset/images/myCase/icon/case_icon4.webp';
7
7
  import caseIcon5 from '../../../../../asset/images/myCase/icon/case_icon5.webp';
8
8
  import caseIcon6 from '../../../../../asset/images/myCase/icon/case_icon6.webp';
9
9
 
10
+ type TitleFnCtx = {
11
+ tap: keyof typeof titleList;
12
+ subTap: number;
13
+ label?: string; // 옵션
14
+ };
15
+
16
+ type TitleText = string | ((ctx: TitleFnCtx) => string);
17
+
10
18
  const titleList = {
11
19
  ongoing: {
12
20
  0: {
@@ -46,12 +54,12 @@ const titleList = {
46
54
  },
47
55
  file: {
48
56
  0: {
49
- title: '현재 제출한 문서가 없어요.',
57
+ title: (ctx: TitleFnCtx) => `${ctx.label ?? '파일'}가 없어요.`,
50
58
  subTitle: '',
51
59
  img: caseIcon4,
52
60
  width: 'w-[39.9px] sm-top:w-[49.4px] lg:w-[62.7px] ',
53
61
  height: 'h-[42px] sm-top:h-[52px] lg:h-[66px] ',
54
- marginTop: 'mt-[36px] sm-top:mt-[83px] lg:mt-[67px]'
62
+ marginTop: 'mt-[40px] sm-top:mt-[72px] lg:mt-[76px]'
55
63
  }
56
64
  },
57
65
  caseInquiry: {
@@ -76,7 +84,19 @@ const titleList = {
76
84
  }
77
85
  };
78
86
 
79
- const EmptyTable = ({ tap, subTap, isMinHeight = true }: { tap: string; subTap: number; isMinHeight?: boolean }) => {
87
+ const resolveText = (val: TitleText, ctx: TitleFnCtx) => (typeof val === 'function' ? val(ctx) : val);
88
+
89
+ const EmptyTable = ({
90
+ tap,
91
+ subTap,
92
+ isMinHeight = true,
93
+ titleLabel
94
+ }: {
95
+ tap: string;
96
+ subTap: number;
97
+ isMinHeight?: boolean;
98
+ titleLabel?: string;
99
+ }) => {
80
100
  const selectedTitleList = titleList[tap as keyof typeof titleList];
81
101
  const selectedSubTap = selectedTitleList ? selectedTitleList[subTap as keyof typeof selectedTitleList] : null;
82
102
  const { title, subTitle, img, width, height, marginTop } = selectedSubTap || {
@@ -87,16 +107,24 @@ const EmptyTable = ({ tap, subTap, isMinHeight = true }: { tap: string; subTap:
87
107
  height: '',
88
108
  marginTop: ''
89
109
  };
110
+ const ctx: TitleFnCtx = {
111
+ tap: tap as TitleFnCtx['tap'],
112
+ subTap,
113
+ label: titleLabel
114
+ };
115
+
116
+ const titleText = resolveText(title, ctx);
117
+ const subTitleText = resolveText(subTitle, ctx);
90
118
  return (
91
119
  <div
92
120
  className={`flex gap-[14px] sm-top:gap-[20px] ${
93
121
  isMinHeight ? 'min-h-[100px]' : ''
94
- } w-full flex-col items-center lg:gap-[40px] ${marginTop}`}
122
+ } mb-[100px] w-full flex-col items-center lg:gap-[40px] ${marginTop}`}
95
123
  >
96
124
  <Image src={img} alt="case_icon" width={60} height={60} className={`${width} ${height}`} />
97
125
  <div className="flex flex-col items-center justify-center ">
98
- <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{title}</p>
99
- {subTitle && <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{subTitle}</p>}
126
+ <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{titleText}</p>
127
+ {subTitle && <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">{subTitleText}</p>}
100
128
  </div>
101
129
  </div>
102
130
  );
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import '@react-pdf-viewer/core/lib/styles/index.css';
3
+ import '@react-pdf-viewer/default-layout/lib/styles/index.css';
4
+ interface FilePreViewerProps {
5
+ fileUrl: string;
6
+ fileName?: string;
7
+ fileIdx?: number;
8
+ convertedPath?: string;
9
+ onClose?: () => void;
10
+ fn?: () => void;
11
+ type?: 'server' | 'local';
12
+ }
13
+ declare const FilePreViewer: ({ fileUrl, fileIdx, fileName, convertedPath, onClose, fn, type }: FilePreViewerProps) => React.JSX.Element;
14
+ export default FilePreViewer;