aq-fe-framework 0.1.259 → 0.1.261
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/{EmailConfig-JHRl7zGL.d.mts → EmailConfig-DvTXTBt3.d.mts} +1 -1
- package/dist/{IAQModule-CIu1JdT0.d.mts → IAQModule-CCtwv-e0.d.mts} +2 -10
- package/dist/base-BprRafT5.d.mts +11 -0
- package/dist/{chunk-HMRYQTJT.mjs → chunk-33OCBXSX.mjs} +4 -4
- package/dist/chunk-GFEMKKFH.mjs +25 -0
- package/dist/{chunk-IE2L2KGO.mjs → chunk-PWANQO3V.mjs} +28 -20
- package/dist/components/index.d.mts +7 -4
- package/dist/components/index.mjs +2 -2
- package/dist/const/index.mjs +2 -12
- package/dist/createBaseApi-BJ2TH3XA.d.mts +21 -0
- package/dist/hooks/index.d.mts +6 -20
- package/dist/hooks/index.mjs +1 -1
- package/dist/interfaces/index.d.mts +3 -2
- package/dist/modules-features/index.d.mts +3 -2
- package/dist/modules-features/index.mjs +5 -5
- package/package.json +1 -1
- package/dist/chunk-BZMQOGL6.mjs +0 -13
@@ -1,12 +1,4 @@
|
|
1
|
-
|
2
|
-
id?: number;
|
3
|
-
code?: string;
|
4
|
-
name?: string;
|
5
|
-
concurrencyStamp?: string;
|
6
|
-
isEnabled?: boolean;
|
7
|
-
modifiedWhen?: string;
|
8
|
-
modifiedFullName?: string;
|
9
|
-
}
|
1
|
+
import { I as IBaseEntity } from './base-BprRafT5.mjs';
|
10
2
|
|
11
3
|
interface IAQModule extends IBaseEntity {
|
12
4
|
officelName?: string;
|
@@ -28,4 +20,4 @@ interface IAQModule extends IBaseEntity {
|
|
28
20
|
};
|
29
21
|
}
|
30
22
|
|
31
|
-
export type {
|
23
|
+
export type { IAQModule as I };
|
@@ -89,8 +89,8 @@ function useMyReactMutation({
|
|
89
89
|
options
|
90
90
|
}) {
|
91
91
|
return useMutation(__spreadValues({
|
92
|
-
mutationFn: async (
|
93
|
-
const res = await axiosFn(
|
92
|
+
mutationFn: async (values) => {
|
93
|
+
const res = await axiosFn(values);
|
94
94
|
if (res.data.isSuccess == 0) throw new Error(res.data.message);
|
95
95
|
return res.data.data;
|
96
96
|
}
|
@@ -142,11 +142,11 @@ function useQ_SkillCenter_GetAll() {
|
|
142
142
|
}
|
143
143
|
|
144
144
|
export {
|
145
|
-
baseAxios_default,
|
146
|
-
useQ_AQ_GetAQModule,
|
147
145
|
createBaseApi,
|
146
|
+
baseAxios_default,
|
148
147
|
useLoadAxiosConfig,
|
149
148
|
useMyReactMutation,
|
150
149
|
useMyReactQuery,
|
150
|
+
useQ_AQ_GetAQModule,
|
151
151
|
useQ_SkillCenter_GetAll
|
152
152
|
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// src/const/array/const_array_daysOfWeek.ts
|
2
|
+
var const_array_daysOfWeek = [
|
3
|
+
"Th\u1EE9 Hai",
|
4
|
+
"Th\u1EE9 Ba",
|
5
|
+
"Th\u1EE9 T\u01B0",
|
6
|
+
"Th\u1EE9 N\u0103m",
|
7
|
+
"Th\u1EE9 S\xE1u",
|
8
|
+
"Th\u1EE9 B\u1EA3y",
|
9
|
+
"Ch\u1EE7 Nh\u1EADt"
|
10
|
+
];
|
11
|
+
|
12
|
+
// src/const/object/const_object_documentTypes.ts
|
13
|
+
var const_object_documentTypes = {
|
14
|
+
Security: 1,
|
15
|
+
Refinement: 2,
|
16
|
+
Guideline: 3,
|
17
|
+
Regulations: 4,
|
18
|
+
Workflow: 5,
|
19
|
+
Form: 6
|
20
|
+
};
|
21
|
+
|
22
|
+
export {
|
23
|
+
const_array_daysOfWeek,
|
24
|
+
const_object_documentTypes
|
25
|
+
};
|
@@ -6,8 +6,9 @@ import {
|
|
6
6
|
} from "./chunk-K6S7R6LU.mjs";
|
7
7
|
import {
|
8
8
|
baseAxios_default,
|
9
|
+
useMyReactMutation,
|
9
10
|
useQ_AQ_GetAQModule
|
10
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-33OCBXSX.mjs";
|
11
12
|
import {
|
12
13
|
createGenericStore
|
13
14
|
} from "./chunk-Y3YGC5IH.mjs";
|
@@ -1002,7 +1003,8 @@ function AQButtonExportData({
|
|
1002
1003
|
|
1003
1004
|
// src/components/Buttons/ButtonCRUD/MyButtonCreate.tsx
|
1004
1005
|
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
1005
|
-
import {
|
1006
|
+
import { notifications } from "@mantine/notifications";
|
1007
|
+
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
1006
1008
|
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
1007
1009
|
function MyButtonCreate(_a) {
|
1008
1010
|
var _b = _a, {
|
@@ -1027,24 +1029,30 @@ function MyButtonCreate(_a) {
|
|
1027
1029
|
const defaultDisclosure = useDisclosure7();
|
1028
1030
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1029
1031
|
const queryClient = useQueryClient4();
|
1030
|
-
const mutation =
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
onSuccess
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
if (notCloseModalWhenSubmit == false) {
|
1032
|
+
const mutation = useMyReactMutation({
|
1033
|
+
axiosFn: (values) => onSubmit(values),
|
1034
|
+
options: {
|
1035
|
+
onSuccess: () => {
|
1036
|
+
if (onSuccess) {
|
1037
|
+
onSuccess();
|
1038
|
+
}
|
1039
|
+
queryClient.invalidateQueries();
|
1040
|
+
utils_notification_show({ crudType: "create" });
|
1040
1041
|
disclosure[1].close();
|
1042
|
+
if (notCloseModalWhenSubmit == false) {
|
1043
|
+
disclosure[1].close();
|
1044
|
+
}
|
1045
|
+
if (notResetFormWhenSubmit == false) {
|
1046
|
+
form.reset();
|
1047
|
+
}
|
1048
|
+
},
|
1049
|
+
onError: (e4) => {
|
1050
|
+
if (onError) onError();
|
1051
|
+
notifications.show({
|
1052
|
+
message: e4.message,
|
1053
|
+
color: "red"
|
1054
|
+
});
|
1041
1055
|
}
|
1042
|
-
if (notResetFormWhenSubmit == false) {
|
1043
|
-
form.reset();
|
1044
|
-
}
|
1045
|
-
},
|
1046
|
-
onError: () => {
|
1047
|
-
if (onError) onError();
|
1048
1056
|
}
|
1049
1057
|
});
|
1050
1058
|
return /* @__PURE__ */ jsx21(MyButtonModal, __spreadProps(__spreadValues({ disclosure, crudType: "create" }, rest), { children: /* @__PURE__ */ jsx21("form", { onSubmit: form.onSubmit((values) => {
|
@@ -1058,7 +1066,7 @@ function MyButtonCreate(_a) {
|
|
1058
1066
|
// src/components/Buttons/ButtonCRUD/MyButtonDeleteList.tsx
|
1059
1067
|
import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
1060
1068
|
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1061
|
-
import { useMutation as
|
1069
|
+
import { useMutation as useMutation4, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1062
1070
|
import { useState as useState7 } from "react";
|
1063
1071
|
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
1064
1072
|
function MyButtonDeleteList(_a) {
|
@@ -1076,7 +1084,7 @@ function MyButtonDeleteList(_a) {
|
|
1076
1084
|
const queryClient = useQueryClient5();
|
1077
1085
|
const disc = useDisclosure8();
|
1078
1086
|
const loadingState = useState7();
|
1079
|
-
const mutation =
|
1087
|
+
const mutation = useMutation4({
|
1080
1088
|
mutationFn: async () => await onSubmit(),
|
1081
1089
|
onSuccess: () => {
|
1082
1090
|
if (onSuccess) {
|
@@ -5,6 +5,8 @@ import { useDisclosure, useListState } from '@mantine/hooks';
|
|
5
5
|
import { UseFormReturnType, useForm } from '@mantine/form';
|
6
6
|
import { I as I_BasicAppShell_LinkItem } from '../BasicAppShell-CGKvZ5wV.mjs';
|
7
7
|
export { a as BasicAppShell, B as BasicAppShell_transformMenuToEnum, g as groupToTwoLevels, u as utils_layout_getItemsWithoutLinks } from '../BasicAppShell-CGKvZ5wV.mjs';
|
8
|
+
import { M as MyApiResponse } from '../createBaseApi-BJ2TH3XA.mjs';
|
9
|
+
import { AxiosResponse } from 'axios';
|
8
10
|
import { I as IUtils_Excel_ColumnConfig, a as IAQFileDetail } from '../utils_file-G8NTHCO-.mjs';
|
9
11
|
import { MRT_ColumnDef, MRT_RowData, MRT_TableOptions, MRT_TableInstance } from 'mantine-react-table';
|
10
12
|
import { ConfigOptions } from 'export-to-csv';
|
@@ -12,6 +14,7 @@ import { DateInputProps } from '@mantine/dates';
|
|
12
14
|
import { EditorOptions } from '@tiptap/react';
|
13
15
|
import { IconProps, Icon } from '@tabler/icons-react';
|
14
16
|
import { CalendarEventExternal } from '@schedule-x/calendar';
|
17
|
+
import '../base-BprRafT5.mjs';
|
15
18
|
import 'exceljs';
|
16
19
|
|
17
20
|
declare const MyBoxesCore: ({ className, ...rest }: {
|
@@ -137,16 +140,16 @@ interface AQButtonExportDataProps {
|
|
137
140
|
}
|
138
141
|
declare function AQButtonExportData({ isAllData, objectName, data, exportConfig }: AQButtonExportDataProps): react_jsx_runtime.JSX.Element;
|
139
142
|
|
140
|
-
interface IMyButtonCreate<
|
141
|
-
onSubmit: (
|
143
|
+
interface IMyButtonCreate<IReq, IRes> extends Omit<ComponentProps<typeof MyButtonModal>, "disclosure" | "form" | "onSubmit"> {
|
144
|
+
onSubmit: (variables: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
142
145
|
onSuccess?: () => void;
|
143
146
|
onError?: () => void;
|
144
|
-
form: UseFormReturnType<
|
147
|
+
form: UseFormReturnType<IReq>;
|
145
148
|
notCloseModalWhenSubmit?: boolean;
|
146
149
|
notResetFormWhenSubmit?: boolean;
|
147
150
|
disclosure?: ReturnType<typeof useDisclosure>;
|
148
151
|
}
|
149
|
-
declare function MyButtonCreate<
|
152
|
+
declare function MyButtonCreate<IReq, IRes>({ form, onSubmit, onSuccess, onError, notCloseModalWhenSubmit, notResetFormWhenSubmit, children, disclosure: externalDisclosure, ...rest }: IMyButtonCreate<IReq, IRes>): react_jsx_runtime.JSX.Element;
|
150
153
|
|
151
154
|
interface IMyButtonDeleteList extends Omit<ComponentProps<typeof MyButtonModal>, "disclosure"> {
|
152
155
|
onSubmit: () => void;
|
@@ -68,10 +68,10 @@ import {
|
|
68
68
|
useS_BasicAppShell,
|
69
69
|
useS_ButtonImport,
|
70
70
|
utils_layout_getItemsWithoutLinks
|
71
|
-
} from "../chunk-
|
71
|
+
} from "../chunk-PWANQO3V.mjs";
|
72
72
|
import "../chunk-NWBLJ3W3.mjs";
|
73
73
|
import "../chunk-K6S7R6LU.mjs";
|
74
|
-
import "../chunk-
|
74
|
+
import "../chunk-33OCBXSX.mjs";
|
75
75
|
import "../chunk-Y3YGC5IH.mjs";
|
76
76
|
import "../chunk-5U2JSHSJ.mjs";
|
77
77
|
import "../chunk-7ZCOFATU.mjs";
|
package/dist/const/index.mjs
CHANGED
@@ -1,21 +1,11 @@
|
|
1
1
|
import {
|
2
|
+
const_array_daysOfWeek,
|
2
3
|
const_object_documentTypes
|
3
|
-
} from "../chunk-
|
4
|
+
} from "../chunk-GFEMKKFH.mjs";
|
4
5
|
import {
|
5
6
|
const_object_colors
|
6
7
|
} from "../chunk-NWBLJ3W3.mjs";
|
7
8
|
import "../chunk-FWCSY2DS.mjs";
|
8
|
-
|
9
|
-
// src/const/array/const_array_daysOfWeek.ts
|
10
|
-
var const_array_daysOfWeek = [
|
11
|
-
"Th\u1EE9 Hai",
|
12
|
-
"Th\u1EE9 Ba",
|
13
|
-
"Th\u1EE9 T\u01B0",
|
14
|
-
"Th\u1EE9 N\u0103m",
|
15
|
-
"Th\u1EE9 S\xE1u",
|
16
|
-
"Th\u1EE9 B\u1EA3y",
|
17
|
-
"Ch\u1EE7 Nh\u1EADt"
|
18
|
-
];
|
19
9
|
export {
|
20
10
|
const_array_daysOfWeek,
|
21
11
|
const_object_colors,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import * as axios from 'axios';
|
2
|
+
import { AxiosInstance } from 'axios';
|
3
|
+
import { I as IBaseEntity } from './base-BprRafT5.mjs';
|
4
|
+
|
5
|
+
interface MyApiResponse<IRes> {
|
6
|
+
isSuccess: 1 | 0;
|
7
|
+
message: string;
|
8
|
+
data: IRes;
|
9
|
+
}
|
10
|
+
declare function createBaseApi<T>(baseUrl: string, axiosInstance: AxiosInstance): {
|
11
|
+
getAll: ({ params }?: {
|
12
|
+
params?: string;
|
13
|
+
}) => Promise<axios.AxiosResponse<MyApiResponse<T[]>, any>>;
|
14
|
+
create: (data: Partial<T>) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
|
15
|
+
update: (data: Partial<T>) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
|
16
|
+
createOrUpdate: (data: Partial<T[]>) => Promise<axios.AxiosResponse<MyApiResponse<T[]>, any>>;
|
17
|
+
delete: (id: number) => Promise<axios.AxiosResponse<any, any>>;
|
18
|
+
deleteList: (values: IBaseEntity[]) => Promise<axios.AxiosResponse<any, any>>;
|
19
|
+
};
|
20
|
+
|
21
|
+
export { type MyApiResponse as M, createBaseApi as c };
|
package/dist/hooks/index.d.mts
CHANGED
@@ -1,31 +1,17 @@
|
|
1
|
-
import
|
1
|
+
import { M as MyApiResponse } from '../createBaseApi-BJ2TH3XA.mjs';
|
2
|
+
export { c as createBaseApi } from '../createBaseApi-BJ2TH3XA.mjs';
|
2
3
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
3
|
-
import { I as IBaseEntity, a as IAQModule } from '../IAQModule-CIu1JdT0.mjs';
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
5
5
|
import { UseMutationOptions, QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
6
|
-
|
7
|
-
|
8
|
-
isSuccess: 1 | 0;
|
9
|
-
message: string;
|
10
|
-
data: IRes;
|
11
|
-
}
|
12
|
-
declare function createBaseApi<T>(baseUrl: string, axiosInstance: AxiosInstance): {
|
13
|
-
getAll: ({ params }?: {
|
14
|
-
params?: string;
|
15
|
-
}) => Promise<axios.AxiosResponse<MyApiResponse<T[]>, any>>;
|
16
|
-
create: (data: Partial<T>) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
|
17
|
-
update: (data: Partial<T>) => Promise<axios.AxiosResponse<MyApiResponse<T>, any>>;
|
18
|
-
createOrUpdate: (data: Partial<T[]>) => Promise<axios.AxiosResponse<MyApiResponse<T[]>, any>>;
|
19
|
-
delete: (id: number) => Promise<axios.AxiosResponse<any, any>>;
|
20
|
-
deleteList: (values: IBaseEntity[]) => Promise<axios.AxiosResponse<any, any>>;
|
21
|
-
};
|
6
|
+
import { I as IAQModule } from '../IAQModule-CCtwv-e0.mjs';
|
7
|
+
import '../base-BprRafT5.mjs';
|
22
8
|
|
23
9
|
declare const useLoadAxiosConfig: ({ axiosInstance }: {
|
24
10
|
axiosInstance: AxiosInstance;
|
25
11
|
}) => void;
|
26
12
|
|
27
13
|
interface MyReactMutationProps<IReq, IRes> {
|
28
|
-
axiosFn: (
|
14
|
+
axiosFn: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
|
29
15
|
options?: UseMutationOptions<IRes, Error, IReq>;
|
30
16
|
}
|
31
17
|
declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
|
@@ -39,4 +25,4 @@ declare function useMyReactQuery<IRes, IBody>({ queryKey, axiosFn, options }: My
|
|
39
25
|
|
40
26
|
declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
|
41
27
|
|
42
|
-
export {
|
28
|
+
export { MyApiResponse, useLoadAxiosConfig, useMyReactMutation, useMyReactQuery, useQ_AQ_GetAQModule };
|
package/dist/hooks/index.mjs
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
export {
|
2
|
-
export { I as IEmailConfig } from '../EmailConfig-
|
1
|
+
export { I as IBaseEntity } from '../base-BprRafT5.mjs';
|
2
|
+
export { I as IEmailConfig } from '../EmailConfig-DvTXTBt3.mjs';
|
3
|
+
export { I as IAQModule } from '../IAQModule-CCtwv-e0.mjs';
|
3
4
|
|
4
5
|
interface IAcademicYear {
|
5
6
|
id?: number;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import { SelectProps } from '@mantine/core';
|
3
3
|
import { I as I_BasicAppShell_LinkItem } from '../BasicAppShell-CGKvZ5wV.mjs';
|
4
|
-
import { I as IBaseEntity
|
5
|
-
import { I as
|
4
|
+
import { I as IBaseEntity } from '../base-BprRafT5.mjs';
|
5
|
+
import { I as IAQModule } from '../IAQModule-CCtwv-e0.mjs';
|
6
|
+
import { I as IEmailConfig } from '../EmailConfig-DvTXTBt3.mjs';
|
6
7
|
import { ReactNode } from 'react';
|
7
8
|
|
8
9
|
declare function F_core12196({ FormTypeId }: {
|
@@ -24,10 +24,10 @@ import {
|
|
24
24
|
useS_BasicAppShell,
|
25
25
|
useS_authenticate,
|
26
26
|
utils_layout_getItemsWithoutLinks
|
27
|
-
} from "../chunk-
|
27
|
+
} from "../chunk-PWANQO3V.mjs";
|
28
28
|
import {
|
29
29
|
const_object_documentTypes
|
30
|
-
} from "../chunk-
|
30
|
+
} from "../chunk-GFEMKKFH.mjs";
|
31
31
|
import {
|
32
32
|
const_object_colors
|
33
33
|
} from "../chunk-NWBLJ3W3.mjs";
|
@@ -39,7 +39,7 @@ import {
|
|
39
39
|
baseAxios_default,
|
40
40
|
useQ_AQ_GetAQModule,
|
41
41
|
useQ_SkillCenter_GetAll
|
42
|
-
} from "../chunk-
|
42
|
+
} from "../chunk-33OCBXSX.mjs";
|
43
43
|
import {
|
44
44
|
createGenericStore
|
45
45
|
} from "../chunk-Y3YGC5IH.mjs";
|
@@ -1471,7 +1471,7 @@ function F_core38677_ReadUser() {
|
|
1471
1471
|
onClick: () => handleRowClick(row.id),
|
1472
1472
|
style: {
|
1473
1473
|
cursor: "pointer",
|
1474
|
-
backgroundColor: rowSelection[row.id] ?
|
1474
|
+
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
1475
1475
|
}
|
1476
1476
|
}),
|
1477
1477
|
state: rowSelection
|
@@ -3151,7 +3151,7 @@ function F_core83092_ReadUser() {
|
|
3151
3151
|
onClick: () => handleRowClick(row.id),
|
3152
3152
|
style: {
|
3153
3153
|
cursor: "pointer",
|
3154
|
-
backgroundColor: rowSelection[row.id] ?
|
3154
|
+
backgroundColor: rowSelection[row.id] ? const_object_colors.mantineBackgroundTealLight : "transparent"
|
3155
3155
|
}
|
3156
3156
|
}),
|
3157
3157
|
state: rowSelection
|
package/package.json
CHANGED
package/dist/chunk-BZMQOGL6.mjs
DELETED