aq-fe-framework 0.1.139 → 0.1.141
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/{BasicAppShell-CGIz9MsN.d.mts → BasicAppShell-DRQbwDjA.d.mts} +4 -2
- package/dist/chunk-5U2JSHSJ.mjs +22 -0
- package/dist/{chunk-CJDXLINF.mjs → chunk-DRMICFA6.mjs} +0 -20
- package/dist/{chunk-2TDR7DML.mjs → chunk-EMJGXIBV.mjs} +1085 -5100
- package/dist/components/index.css +0 -6
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +3 -3
- package/dist/modules-features/index.d.mts +4 -4
- package/dist/modules-features/index.mjs +3985 -73
- package/dist/utils/index.mjs +4 -2
- package/package.json +1 -1
@@ -10,10 +10,12 @@ interface I_BasicAppShell_LinkItem {
|
|
10
10
|
links?: I_BasicAppShell_LinkItem[];
|
11
11
|
}
|
12
12
|
declare function BasicAppShell_transformMenuToEnum(prefixProjectName: string, menu: I_BasicAppShell_LinkItem[]): Record<string, number>;
|
13
|
-
|
13
|
+
interface BasicAppShellProps {
|
14
14
|
children: ReactNode;
|
15
15
|
menu: I_BasicAppShell_LinkItem[];
|
16
|
-
|
16
|
+
extraTopRight?: ReactNode;
|
17
|
+
}
|
18
|
+
declare function BasicAppShell({ children, menu, extraTopRight }: BasicAppShellProps): react_jsx_runtime.JSX.Element;
|
17
19
|
declare const groupToTwoLevels: (menu: I_BasicAppShell_LinkItem[]) => I_BasicAppShell_LinkItem[];
|
18
20
|
declare function utils_layout_getItemsWithoutLinks(menu: I_BasicAppShell_LinkItem[]): I_BasicAppShell_LinkItem[];
|
19
21
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// src/utils/utils_pdf.ts
|
2
|
+
import axios from "axios";
|
3
|
+
async function utils_pdf_download(url) {
|
4
|
+
try {
|
5
|
+
const response = await axios.get(url, {
|
6
|
+
responseType: "blob"
|
7
|
+
// Đảm bảo nhận dữ liệu dạng blob để tải file
|
8
|
+
});
|
9
|
+
const blob = new Blob([response.data], { type: "application/pdf" });
|
10
|
+
const link = document.createElement("a");
|
11
|
+
link.href = window.URL.createObjectURL(blob);
|
12
|
+
link.download = "file.pdf";
|
13
|
+
link.click();
|
14
|
+
window.URL.revokeObjectURL(link.href);
|
15
|
+
} catch (error) {
|
16
|
+
console.error("Error downloading PDF:", error);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
export {
|
21
|
+
utils_pdf_download
|
22
|
+
};
|
@@ -177,25 +177,6 @@ async function utils_file_docxtemplaterDownload({
|
|
177
177
|
saveAs2(buffer, fileName || "output.docx");
|
178
178
|
}
|
179
179
|
|
180
|
-
// src/utils/utils_pdf.ts
|
181
|
-
import axios from "axios";
|
182
|
-
async function utils_pdf_download(url) {
|
183
|
-
try {
|
184
|
-
const response = await axios.get(url, {
|
185
|
-
responseType: "blob"
|
186
|
-
// Đảm bảo nhận dữ liệu dạng blob để tải file
|
187
|
-
});
|
188
|
-
const blob = new Blob([response.data], { type: "application/pdf" });
|
189
|
-
const link = document.createElement("a");
|
190
|
-
link.href = window.URL.createObjectURL(blob);
|
191
|
-
link.download = "file.pdf";
|
192
|
-
link.click();
|
193
|
-
window.URL.revokeObjectURL(link.href);
|
194
|
-
} catch (error) {
|
195
|
-
console.error("Error downloading PDF:", error);
|
196
|
-
}
|
197
|
-
}
|
198
|
-
|
199
180
|
// src/utils/utils_time.ts
|
200
181
|
var utils_time_convertTimeStringToSeconds = (time) => {
|
201
182
|
const [hours, minutes, seconds] = time.split(":").map(Number);
|
@@ -222,7 +203,6 @@ function U0MyValidateEmail(value) {
|
|
222
203
|
}
|
223
204
|
|
224
205
|
export {
|
225
|
-
utils_pdf_download,
|
226
206
|
U0DateToDDMMYYYString,
|
227
207
|
utils_date_dateToDDMMYYYString,
|
228
208
|
utils_date_formatToDateTimeStartEnd,
|