aq-fe-framework 0.2.3 → 0.2.5
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/aqModuleIdEnum-CRhuRqot.d.mts +9 -0
- package/dist/{chunk-G75DH6JW.mjs → chunk-6VCC6SNB.mjs} +2 -1
- package/dist/{chunk-WW55EZ4B.mjs → chunk-CBZXSBNX.mjs} +3 -6
- package/dist/{chunk-LZVUOVHO.mjs → chunk-EK56CXXU.mjs} +4 -2
- package/dist/{chunk-ENA4TRWO.mjs → chunk-YMMUWZA3.mjs} +1 -57
- package/dist/{chunk-MSZEQG5H.mjs → chunk-YV2SXIKG.mjs} +355 -262
- package/dist/components/index.mjs +5 -9
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +5 -9
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.mjs +1 -3
- package/dist/mantine.module-EDE7MA6Y.module.css +22 -0
- package/dist/modules-features/index.mjs +5 -9
- package/dist/shared/index.d.mts +221 -9
- package/dist/shared/index.mjs +288 -16
- package/dist/stores/index.d.mts +2 -17
- package/dist/stores/index.mjs +1 -4
- package/dist/utils/index.mjs +1 -1
- package/dist/utils-v2/index.mjs +1 -1
- package/package.json +1 -17
- package/dist/build-object/index.d.mts +0 -33
- package/dist/build-object/index.mjs +0 -11
- package/dist/chunk-BTITP4TN.mjs +0 -21
- package/dist/chunk-NYAWQRB7.mjs +0 -29
- package/dist/chunk-S5NCYRRY.mjs +0 -105
- package/dist/chunk-VFTEXXA7.mjs +0 -28
- package/dist/const/index.d.mts +0 -36
- package/dist/const/index.mjs +0 -17
- package/dist/const_aqModuleId-DcJjCR3N.d.mts +0 -9
- package/dist/enum/index.d.mts +0 -20
- package/dist/enum/index.mjs +0 -11
- package/dist/zod-schemas/index.d.mts +0 -161
- package/dist/zod-schemas/index.mjs +0 -71
- package/dist/{CustomDataTableAPI-BVA06xYD.d.mts → CustomDataTableAPI-oGo4pFag.d.mts} +2 -2
|
@@ -37,7 +37,8 @@ var utils_converter = {
|
|
|
37
37
|
// src/utils-v2/utils_excel.ts
|
|
38
38
|
import dayjs from "dayjs";
|
|
39
39
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
40
|
-
import
|
|
40
|
+
import pkg from "file-saver";
|
|
41
|
+
var { saveAs } = pkg;
|
|
41
42
|
dayjs.extend(customParseFormat);
|
|
42
43
|
function addSheet(props) {
|
|
43
44
|
const sheet = props.workbook.addWorksheet(props.sheetName);
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createGenericStore
|
|
3
|
-
} from "./chunk-BTITP4TN.mjs";
|
|
4
1
|
import {
|
|
5
2
|
__spreadProps,
|
|
6
3
|
__spreadValues
|
|
@@ -23,10 +20,10 @@ var useAppStore = create((set, get) => ({
|
|
|
23
20
|
}
|
|
24
21
|
}));
|
|
25
22
|
|
|
26
|
-
// src/
|
|
23
|
+
// src/shared/lib/createGenericStore.ts
|
|
27
24
|
import { create as create2 } from "zustand";
|
|
28
25
|
import { persist } from "zustand/middleware";
|
|
29
|
-
function
|
|
26
|
+
function createGenericStore({ initialState, storageKey }) {
|
|
30
27
|
const storeCreator = (set) => ({
|
|
31
28
|
state: initialState,
|
|
32
29
|
setState: (newState) => set({ state: newState }),
|
|
@@ -58,7 +55,7 @@ function useStore_ProjectInfo() {
|
|
|
58
55
|
|
|
59
56
|
export {
|
|
60
57
|
useAppStore,
|
|
61
|
-
|
|
58
|
+
createGenericStore,
|
|
62
59
|
useStore_Permission,
|
|
63
60
|
useStore_ProjectInfo
|
|
64
61
|
};
|
|
@@ -124,8 +124,9 @@ function utils_date_formatToDateTimeString(date, WithSeconds) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// src/utils/utils_excel.ts
|
|
127
|
-
import
|
|
127
|
+
import pkg from "file-saver";
|
|
128
128
|
import { read, utils, writeFile } from "xlsx";
|
|
129
|
+
var { saveAs } = pkg;
|
|
129
130
|
function isObjectPath(path) {
|
|
130
131
|
return /^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*)+$/.test(path);
|
|
131
132
|
}
|
|
@@ -268,8 +269,9 @@ function utils_field_extractAQBaseField(values) {
|
|
|
268
269
|
|
|
269
270
|
// src/utils/utils_file.ts
|
|
270
271
|
import Docxtemplater from "docxtemplater";
|
|
271
|
-
import
|
|
272
|
+
import pkg2 from "file-saver";
|
|
272
273
|
import PizZip from "pizzip";
|
|
274
|
+
var { saveAs: saveAs2 } = pkg2;
|
|
273
275
|
function utils_file_fileToAQDocumentType(file) {
|
|
274
276
|
return new Promise((resolve, reject) => {
|
|
275
277
|
const fileReader = new FileReader();
|
|
@@ -74,61 +74,6 @@ function useMyRouter() {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// src/hooks/custom-hooks/createBaseApi.ts
|
|
78
|
-
function createBaseApi(baseUrl, axiosInstance) {
|
|
79
|
-
return {
|
|
80
|
-
get: ({
|
|
81
|
-
params = "",
|
|
82
|
-
id,
|
|
83
|
-
paging
|
|
84
|
-
} = {}) => {
|
|
85
|
-
return axiosInstance.get(`${baseUrl}/get` + params, { params: __spreadProps(__spreadValues({}, paging), { id }) });
|
|
86
|
-
},
|
|
87
|
-
getAll: ({
|
|
88
|
-
params = "",
|
|
89
|
-
cols,
|
|
90
|
-
paging
|
|
91
|
-
} = {}) => {
|
|
92
|
-
return axiosInstance.get(`${baseUrl}/GetAll` + params, {
|
|
93
|
-
params: __spreadValues({
|
|
94
|
-
cols: cols == null ? void 0 : cols.join(",")
|
|
95
|
-
}, paging)
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
create: (data) => {
|
|
99
|
-
return axiosInstance.post(`${baseUrl}/create`, __spreadValues({}, data));
|
|
100
|
-
},
|
|
101
|
-
update: (data) => {
|
|
102
|
-
return axiosInstance.post(`${baseUrl}/update`, data);
|
|
103
|
-
},
|
|
104
|
-
updateList: (data) => {
|
|
105
|
-
return axiosInstance.post(`${baseUrl}/updateList`, data);
|
|
106
|
-
},
|
|
107
|
-
createOrUpdateList: (data) => {
|
|
108
|
-
return axiosInstance.post(`${baseUrl}/createOrUpdateList`, data);
|
|
109
|
-
},
|
|
110
|
-
createList: (data) => {
|
|
111
|
-
return axiosInstance.post(`${baseUrl}/createList`, data);
|
|
112
|
-
},
|
|
113
|
-
delete: (id) => {
|
|
114
|
-
return axiosInstance.post(`${baseUrl}/delete`, { id });
|
|
115
|
-
},
|
|
116
|
-
//Theme delete list
|
|
117
|
-
deleteList: (values) => {
|
|
118
|
-
return axiosInstance.post(`${baseUrl}/deleteList`, values.map((item) => ({
|
|
119
|
-
id: item.id,
|
|
120
|
-
isEnabled: false
|
|
121
|
-
})));
|
|
122
|
-
},
|
|
123
|
-
deleteListIds: (ids) => {
|
|
124
|
-
return axiosInstance.post(`${baseUrl}/deleteList`, ids.map((id) => ({
|
|
125
|
-
id,
|
|
126
|
-
isEnabled: false
|
|
127
|
-
})));
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
77
|
// src/hooks/custom-hooks/useConfig.ts
|
|
133
78
|
import { useQuery } from "@tanstack/react-query";
|
|
134
79
|
async function fetchConfig(configPath) {
|
|
@@ -296,7 +241,7 @@ function useCrudService(service, queryKey) {
|
|
|
296
241
|
};
|
|
297
242
|
}
|
|
298
243
|
|
|
299
|
-
// src/
|
|
244
|
+
// src/shared/config/baseAxios.ts
|
|
300
245
|
import axios from "axios";
|
|
301
246
|
var baseAxios = axios.create({
|
|
302
247
|
baseURL: ""
|
|
@@ -376,7 +321,6 @@ export {
|
|
|
376
321
|
useExportData,
|
|
377
322
|
useMyDevice,
|
|
378
323
|
useMyRouter,
|
|
379
|
-
createBaseApi,
|
|
380
324
|
useConfig,
|
|
381
325
|
useMyReactMutation,
|
|
382
326
|
useMyReactQuery,
|