wcz-test 6.22.1 → 6.22.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/dist/ApprovalStatus-BtAVFn5p.js +8 -0
- package/dist/{ApprovalStatus-C9HPyMiS.js.map → ApprovalStatus-BtAVFn5p.js.map} +1 -1
- package/dist/DialogsContext-DMZRefiY.js.map +1 -1
- package/dist/DialogsHooks-BEZgPVSk.js +277 -0
- package/dist/DialogsHooks-BEZgPVSk.js.map +1 -0
- package/dist/FileHooks-BJdvBvBr.js +465 -0
- package/dist/FileHooks-BJdvBvBr.js.map +1 -0
- package/dist/FileMeta-G1oT3mYK.js.map +1 -1
- package/dist/RouterListItemButton-CagMd8F_.js +35 -0
- package/dist/RouterListItemButton-CagMd8F_.js.map +1 -0
- package/dist/{UseHook-DB7btKDE.js → UseHook-CGSDGsbk.js} +4 -2
- package/dist/{UseHook-DB7btKDE.js.map → UseHook-CGSDGsbk.js.map} +1 -1
- package/dist/client.js +1 -1
- package/dist/compiler-runtime-BGHur82y.js +46 -0
- package/dist/compiler-runtime-BGHur82y.js.map +1 -0
- package/dist/components.js +1362 -305
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +937 -281
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +1717 -505
- package/dist/index.js.map +1 -1
- package/dist/models.js +27 -50
- package/dist/models.js.map +1 -1
- package/dist/queries.js +755 -206
- package/dist/queries.js.map +1 -1
- package/dist/{utils-CKW5pi6k.js → utils-CCjnelFb.js} +47 -18
- package/dist/{utils-CKW5pi6k.js.map → utils-CCjnelFb.js.map} +1 -1
- package/dist/utils.js +1 -1
- package/dist/vite.js +9 -3
- package/dist/vite.js.map +1 -1
- package/package.json +1 -1
- package/dist/ApprovalStatus-C9HPyMiS.js +0 -24
- package/dist/DialogsHooks-DBK6rBoU.js +0 -37
- package/dist/DialogsHooks-DBK6rBoU.js.map +0 -1
- package/dist/FileHooks-BM2Oyvh6.js +0 -194
- package/dist/FileHooks-BM2Oyvh6.js.map +0 -1
- package/dist/RouterListItemButton-Vj6OoqkV.js +0 -15
- package/dist/RouterListItemButton-Vj6OoqkV.js.map +0 -1
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { c as compilerRuntimeExports } from "./compiler-runtime-BGHur82y.js";
|
|
2
|
+
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import saveAs from "file-saver";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Upload } from "tus-js-client";
|
|
6
|
+
import { uuidv7 } from "uuidv7";
|
|
7
|
+
import z__default from "zod";
|
|
8
|
+
import { F as FileMetaSchema } from "./FileMeta-G1oT3mYK.js";
|
|
9
|
+
import { t as toKebabCase, c as clientEnv, h as httpClient } from "./utils-CCjnelFb.js";
|
|
10
|
+
const QUERY_KEY = "file";
|
|
11
|
+
const HOUR = 1e3 * 60 * 60;
|
|
12
|
+
const APP_NAME = toKebabCase(clientEnv.VITE_APP_TITLE);
|
|
13
|
+
z__default.object({
|
|
14
|
+
appName: z__default.string().min(1).max(255).default(APP_NAME).optional(),
|
|
15
|
+
subId: z__default.uuid()
|
|
16
|
+
});
|
|
17
|
+
const useGetFileMetas = (params, options) => {
|
|
18
|
+
const $ = compilerRuntimeExports.c(12);
|
|
19
|
+
let queryParams;
|
|
20
|
+
if ($[0] !== params.appName || $[1] !== params.subId) {
|
|
21
|
+
queryParams = new URLSearchParams();
|
|
22
|
+
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
23
|
+
queryParams.append("subId", params.subId);
|
|
24
|
+
$[0] = params.appName;
|
|
25
|
+
$[1] = params.subId;
|
|
26
|
+
$[2] = queryParams;
|
|
27
|
+
} else {
|
|
28
|
+
queryParams = $[2];
|
|
29
|
+
}
|
|
30
|
+
const t0 = params.appName ?? APP_NAME;
|
|
31
|
+
let t1;
|
|
32
|
+
if ($[3] !== params.subId || $[4] !== t0) {
|
|
33
|
+
t1 = [QUERY_KEY, "meta", t0, params.subId];
|
|
34
|
+
$[3] = params.subId;
|
|
35
|
+
$[4] = t0;
|
|
36
|
+
$[5] = t1;
|
|
37
|
+
} else {
|
|
38
|
+
t1 = $[5];
|
|
39
|
+
}
|
|
40
|
+
let t2;
|
|
41
|
+
if ($[6] !== queryParams) {
|
|
42
|
+
t2 = (t32) => {
|
|
43
|
+
const {
|
|
44
|
+
signal
|
|
45
|
+
} = t32;
|
|
46
|
+
return httpClient.request({
|
|
47
|
+
url: `/${QUERY_KEY}/v1/meta?${queryParams.toString()}`,
|
|
48
|
+
method: "GET",
|
|
49
|
+
signal
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
$[6] = queryParams;
|
|
53
|
+
$[7] = t2;
|
|
54
|
+
} else {
|
|
55
|
+
t2 = $[7];
|
|
56
|
+
}
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[8] !== options || $[9] !== t1 || $[10] !== t2) {
|
|
59
|
+
t3 = {
|
|
60
|
+
...options,
|
|
61
|
+
queryKey: t1,
|
|
62
|
+
queryFn: t2,
|
|
63
|
+
staleTime: HOUR,
|
|
64
|
+
gcTime: HOUR,
|
|
65
|
+
refetchOnWindowFocus: false
|
|
66
|
+
};
|
|
67
|
+
$[8] = options;
|
|
68
|
+
$[9] = t1;
|
|
69
|
+
$[10] = t2;
|
|
70
|
+
$[11] = t3;
|
|
71
|
+
} else {
|
|
72
|
+
t3 = $[11];
|
|
73
|
+
}
|
|
74
|
+
return useQuery(t3);
|
|
75
|
+
};
|
|
76
|
+
z__default.object({
|
|
77
|
+
appName: z__default.string().min(1).max(255).default(APP_NAME).optional(),
|
|
78
|
+
meta: FileMetaSchema.nullish()
|
|
79
|
+
});
|
|
80
|
+
const useGetFileThumbnail = (params, options) => {
|
|
81
|
+
const $ = compilerRuntimeExports.c(13);
|
|
82
|
+
let queryParams;
|
|
83
|
+
if ($[0] !== params.appName || $[1] !== params.meta?.id) {
|
|
84
|
+
queryParams = new URLSearchParams();
|
|
85
|
+
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
86
|
+
queryParams.append("id", params.meta?.id ?? "");
|
|
87
|
+
$[0] = params.appName;
|
|
88
|
+
$[1] = params.meta?.id;
|
|
89
|
+
$[2] = queryParams;
|
|
90
|
+
} else {
|
|
91
|
+
queryParams = $[2];
|
|
92
|
+
}
|
|
93
|
+
const t0 = params.appName ?? APP_NAME;
|
|
94
|
+
const t1 = params.meta?.id;
|
|
95
|
+
let t2;
|
|
96
|
+
if ($[3] !== t0 || $[4] !== t1) {
|
|
97
|
+
t2 = [QUERY_KEY, "thumbnail", t0, t1];
|
|
98
|
+
$[3] = t0;
|
|
99
|
+
$[4] = t1;
|
|
100
|
+
$[5] = t2;
|
|
101
|
+
} else {
|
|
102
|
+
t2 = $[5];
|
|
103
|
+
}
|
|
104
|
+
let t3;
|
|
105
|
+
if ($[6] !== queryParams) {
|
|
106
|
+
t3 = (t42) => {
|
|
107
|
+
const {
|
|
108
|
+
signal
|
|
109
|
+
} = t42;
|
|
110
|
+
return httpClient.request({
|
|
111
|
+
url: `/${QUERY_KEY}/v1/thumbnail?${queryParams.toString()}`,
|
|
112
|
+
method: "GET",
|
|
113
|
+
signal,
|
|
114
|
+
responseType: "blob"
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
$[6] = queryParams;
|
|
118
|
+
$[7] = t3;
|
|
119
|
+
} else {
|
|
120
|
+
t3 = $[7];
|
|
121
|
+
}
|
|
122
|
+
const t4 = !!params.meta && options?.enabled !== false;
|
|
123
|
+
let t5;
|
|
124
|
+
if ($[8] !== options || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
|
|
125
|
+
t5 = {
|
|
126
|
+
...options,
|
|
127
|
+
queryKey: t2,
|
|
128
|
+
queryFn: t3,
|
|
129
|
+
select: _temp,
|
|
130
|
+
staleTime: HOUR,
|
|
131
|
+
gcTime: HOUR,
|
|
132
|
+
refetchOnWindowFocus: false,
|
|
133
|
+
enabled: t4
|
|
134
|
+
};
|
|
135
|
+
$[8] = options;
|
|
136
|
+
$[9] = t2;
|
|
137
|
+
$[10] = t3;
|
|
138
|
+
$[11] = t4;
|
|
139
|
+
$[12] = t5;
|
|
140
|
+
} else {
|
|
141
|
+
t5 = $[12];
|
|
142
|
+
}
|
|
143
|
+
return useQuery(t5);
|
|
144
|
+
};
|
|
145
|
+
z__default.object({
|
|
146
|
+
appName: z__default.string().min(1).max(255).default(APP_NAME).optional(),
|
|
147
|
+
meta: FileMetaSchema.nullish()
|
|
148
|
+
});
|
|
149
|
+
const useGetFile = (params, options) => {
|
|
150
|
+
const $ = compilerRuntimeExports.c(13);
|
|
151
|
+
let queryParams;
|
|
152
|
+
if ($[0] !== params.appName || $[1] !== params.meta?.id) {
|
|
153
|
+
queryParams = new URLSearchParams();
|
|
154
|
+
queryParams.append("appName", params.appName ?? APP_NAME);
|
|
155
|
+
queryParams.append("id", params.meta?.id ?? "");
|
|
156
|
+
$[0] = params.appName;
|
|
157
|
+
$[1] = params.meta?.id;
|
|
158
|
+
$[2] = queryParams;
|
|
159
|
+
} else {
|
|
160
|
+
queryParams = $[2];
|
|
161
|
+
}
|
|
162
|
+
const t0 = params.appName ?? APP_NAME;
|
|
163
|
+
const t1 = params.meta?.id;
|
|
164
|
+
let t2;
|
|
165
|
+
if ($[3] !== t0 || $[4] !== t1) {
|
|
166
|
+
t2 = [QUERY_KEY, t0, t1];
|
|
167
|
+
$[3] = t0;
|
|
168
|
+
$[4] = t1;
|
|
169
|
+
$[5] = t2;
|
|
170
|
+
} else {
|
|
171
|
+
t2 = $[5];
|
|
172
|
+
}
|
|
173
|
+
let t3;
|
|
174
|
+
if ($[6] !== queryParams) {
|
|
175
|
+
t3 = (t42) => {
|
|
176
|
+
const {
|
|
177
|
+
signal
|
|
178
|
+
} = t42;
|
|
179
|
+
return httpClient.request({
|
|
180
|
+
url: `/${QUERY_KEY}/v1?${queryParams.toString()}`,
|
|
181
|
+
method: "GET",
|
|
182
|
+
signal,
|
|
183
|
+
responseType: "blob"
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
$[6] = queryParams;
|
|
187
|
+
$[7] = t3;
|
|
188
|
+
} else {
|
|
189
|
+
t3 = $[7];
|
|
190
|
+
}
|
|
191
|
+
const t4 = !!params.meta && options?.enabled !== false;
|
|
192
|
+
let t5;
|
|
193
|
+
if ($[8] !== options || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
|
|
194
|
+
t5 = {
|
|
195
|
+
...options,
|
|
196
|
+
queryKey: t2,
|
|
197
|
+
queryFn: t3,
|
|
198
|
+
select: _temp2,
|
|
199
|
+
staleTime: HOUR,
|
|
200
|
+
gcTime: HOUR,
|
|
201
|
+
refetchOnWindowFocus: false,
|
|
202
|
+
enabled: t4
|
|
203
|
+
};
|
|
204
|
+
$[8] = options;
|
|
205
|
+
$[9] = t2;
|
|
206
|
+
$[10] = t3;
|
|
207
|
+
$[11] = t4;
|
|
208
|
+
$[12] = t5;
|
|
209
|
+
} else {
|
|
210
|
+
t5 = $[12];
|
|
211
|
+
}
|
|
212
|
+
return useQuery(t5);
|
|
213
|
+
};
|
|
214
|
+
const useDownloadFile = (options) => {
|
|
215
|
+
const $ = compilerRuntimeExports.c(2);
|
|
216
|
+
let t0;
|
|
217
|
+
if ($[0] !== options) {
|
|
218
|
+
t0 = {
|
|
219
|
+
...options,
|
|
220
|
+
mutationFn: _temp3,
|
|
221
|
+
onSuccess: _temp4
|
|
222
|
+
};
|
|
223
|
+
$[0] = options;
|
|
224
|
+
$[1] = t0;
|
|
225
|
+
} else {
|
|
226
|
+
t0 = $[1];
|
|
227
|
+
}
|
|
228
|
+
return useMutation(t0);
|
|
229
|
+
};
|
|
230
|
+
const useOpenFile = (options) => {
|
|
231
|
+
const $ = compilerRuntimeExports.c(2);
|
|
232
|
+
let t0;
|
|
233
|
+
if ($[0] !== options) {
|
|
234
|
+
t0 = {
|
|
235
|
+
...options,
|
|
236
|
+
mutationFn: _temp5,
|
|
237
|
+
onSuccess: _temp6
|
|
238
|
+
};
|
|
239
|
+
$[0] = options;
|
|
240
|
+
$[1] = t0;
|
|
241
|
+
} else {
|
|
242
|
+
t0 = $[1];
|
|
243
|
+
}
|
|
244
|
+
return useMutation(t0);
|
|
245
|
+
};
|
|
246
|
+
const useUpdateFileMeta = (options) => {
|
|
247
|
+
const $ = compilerRuntimeExports.c(5);
|
|
248
|
+
const queryClient = useQueryClient();
|
|
249
|
+
let t0;
|
|
250
|
+
if ($[0] !== queryClient) {
|
|
251
|
+
t0 = () => queryClient.invalidateQueries({
|
|
252
|
+
queryKey: [QUERY_KEY, "meta"],
|
|
253
|
+
exact: false
|
|
254
|
+
});
|
|
255
|
+
$[0] = queryClient;
|
|
256
|
+
$[1] = t0;
|
|
257
|
+
} else {
|
|
258
|
+
t0 = $[1];
|
|
259
|
+
}
|
|
260
|
+
let t1;
|
|
261
|
+
if ($[2] !== options || $[3] !== t0) {
|
|
262
|
+
t1 = {
|
|
263
|
+
...options,
|
|
264
|
+
mutationFn: _temp7,
|
|
265
|
+
onSettled: t0
|
|
266
|
+
};
|
|
267
|
+
$[2] = options;
|
|
268
|
+
$[3] = t0;
|
|
269
|
+
$[4] = t1;
|
|
270
|
+
} else {
|
|
271
|
+
t1 = $[4];
|
|
272
|
+
}
|
|
273
|
+
return useMutation(t1);
|
|
274
|
+
};
|
|
275
|
+
const useDeleteFile = (options) => {
|
|
276
|
+
const $ = compilerRuntimeExports.c(5);
|
|
277
|
+
const queryClient = useQueryClient();
|
|
278
|
+
let t0;
|
|
279
|
+
if ($[0] !== queryClient) {
|
|
280
|
+
t0 = () => queryClient.invalidateQueries({
|
|
281
|
+
queryKey: [QUERY_KEY, "meta"],
|
|
282
|
+
exact: false
|
|
283
|
+
});
|
|
284
|
+
$[0] = queryClient;
|
|
285
|
+
$[1] = t0;
|
|
286
|
+
} else {
|
|
287
|
+
t0 = $[1];
|
|
288
|
+
}
|
|
289
|
+
let t1;
|
|
290
|
+
if ($[2] !== options || $[3] !== t0) {
|
|
291
|
+
t1 = {
|
|
292
|
+
...options,
|
|
293
|
+
mutationFn: _temp8,
|
|
294
|
+
onSettled: t0
|
|
295
|
+
};
|
|
296
|
+
$[2] = options;
|
|
297
|
+
$[3] = t0;
|
|
298
|
+
$[4] = t1;
|
|
299
|
+
} else {
|
|
300
|
+
t1 = $[4];
|
|
301
|
+
}
|
|
302
|
+
return useMutation(t1);
|
|
303
|
+
};
|
|
304
|
+
const useDeleteFiles = (options) => {
|
|
305
|
+
const $ = compilerRuntimeExports.c(5);
|
|
306
|
+
const queryClient = useQueryClient();
|
|
307
|
+
let t0;
|
|
308
|
+
if ($[0] !== queryClient) {
|
|
309
|
+
t0 = () => queryClient.invalidateQueries({
|
|
310
|
+
queryKey: [QUERY_KEY, "meta"],
|
|
311
|
+
exact: false
|
|
312
|
+
});
|
|
313
|
+
$[0] = queryClient;
|
|
314
|
+
$[1] = t0;
|
|
315
|
+
} else {
|
|
316
|
+
t0 = $[1];
|
|
317
|
+
}
|
|
318
|
+
let t1;
|
|
319
|
+
if ($[2] !== options || $[3] !== t0) {
|
|
320
|
+
t1 = {
|
|
321
|
+
...options,
|
|
322
|
+
mutationFn: _temp9,
|
|
323
|
+
onSettled: t0
|
|
324
|
+
};
|
|
325
|
+
$[2] = options;
|
|
326
|
+
$[3] = t0;
|
|
327
|
+
$[4] = t1;
|
|
328
|
+
} else {
|
|
329
|
+
t1 = $[4];
|
|
330
|
+
}
|
|
331
|
+
return useMutation(t1);
|
|
332
|
+
};
|
|
333
|
+
const useUploadFile = (t0) => {
|
|
334
|
+
const $ = compilerRuntimeExports.c(8);
|
|
335
|
+
const {
|
|
336
|
+
subId,
|
|
337
|
+
onSuccess,
|
|
338
|
+
onError
|
|
339
|
+
} = t0;
|
|
340
|
+
const [progress, setProgress] = useState(0);
|
|
341
|
+
const queryClient = useQueryClient();
|
|
342
|
+
let t1;
|
|
343
|
+
if ($[0] !== onError || $[1] !== onSuccess || $[2] !== queryClient || $[3] !== subId) {
|
|
344
|
+
t1 = async (file) => {
|
|
345
|
+
if (!subId) {
|
|
346
|
+
throw new Error("subId is required for file upload");
|
|
347
|
+
}
|
|
348
|
+
const metadata = {
|
|
349
|
+
id: uuidv7(),
|
|
350
|
+
appName: APP_NAME,
|
|
351
|
+
subId,
|
|
352
|
+
fileName: file.name
|
|
353
|
+
};
|
|
354
|
+
const upload = new Upload(file, {
|
|
355
|
+
endpoint: `${clientEnv.VITE_API_URL}/${QUERY_KEY}/v1/upload`,
|
|
356
|
+
chunkSize: 1048576,
|
|
357
|
+
metadata: {
|
|
358
|
+
id: metadata.id,
|
|
359
|
+
appName: metadata.appName,
|
|
360
|
+
subId: metadata.subId,
|
|
361
|
+
fileName: metadata.fileName,
|
|
362
|
+
fileExtension: file.type
|
|
363
|
+
},
|
|
364
|
+
onError: (error) => {
|
|
365
|
+
setProgress(0);
|
|
366
|
+
onError?.(error);
|
|
367
|
+
},
|
|
368
|
+
onProgress: (bytesUploaded, bytesTotal) => {
|
|
369
|
+
setProgress(bytesUploaded / bytesTotal * 100);
|
|
370
|
+
},
|
|
371
|
+
onSuccess: () => {
|
|
372
|
+
setProgress(0);
|
|
373
|
+
queryClient.invalidateQueries({
|
|
374
|
+
queryKey: [QUERY_KEY, "meta", subId],
|
|
375
|
+
exact: false
|
|
376
|
+
});
|
|
377
|
+
onSuccess?.(metadata);
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
const previousUploads = await upload.findPreviousUploads();
|
|
381
|
+
if (previousUploads.length > 0) {
|
|
382
|
+
upload.resumeFromPreviousUpload(previousUploads[0]);
|
|
383
|
+
}
|
|
384
|
+
upload.start();
|
|
385
|
+
};
|
|
386
|
+
$[0] = onError;
|
|
387
|
+
$[1] = onSuccess;
|
|
388
|
+
$[2] = queryClient;
|
|
389
|
+
$[3] = subId;
|
|
390
|
+
$[4] = t1;
|
|
391
|
+
} else {
|
|
392
|
+
t1 = $[4];
|
|
393
|
+
}
|
|
394
|
+
const mutate = t1;
|
|
395
|
+
let t2;
|
|
396
|
+
if ($[5] !== mutate || $[6] !== progress) {
|
|
397
|
+
t2 = {
|
|
398
|
+
mutate,
|
|
399
|
+
progress
|
|
400
|
+
};
|
|
401
|
+
$[5] = mutate;
|
|
402
|
+
$[6] = progress;
|
|
403
|
+
$[7] = t2;
|
|
404
|
+
} else {
|
|
405
|
+
t2 = $[7];
|
|
406
|
+
}
|
|
407
|
+
return t2;
|
|
408
|
+
};
|
|
409
|
+
function _temp(data) {
|
|
410
|
+
return URL.createObjectURL(data);
|
|
411
|
+
}
|
|
412
|
+
function _temp2(data) {
|
|
413
|
+
return URL.createObjectURL(data);
|
|
414
|
+
}
|
|
415
|
+
function _temp3(meta) {
|
|
416
|
+
return httpClient.request({
|
|
417
|
+
url: `/${QUERY_KEY}/v1/download?appName=${APP_NAME}&id=${meta.id}`,
|
|
418
|
+
method: "GET",
|
|
419
|
+
responseType: "blob"
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
function _temp4(data, variables) {
|
|
423
|
+
return saveAs(data, `${variables.fileName}.${variables.fileExtension}`);
|
|
424
|
+
}
|
|
425
|
+
function _temp5(meta) {
|
|
426
|
+
return httpClient.request({
|
|
427
|
+
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,
|
|
428
|
+
method: "GET",
|
|
429
|
+
responseType: "blob"
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function _temp6(data) {
|
|
433
|
+
window.open(URL.createObjectURL(data));
|
|
434
|
+
}
|
|
435
|
+
function _temp7(meta) {
|
|
436
|
+
return httpClient.request({
|
|
437
|
+
url: `/${QUERY_KEY}/v1/meta?appName=${APP_NAME}&id=${meta.id}`,
|
|
438
|
+
method: "PUT",
|
|
439
|
+
data: meta
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
function _temp8(meta) {
|
|
443
|
+
return httpClient.request({
|
|
444
|
+
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,
|
|
445
|
+
method: "DELETE"
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function _temp9(subId) {
|
|
449
|
+
return httpClient.request({
|
|
450
|
+
url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&subId=${subId}`,
|
|
451
|
+
method: "DELETE"
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
export {
|
|
455
|
+
useGetFileThumbnail as a,
|
|
456
|
+
useGetFile as b,
|
|
457
|
+
useDownloadFile as c,
|
|
458
|
+
useOpenFile as d,
|
|
459
|
+
useUpdateFileMeta as e,
|
|
460
|
+
useDeleteFile as f,
|
|
461
|
+
useDeleteFiles as g,
|
|
462
|
+
useUploadFile as h,
|
|
463
|
+
useGetFileMetas as u
|
|
464
|
+
};
|
|
465
|
+
//# sourceMappingURL=FileHooks-BJdvBvBr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileHooks-BJdvBvBr.js","sources":["../src/queries/FileHooks.ts"],"sourcesContent":["import { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\r\nimport saveAs from \"file-saver\";\r\nimport { useState } from \"react\";\r\nimport { Upload as TusUpload } from \"tus-js-client\";\r\nimport { uuidv7 } from \"uuidv7\";\r\nimport z from \"zod\";\r\nimport type { DetailedError } from \"tus-js-client\";\r\nimport type { DefinedInitialDataOptions, UseMutationOptions } from \"@tanstack/react-query\";\r\nimport type { FileMeta } from \"~/models/file/FileMeta\";\r\nimport { FileMetaSchema } from \"~/models/file/FileMeta\";\r\nimport { httpClient, toKebabCase } from \"~/lib/utils\";\r\nimport { clientEnv } from \"~/env\";\r\n\r\nconst QUERY_KEY = \"file\";\r\nconst HOUR = 1000 * 60 * 60;\r\nconst APP_NAME = toKebabCase(clientEnv.VITE_APP_TITLE);\r\n\r\ntype OptionalId = string | undefined | null;\r\n\r\ntype BaseFileMetaArrayQueryOptions = Omit<DefinedInitialDataOptions<Array<FileMeta>>, \"queryKey\" | \"queryFn\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseBlobQueryOptions = Omit<DefinedInitialDataOptions<Blob, Error, string>, \"queryKey\" | \"queryFn\" | \"select\" | \"staleTime\" | \"gcTime\" | \"refetchOnWindowFocus\" | \"initialData\">;\r\ntype BaseFileMetaMutationOptions = Omit<UseMutationOptions<FileMeta, Error, FileMeta>, \"mutationFn\" | \"onSettled\">;\r\ntype BaseBlobMutationOptions = Omit<UseMutationOptions<Blob, Error, FileMeta>, \"mutationFn\" | \"onSuccess\">;\r\ntype BaseStringMutationOptions = Omit<UseMutationOptions<string, Error, string>, \"mutationFn\" | \"onSettled\">;\r\n\r\nexport const GetFileMetasParamsSchema = z.object({\r\n appName: z.string().min(1).max(255).default(APP_NAME).optional(),\r\n subId: z.uuid(),\r\n});\r\n\r\nexport type GetFileMetasParams = z.infer<typeof GetFileMetasParamsSchema>;\r\n\r\nexport const useGetFileMetas = (params: GetFileMetasParams, options?: BaseFileMetaArrayQueryOptions) => {\r\n const queryParams = new URLSearchParams();\r\n queryParams.append(\"appName\", params.appName ?? APP_NAME);\r\n queryParams.append(\"subId\", params.subId);\r\n\r\n return useQuery<Array<FileMeta>>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"meta\", params.appName ?? APP_NAME, params.subId],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/meta?${queryParams.toString()}`,\r\n method: \"GET\",\r\n signal,\r\n }),\r\n staleTime: HOUR,\r\n gcTime: HOUR,\r\n refetchOnWindowFocus: false,\r\n });\r\n};\r\n\r\nexport const GetFileThumbnailParamsSchema = z.object({\r\n appName: z.string().min(1).max(255).default(APP_NAME).optional(),\r\n meta: FileMetaSchema.nullish(),\r\n});\r\n\r\nexport type GetFileThumbnailParams = z.infer<typeof GetFileThumbnailParamsSchema>;\r\n\r\nexport const useGetFileThumbnail = (params: GetFileThumbnailParams, options?: BaseBlobQueryOptions) => {\r\n const queryParams = new URLSearchParams();\r\n queryParams.append(\"appName\", params.appName ?? APP_NAME);\r\n queryParams.append(\"id\", params.meta?.id ?? \"\");\r\n\r\n return useQuery<Blob, Error, string>({\r\n ...options,\r\n queryKey: [QUERY_KEY, \"thumbnail\", params.appName ?? APP_NAME, params.meta?.id],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/thumbnail?${queryParams.toString()}`,\r\n method: \"GET\",\r\n signal,\r\n responseType: \"blob\"\r\n }),\r\n select: data => URL.createObjectURL(data),\r\n staleTime: HOUR,\r\n gcTime: HOUR,\r\n refetchOnWindowFocus: false,\r\n enabled: !!params.meta && options?.enabled !== false,\r\n });\r\n};\r\n\r\nexport const GetFileParamsSchema = z.object({\r\n appName: z.string().min(1).max(255).default(APP_NAME).optional(),\r\n meta: FileMetaSchema.nullish(),\r\n});\r\n\r\nexport type GetFileParams = z.infer<typeof GetFileParamsSchema>;\r\n\r\nexport const useGetFile = (params: GetFileParams, options?: BaseBlobQueryOptions) => {\r\n const queryParams = new URLSearchParams();\r\n queryParams.append(\"appName\", params.appName ?? APP_NAME);\r\n queryParams.append(\"id\", params.meta?.id ?? \"\");\r\n\r\n return useQuery<Blob, Error, string>({\r\n ...options,\r\n queryKey: [QUERY_KEY, params.appName ?? APP_NAME, params.meta?.id],\r\n queryFn: ({ signal }) => httpClient.request({\r\n url: `/${QUERY_KEY}/v1?${queryParams.toString()}`,\r\n method: \"GET\",\r\n signal,\r\n responseType: \"blob\"\r\n }),\r\n select: data => URL.createObjectURL(data),\r\n staleTime: HOUR,\r\n gcTime: HOUR,\r\n refetchOnWindowFocus: false,\r\n enabled: !!params.meta && options?.enabled !== false,\r\n });\r\n};\r\n\r\nexport const useDownloadFile = (options?: BaseBlobMutationOptions) => {\r\n return useMutation<Blob, Error, FileMeta>({\r\n ...options,\r\n mutationFn: meta => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/download?appName=${APP_NAME}&id=${meta.id}`,\r\n method: \"GET\",\r\n responseType: \"blob\"\r\n }),\r\n onSuccess: (data, variables) => saveAs(data, `${variables.fileName}.${variables.fileExtension}`)\r\n });\r\n};\r\n\r\nexport const useOpenFile = (options?: BaseBlobMutationOptions) => {\r\n return useMutation<Blob, Error, FileMeta>({\r\n ...options,\r\n mutationFn: meta => httpClient.request({\r\n url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,\r\n method: \"GET\",\r\n responseType: \"blob\"\r\n }),\r\n onSuccess: data => { window.open(URL.createObjectURL(data)); }\r\n });\r\n};\r\n\r\nexport const useUpdateFileMeta = (options?: BaseFileMetaMutationOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<FileMeta, Error, FileMeta>({\r\n ...options,\r\n mutationFn: meta => httpClient.request({\r\n url: `/${QUERY_KEY}/v1/meta?appName=${APP_NAME}&id=${meta.id}`,\r\n method: \"PUT\",\r\n data: meta\r\n }),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, \"meta\"], exact: false })\r\n });\r\n};\r\n\r\nexport const useDeleteFile = (options?: BaseFileMetaMutationOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<FileMeta, Error, FileMeta>({\r\n ...options,\r\n mutationFn: meta => httpClient.request({\r\n url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&id=${meta.id}`,\r\n method: \"DELETE\"\r\n }),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, \"meta\"], exact: false }),\r\n });\r\n};\r\n\r\nexport const useDeleteFiles = (options?: BaseStringMutationOptions) => {\r\n const queryClient = useQueryClient();\r\n\r\n return useMutation<string, Error, string>({\r\n ...options,\r\n mutationFn: subId => httpClient.request({\r\n url: `/${QUERY_KEY}/v1?appName=${APP_NAME}&subId=${subId}`,\r\n method: \"DELETE\"\r\n }),\r\n onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, \"meta\"], exact: false })\r\n });\r\n};\r\n\r\ninterface UseUploadFileProps {\r\n subId: OptionalId;\r\n onSuccess?: (meta: Pick<FileMeta, \"id\" | \"appName\" | \"subId\" | \"fileName\">) => void;\r\n onError?: (error: Error | DetailedError) => void;\r\n}\r\n\r\nexport const useUploadFile = ({ subId, onSuccess, onError }: UseUploadFileProps) => {\r\n const [progress, setProgress] = useState<number>(0);\r\n const queryClient = useQueryClient();\r\n\r\n const mutate = async (file: File) => {\r\n if (!subId) throw new Error(\"subId is required for file upload\");\r\n\r\n const metadata: Pick<FileMeta, \"id\" | \"appName\" | \"subId\" | \"fileName\"> = {\r\n id: uuidv7(),\r\n appName: APP_NAME,\r\n subId: subId,\r\n fileName: file.name,\r\n };\r\n\r\n const upload = new TusUpload(file, {\r\n endpoint: `${clientEnv.VITE_API_URL}/${QUERY_KEY}/v1/upload`,\r\n chunkSize: 1_048_576, // 1 MB\r\n metadata: {\r\n id: metadata.id,\r\n appName: metadata.appName,\r\n subId: metadata.subId,\r\n fileName: metadata.fileName,\r\n fileExtension: file.type\r\n },\r\n // headers: { \"Authorization\": `Bearer ${await getToken()}` }, //TODO: implement token retrieval\r\n onError: (error) => {\r\n setProgress(0);\r\n onError?.(error);\r\n },\r\n onProgress: (bytesUploaded, bytesTotal) => {\r\n setProgress((bytesUploaded / bytesTotal) * 100);\r\n },\r\n onSuccess: () => {\r\n setProgress(0);\r\n queryClient.invalidateQueries({ queryKey: [QUERY_KEY, \"meta\", subId], exact: false });\r\n onSuccess?.(metadata);\r\n },\r\n });\r\n\r\n const previousUploads = await upload.findPreviousUploads();\r\n if (previousUploads.length > 0) {\r\n upload.resumeFromPreviousUpload(previousUploads[0]);\r\n }\r\n\r\n upload.start();\r\n };\r\n\r\n return { mutate, progress };\r\n};\r\n"],"names":["QUERY_KEY","HOUR","APP_NAME","toKebabCase","clientEnv","VITE_APP_TITLE","z","object","appName","string","min","max","default","optional","subId","uuid","useGetFileMetas","params","options","$","_c","queryParams","URLSearchParams","append","t0","t1","t2","t3","signal","httpClient","request","url","toString","method","queryKey","queryFn","staleTime","gcTime","refetchOnWindowFocus","useQuery","meta","FileMetaSchema","nullish","useGetFileThumbnail","id","t4","responseType","enabled","t5","select","_temp","useGetFile","_temp2","useDownloadFile","mutationFn","_temp3","onSuccess","_temp4","useMutation","useOpenFile","_temp5","_temp6","useUpdateFileMeta","queryClient","useQueryClient","invalidateQueries","exact","_temp7","onSettled","useDeleteFile","_temp8","useDeleteFiles","_temp9","useUploadFile","onError","progress","setProgress","useState","file","Error","metadata","uuidv7","fileName","name","upload","TusUpload","endpoint","VITE_API_URL","chunkSize","fileExtension","type","error","onProgress","bytesUploaded","bytesTotal","previousUploads","findPreviousUploads","length","resumeFromPreviousUpload","start","mutate","data","URL","createObjectURL","variables","saveAs","window","open"],"mappings":";;;;;;;;;AAaA,MAAMA,YAAY;AAClB,MAAMC,OAAO,MAAO,KAAK;AACzB,MAAMC,WAAWC,YAAYC,UAAUC,cAAc;AAUbC,WAAEC,OAAO;AAAA,EAC7CC,SAASF,WAAEG,OAAAA,EAASC,IAAI,CAAC,EAAEC,IAAI,GAAG,EAAEC,QAAQV,QAAQ,EAAEW,SAAAA;AAAAA,EACtDC,OAAOR,WAAES,KAAAA;AACb,CAAC;AAIM,MAAMC,kBAAkBA,CAAAC,QAAAC,YAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AAAA,MAAAC;AAAA,MAAAF,EAAA,CAAA,MAAAF,OAAAT,WAAAW,EAAA,CAAA,MAAAF,OAAAH,OAAA;AAC3BO,kBAAoB,IAAIC,gBAAAA;AACxBD,gBAAWE,OAAQ,WAAWN,OAAMT,WAANN,QAA0B;AACxDmB,gBAAWE,OAAQ,SAASN,OAAMH,KAAM;AAACK,MAAA,CAAA,IAAAF,OAAAT;AAAAW,MAAA,CAAA,IAAAF,OAAAH;AAAAK,WAAAE;AAAAA,EAAA,OAAA;AAAAA,kBAAAF,EAAA,CAAA;AAAA,EAAA;AAIP,QAAAK,KAAAP,OAAMT,WAANN;AAA0B,MAAAuB;AAAA,MAAAN,SAAAF,OAAAH,SAAAK,SAAAK,IAAA;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;AAQEK,SAAMC,KAAML,IAAGC,gBAAiBF,IAAI,CAAC;AAAC;AAIlC,SAAAlC,OAAA3B,MAAA;AAAA,SAKLX,WAAUC,QAAS;AAAA,IAAAC,KAC9B,IAAI/B,SAAS,oBAAoBE,QAAQ,OAAOsC,KAAII,EAAG;AAAA,IAAEX,QACtD;AAAA,IAAKoE,MACP7D;AAAAA,EAAAA,CACT;AAAC;AAKmB,SAAA8B,OAAA9B,MAAA;AAAA,SAKDX,WAAUC,QAAS;AAAA,IAAAC,KAC9B,IAAI/B,SAAS,eAAeE,QAAQ,OAAOsC,KAAII,EAAG;AAAA,IAAEX,QACjD;AAAA,EAAA,CACX;AAAC;AAKoB,SAAAuC,OAAA1D,OAAA;AAAA,SAKDe,WAAUC,QAAS;AAAA,IAAAC,KAC/B,IAAI/B,SAAS,eAAeE,QAAQ,UAAUY,KAAK;AAAA,IAAEmB,QAClD;AAAA,EAAA,CACX;AAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileMeta-G1oT3mYK.js","sources":["../src/models/file/FileMeta.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport const FileMetaSchema = z.object({\n id: z.uuid(),\n subId: z.uuid(),\n appName: z.string().trim().min(1).max(255),\n fileName: z.string().trim().min(1).max(255),\n fileExtension: z.string().trim().min(1).max(255),\n fileSize: z.number().min(0),\n mediaSubType: z.string().trim().min(1).max(255),\n mediaType: z.string().trim().min(1).max(255),\n mimeType: z.string().trim().min(1).max(255),\n createdBy: z.string().trim().min(1).max(255),\n createdDate: z.date(),\n});\n\nexport type FileMeta = z.infer<typeof FileMetaSchema>;\n"],"names":[],"mappings":";AAEO,
|
|
1
|
+
{"version":3,"file":"FileMeta-G1oT3mYK.js","sources":["../src/models/file/FileMeta.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport const FileMetaSchema = z.object({\n id: z.uuid(),\n subId: z.uuid(),\n appName: z.string().trim().min(1).max(255),\n fileName: z.string().trim().min(1).max(255),\n fileExtension: z.string().trim().min(1).max(255),\n fileSize: z.number().min(0),\n mediaSubType: z.string().trim().min(1).max(255),\n mediaType: z.string().trim().min(1).max(255),\n mimeType: z.string().trim().min(1).max(255),\n createdBy: z.string().trim().min(1).max(255),\n createdDate: z.date(),\n});\n\nexport type FileMeta = z.infer<typeof FileMetaSchema>;\n"],"names":["FileMetaSchema","z","object","id","uuid","subId","appName","string","trim","min","max","fileName","fileExtension","fileSize","number","mediaSubType","mediaType","mimeType","createdBy","createdDate","date"],"mappings":";AAEO,MAAMA,iBAAiBC,EAAEC,OAAO;AAAA,EACnCC,IAAIF,EAAEG,KAAAA;AAAAA,EACNC,OAAOJ,EAAEG,KAAAA;AAAAA,EACTE,SAASL,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EACzCC,UAAUV,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC1CE,eAAeX,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC/CG,UAAUZ,EAAEa,SAASL,IAAI,CAAC;AAAA,EAC1BM,cAAcd,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC9CM,WAAWf,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC3CO,UAAUhB,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC1CQ,WAAWjB,EAAEM,OAAAA,EAASC,KAAAA,EAAOC,IAAI,CAAC,EAAEC,IAAI,GAAG;AAAA,EAC3CS,aAAalB,EAAEmB,KAAAA;AACnB,CAAC;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "./DialogsContext-DMZRefiY.js";
|
|
2
|
+
import { c as compilerRuntimeExports } from "./compiler-runtime-BGHur82y.js";
|
|
3
|
+
import { ListItemButton } from "@mui/material";
|
|
4
|
+
import { createLink } from "@tanstack/react-router";
|
|
5
|
+
import React from "react";
|
|
6
|
+
const Component = React.forwardRef(function ButtonComponent(props, reference) {
|
|
7
|
+
const $ = compilerRuntimeExports.c(3);
|
|
8
|
+
let t0;
|
|
9
|
+
if ($[0] !== props || $[1] !== reference) {
|
|
10
|
+
t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemButton, { ref: reference, component: "a", ...props });
|
|
11
|
+
$[0] = props;
|
|
12
|
+
$[1] = reference;
|
|
13
|
+
$[2] = t0;
|
|
14
|
+
} else {
|
|
15
|
+
t0 = $[2];
|
|
16
|
+
}
|
|
17
|
+
return t0;
|
|
18
|
+
});
|
|
19
|
+
const CreatedComponent = createLink(Component);
|
|
20
|
+
const RouterListItemButton = (props) => {
|
|
21
|
+
const $ = compilerRuntimeExports.c(2);
|
|
22
|
+
let t0;
|
|
23
|
+
if ($[0] !== props) {
|
|
24
|
+
t0 = /* @__PURE__ */ jsxRuntimeExports.jsx(CreatedComponent, { ...props });
|
|
25
|
+
$[0] = props;
|
|
26
|
+
$[1] = t0;
|
|
27
|
+
} else {
|
|
28
|
+
t0 = $[1];
|
|
29
|
+
}
|
|
30
|
+
return t0;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
RouterListItemButton as R
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=RouterListItemButton-CagMd8F_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterListItemButton-CagMd8F_.js","sources":["../src/components/router/RouterListItemButton.tsx"],"sourcesContent":["import { ListItemButton } from \"@mui/material\";\nimport { createLink } from \"@tanstack/react-router\";\nimport React from \"react\";\nimport type { ListItemButtonProps } from \"@mui/material\";\nimport type { LinkComponent } from \"@tanstack/react-router\";\n\nconst Component = React.forwardRef<HTMLAnchorElement, ListItemButtonProps<\"a\">>(function ButtonComponent(props, reference) {\n return <ListItemButton ref={reference} component=\"a\" {...props} />;\n});\n\nconst CreatedComponent = createLink(Component);\n\nexport const RouterListItemButton: LinkComponent<typeof Component> = (props) => {\n return <CreatedComponent {...props} />;\n};\n"],"names":["Component","React","forwardRef","ButtonComponent","props","reference","$","_c","t0","CreatedComponent","createLink","RouterListItemButton","jsx"],"mappings":";;;;;AAMA,MAAMA,YAAYC,MAAMC,WAAwD,SAAAC,gBAAAC,OAAAC,WAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,MAAAF,EAAA,CAAA,MAAAF,SAAAE,SAAAD,WAAA;AACrEG,+CAAC,gBAAA,EAAoBH,KAAAA,WAAqB,WAAA,KAAG,GAAKD,OAAK;AAAIE,WAAAF;AAAAE,WAAAD;AAAAC,WAAAE;AAAAA,EAAA,OAAA;AAAAA,SAAAF,EAAA,CAAA;AAAA,EAAA;AAAA,SAA3DE;AAA2D,CACrE;AAED,MAAMC,mBAAmBC,WAAWV,SAAS;AAEtC,MAAMW,uBAAwDP,CAAAA,UAAA;AAAA,QAAAE,IAAAC,uBAAAA,EAAA,CAAA;AAAA,MAAAC;AAAA,MAAAF,SAAAF,OAAA;AAC1DI,SAAAI,kCAAAA,IAAC,kBAAA,EAAgB,GAAKR,MAAAA,CAAK;AAAIE,WAAAF;AAAAE,WAAAE;AAAAA,EAAA,OAAA;AAAAA,SAAAF,EAAA,CAAA;AAAA,EAAA;AAAA,SAA/BE;AAA+B;"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
const UserContext = createContext({});
|
|
3
3
|
function useUser() {
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
user
|
|
6
|
+
} = useContext(UserContext);
|
|
5
7
|
return user;
|
|
6
8
|
}
|
|
7
9
|
export {
|
|
8
10
|
UserContext as U,
|
|
9
11
|
useUser as u
|
|
10
12
|
};
|
|
11
|
-
//# sourceMappingURL=UseHook-
|
|
13
|
+
//# sourceMappingURL=UseHook-CGSDGsbk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseHook-
|
|
1
|
+
{"version":3,"file":"UseHook-CGSDGsbk.js","sources":["../src/contexts/UserContext.ts","../src/hooks/UseHook.tsx"],"sourcesContent":["import { createContext } from \"react\";\nimport type { Dispatch, SetStateAction } from \"react\";\nimport type { User } from \"~/models/User\";\n\nexport interface UserContextValue {\n user: User;\n setUser: Dispatch<SetStateAction<User>>;\n}\n\nexport const UserContext = createContext<UserContextValue>({} as UserContextValue);\n","import { useContext } from \"react\";\nimport type { User } from \"~/models/User\";\nimport { UserContext } from \"~/contexts/UserContext\";\n\nexport function useUser(): User {\n const { user } = useContext(UserContext);\n return user;\n}\n"],"names":["UserContext","createContext","useUser","user","useContext"],"mappings":";AASO,MAAMA,cAAcC,cAAgC,CAAA,CAAsB;ACL1E,SAAAC,UAAA;AACH,QAAA;AAAA,IAAAC;AAAAA,EAAAA,IAAiBC,WAAWJ,WAAW;AAAE,SAClCG;AAAI;"}
|
package/dist/client.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
var compilerRuntime = { exports: {} };
|
|
3
|
+
var reactCompilerRuntime_production = {};
|
|
4
|
+
var hasRequiredReactCompilerRuntime_production;
|
|
5
|
+
function requireReactCompilerRuntime_production() {
|
|
6
|
+
if (hasRequiredReactCompilerRuntime_production) return reactCompilerRuntime_production;
|
|
7
|
+
hasRequiredReactCompilerRuntime_production = 1;
|
|
8
|
+
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
9
|
+
reactCompilerRuntime_production.c = function(size) {
|
|
10
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
11
|
+
};
|
|
12
|
+
return reactCompilerRuntime_production;
|
|
13
|
+
}
|
|
14
|
+
var reactCompilerRuntime_development = {};
|
|
15
|
+
var hasRequiredReactCompilerRuntime_development;
|
|
16
|
+
function requireReactCompilerRuntime_development() {
|
|
17
|
+
if (hasRequiredReactCompilerRuntime_development) return reactCompilerRuntime_development;
|
|
18
|
+
hasRequiredReactCompilerRuntime_development = 1;
|
|
19
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
20
|
+
var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
21
|
+
reactCompilerRuntime_development.c = function(size) {
|
|
22
|
+
var dispatcher = ReactSharedInternals.H;
|
|
23
|
+
null === dispatcher && console.error(
|
|
24
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
25
|
+
);
|
|
26
|
+
return dispatcher.useMemoCache(size);
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
return reactCompilerRuntime_development;
|
|
30
|
+
}
|
|
31
|
+
var hasRequiredCompilerRuntime;
|
|
32
|
+
function requireCompilerRuntime() {
|
|
33
|
+
if (hasRequiredCompilerRuntime) return compilerRuntime.exports;
|
|
34
|
+
hasRequiredCompilerRuntime = 1;
|
|
35
|
+
if (process.env.NODE_ENV === "production") {
|
|
36
|
+
compilerRuntime.exports = requireReactCompilerRuntime_production();
|
|
37
|
+
} else {
|
|
38
|
+
compilerRuntime.exports = requireReactCompilerRuntime_development();
|
|
39
|
+
}
|
|
40
|
+
return compilerRuntime.exports;
|
|
41
|
+
}
|
|
42
|
+
var compilerRuntimeExports = requireCompilerRuntime();
|
|
43
|
+
export {
|
|
44
|
+
compilerRuntimeExports as c
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=compiler-runtime-BGHur82y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-runtime-BGHur82y.js","sources":["../node_modules/react/cjs/react-compiler-runtime.production.js","../node_modules/react/cjs/react-compiler-runtime.development.js","../node_modules/react/compiler-runtime.js"],"sourcesContent":["/**\n * @license React\n * react-compiler-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nexports.c = function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n};\n","/**\n * @license React\n * react-compiler-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n var ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n exports.c = function (size) {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher.useMemoCache(size);\n };\n })();\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-compiler-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-compiler-runtime.development.js');\n}\n"],"names":["require$$0","compilerRuntimeModule","require$$1"],"mappings":";;;;;;;AAWA,MAAI,uBACFA,MAAiB;AACnB,kCAAA,IAAY,SAAU,MAAM;AAC1B,WAAO,qBAAqB,EAAE,aAAa,IAAI;AAAA,EACjD;;;;;;;;ACJA,mBAAiB,QAAQ,IAAI,aAC1B,WAAY;AACX,QAAI,uBACFA,MAAiB;AACnB,qCAAA,IAAY,SAAU,MAAM;AAC1B,UAAI,aAAa,qBAAqB;AACtC,eAAS,cACP,QAAQ;AAAA,QACN;AAAA;AAEJ,aAAO,WAAW,aAAa,IAAI;AAAA,IACzC;AAAA,EACA,GAAG;;;;;;;ACdH,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzCC,oBAAA,UAAiBD,uCAAA;AAAA,EACnB,OAAO;AACLC,oBAAA,UAAiBC,wCAAA;AAAA,EACnB;;;;","x_google_ignoreList":[0,1,2]}
|