aq-fe-framework 0.1.1028 → 0.1.1029
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/{chunk-YESUM3O7.mjs → chunk-RTULEWWM.mjs} +44 -11
- package/dist/components/index.mjs +3 -3
- package/dist/core/index.d.mts +9 -1
- package/dist/core/index.mjs +5 -3
- package/dist/hooks/index.d.mts +4 -15
- package/dist/modules-features/index.mjs +3 -3
- package/dist/shared/index.mjs +3 -3
- package/dist/useMyReactQuery-io2elEak.d.mts +17 -0
- package/package.json +1 -1
|
@@ -4,13 +4,6 @@ import {
|
|
|
4
4
|
useStore_Permission,
|
|
5
5
|
useStore_ProjectInfo
|
|
6
6
|
} from "./chunk-WW55EZ4B.mjs";
|
|
7
|
-
import {
|
|
8
|
-
utils_date,
|
|
9
|
-
utils_excel,
|
|
10
|
-
utils_file,
|
|
11
|
-
utils_mantineReactTable,
|
|
12
|
-
utils_text
|
|
13
|
-
} from "./chunk-7ZI7IOEP.mjs";
|
|
14
7
|
import {
|
|
15
8
|
utils_aq_mapBaseEntityToDomain,
|
|
16
9
|
utils_aq_mapDomainToEntity,
|
|
@@ -25,17 +18,24 @@ import {
|
|
|
25
18
|
utils_notification_show,
|
|
26
19
|
utils_pdf_download
|
|
27
20
|
} from "./chunk-KGBXMHKR.mjs";
|
|
21
|
+
import {
|
|
22
|
+
utils_date,
|
|
23
|
+
utils_excel,
|
|
24
|
+
utils_file,
|
|
25
|
+
utils_mantineReactTable,
|
|
26
|
+
utils_text
|
|
27
|
+
} from "./chunk-7ZI7IOEP.mjs";
|
|
28
28
|
import {
|
|
29
29
|
createGenericStore
|
|
30
30
|
} from "./chunk-BTITP4TN.mjs";
|
|
31
|
-
import {
|
|
32
|
-
enumLabel_gender,
|
|
33
|
-
enum_daysOfWeek
|
|
34
|
-
} from "./chunk-J4WTZ3B4.mjs";
|
|
35
31
|
import {
|
|
36
32
|
const_object_colors,
|
|
37
33
|
const_object_documentTypes
|
|
38
34
|
} from "./chunk-OHAOJE5F.mjs";
|
|
35
|
+
import {
|
|
36
|
+
enumLabel_gender,
|
|
37
|
+
enum_daysOfWeek
|
|
38
|
+
} from "./chunk-J4WTZ3B4.mjs";
|
|
39
39
|
import {
|
|
40
40
|
baseAxios_default,
|
|
41
41
|
createBaseApi,
|
|
@@ -18601,6 +18601,38 @@ import { jsx as jsx245, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
|
18601
18601
|
import { Group as Group43 } from "@mantine/core";
|
|
18602
18602
|
import { useMemo as useMemo35 } from "react";
|
|
18603
18603
|
import { jsx as jsx246, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
18604
|
+
function CustomDataTableAPI(_a) {
|
|
18605
|
+
var _b = _a, {
|
|
18606
|
+
deleteAxiosFn,
|
|
18607
|
+
buttonCreateUpdateProps,
|
|
18608
|
+
columns,
|
|
18609
|
+
reactQueryProps
|
|
18610
|
+
} = _b, rest = __objRest(_b, [
|
|
18611
|
+
"deleteAxiosFn",
|
|
18612
|
+
"buttonCreateUpdateProps",
|
|
18613
|
+
"columns",
|
|
18614
|
+
"reactQueryProps"
|
|
18615
|
+
]);
|
|
18616
|
+
const query = useMyReactQuery(reactQueryProps);
|
|
18617
|
+
const memoizedColumns = useMemo35(
|
|
18618
|
+
() => columns,
|
|
18619
|
+
[columns]
|
|
18620
|
+
);
|
|
18621
|
+
return /* @__PURE__ */ jsx246(
|
|
18622
|
+
MyDataTable,
|
|
18623
|
+
__spreadValues({
|
|
18624
|
+
isError: query.isError,
|
|
18625
|
+
isLoading: query.isLoading,
|
|
18626
|
+
data: query.data || [],
|
|
18627
|
+
renderTopToolbarCustomActions: () => /* @__PURE__ */ jsx246(Group43, { children: buttonCreateUpdateProps && /* @__PURE__ */ jsx246(MyButtonCreateUpdate, __spreadValues({}, buttonCreateUpdateProps)) }),
|
|
18628
|
+
renderRowActions: ({ row }) => /* @__PURE__ */ jsxs139(MyCenterFull, { children: [
|
|
18629
|
+
buttonCreateUpdateProps && /* @__PURE__ */ jsx246(MyButtonCreateUpdate, __spreadValues({ isUpdate: true }, buttonCreateUpdateProps)),
|
|
18630
|
+
deleteAxiosFn && /* @__PURE__ */ jsx246(MyActionIconDelete, { contextData: row.original.code, onSubmit: () => deleteAxiosFn(row.original.id) })
|
|
18631
|
+
] }),
|
|
18632
|
+
columns: memoizedColumns
|
|
18633
|
+
}, rest)
|
|
18634
|
+
);
|
|
18635
|
+
}
|
|
18604
18636
|
|
|
18605
18637
|
// src/core/withAPI/MyButtonViewFileAPI.tsx
|
|
18606
18638
|
import { useDisclosure as useDisclosure23 } from "@mantine/hooks";
|
|
@@ -18683,6 +18715,7 @@ export {
|
|
|
18683
18715
|
CustomTabs,
|
|
18684
18716
|
MyPrintContent,
|
|
18685
18717
|
MyModalImport,
|
|
18718
|
+
CustomDataTableAPI,
|
|
18686
18719
|
MyButtonViewFileAPI,
|
|
18687
18720
|
AQButtonExportData,
|
|
18688
18721
|
MyButtonCreate,
|
|
@@ -69,14 +69,14 @@ import {
|
|
|
69
69
|
useHeaderMegaMenuStore,
|
|
70
70
|
useS_ButtonImport,
|
|
71
71
|
useStore_BasicAppShell
|
|
72
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-RTULEWWM.mjs";
|
|
73
73
|
import "../chunk-WW55EZ4B.mjs";
|
|
74
|
-
import "../chunk-7ZI7IOEP.mjs";
|
|
75
74
|
import "../chunk-KGBXMHKR.mjs";
|
|
75
|
+
import "../chunk-7ZI7IOEP.mjs";
|
|
76
76
|
import "../chunk-NYAWQRB7.mjs";
|
|
77
77
|
import "../chunk-BTITP4TN.mjs";
|
|
78
|
-
import "../chunk-J4WTZ3B4.mjs";
|
|
79
78
|
import "../chunk-OHAOJE5F.mjs";
|
|
79
|
+
import "../chunk-J4WTZ3B4.mjs";
|
|
80
80
|
import "../chunk-Z76CSZFI.mjs";
|
|
81
81
|
import "../chunk-WZ6PXGGC.mjs";
|
|
82
82
|
import "../chunk-JD6AELXS.mjs";
|
package/dist/core/index.d.mts
CHANGED
|
@@ -17,6 +17,7 @@ import { UseEditorOptions } from '@tiptap/react';
|
|
|
17
17
|
import { M as MySelectProps } from '../MySelect-CEgpggSF.mjs';
|
|
18
18
|
export { a as MySelect } from '../MySelect-CEgpggSF.mjs';
|
|
19
19
|
import { I as IBaseEntity } from '../IBaseEntity-Am9Cgybw.mjs';
|
|
20
|
+
import { M as MyReactQueryProps } from '../useMyReactQuery-io2elEak.mjs';
|
|
20
21
|
import '../type_action-hMF6_2Mr.mjs';
|
|
21
22
|
import '@tanstack/react-table';
|
|
22
23
|
import '../type_mutation-CCtnyeP3.mjs';
|
|
@@ -302,8 +303,15 @@ interface ValidationResult {
|
|
|
302
303
|
rows?: RowDetail[];
|
|
303
304
|
}
|
|
304
305
|
|
|
306
|
+
interface CustomDataTableAPIProps<TData extends MRT_RowData, IReq, IRes> extends Omit<MyDataTableProps<TData>, "data"> {
|
|
307
|
+
reactQueryProps: MyReactQueryProps<IRes, IReq, TData[]>;
|
|
308
|
+
deleteAxiosFn?: (id: number) => Promise<AxiosResponse<MyApiResponse<IRes>>> | void;
|
|
309
|
+
buttonCreateUpdateProps?: MyButtonCreateUpdateProps<IReq, IRes>;
|
|
310
|
+
}
|
|
311
|
+
declare function CustomDataTableAPI<TData extends MRT_RowData, IReq = any, IRes = TData[]>({ deleteAxiosFn, buttonCreateUpdateProps, columns, reactQueryProps, ...rest }: CustomDataTableAPIProps<TData, IReq, IRes>): react_jsx_runtime.JSX.Element;
|
|
312
|
+
|
|
305
313
|
declare function MyButtonViewFileAPI({ filePath }: {
|
|
306
314
|
filePath?: string;
|
|
307
315
|
}): react_jsx_runtime.JSX.Element;
|
|
308
316
|
|
|
309
|
-
export { CustomAutocomplete, CustomEnumBadge, CustomNumberInput, type CustomNumberInputProps, CustomPhoneNumberInput, CustomSwitchTheme, CustomTabs, CustomThemeIconSquareCheck, DroppablePlaceholder, type FieldDefinition, type IWeeklySession, type ModalImportId, MyActionIconProps, MyButtonCreateUpdate, type MyButtonCreateUpdateProps, type MyButtonExportStructureProps, MyButtonModalForm, type MyButtonModalFormProps, MyButtonModalProps, MyButtonPrintPDF, type MyButtonPrintPDFProps, MyButtonProps, MyButtonViewFile, MyButtonViewFileAPI, MyDataTableSelectOne, MyDataTableStagedChanges, type MyDataTableStagedChangesProps, MyDayOfWeekPicker, MyFileInputPreview, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyModalImport, MyPrintContent, type MyPrintContentProps, MyRichTextEditor, MySelectFromAPI, type MySelectFromAPIProps, MySelectProps, MyStatsCard, MyTextInput, type MyTextInputProps, MyWeeklySessionSchedulerPicker, type RowDetail, type StagedChange, type ValidationResult, type WeeklySessionSchedulerProps };
|
|
317
|
+
export { CustomAutocomplete, CustomDataTableAPI, CustomEnumBadge, CustomNumberInput, type CustomNumberInputProps, CustomPhoneNumberInput, CustomSwitchTheme, CustomTabs, CustomThemeIconSquareCheck, DroppablePlaceholder, type FieldDefinition, type IWeeklySession, type ModalImportId, MyActionIconProps, MyButtonCreateUpdate, type MyButtonCreateUpdateProps, type MyButtonExportStructureProps, MyButtonModalForm, type MyButtonModalFormProps, MyButtonModalProps, MyButtonPrintPDF, type MyButtonPrintPDFProps, MyButtonProps, MyButtonViewFile, MyButtonViewFileAPI, MyDataTableSelectOne, MyDataTableStagedChanges, type MyDataTableStagedChangesProps, MyDayOfWeekPicker, MyFileInputPreview, MyFlexColumn, MyFlexEnd, MyFlexIconTitle, MyInfoBox, type MyInfoBoxItem, type MyInfoBoxProps, MyLabelValueRow, MyModalImport, MyPrintContent, type MyPrintContentProps, MyRichTextEditor, MySelectFromAPI, type MySelectFromAPIProps, MySelectProps, MyStatsCard, MyTextInput, type MyTextInputProps, MyWeeklySessionSchedulerPicker, type RowDetail, type StagedChange, type ValidationResult, type WeeklySessionSchedulerProps };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CustomAutocomplete,
|
|
3
|
+
CustomDataTableAPI,
|
|
3
4
|
CustomEnumBadge,
|
|
4
5
|
CustomNumberInput,
|
|
5
6
|
CustomPhoneNumberInput,
|
|
@@ -32,19 +33,20 @@ import {
|
|
|
32
33
|
MyStatsCard,
|
|
33
34
|
MyTextInput2 as MyTextInput,
|
|
34
35
|
MyWeeklySessionSchedulerPicker
|
|
35
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-RTULEWWM.mjs";
|
|
36
37
|
import "../chunk-WW55EZ4B.mjs";
|
|
37
|
-
import "../chunk-7ZI7IOEP.mjs";
|
|
38
38
|
import "../chunk-KGBXMHKR.mjs";
|
|
39
|
+
import "../chunk-7ZI7IOEP.mjs";
|
|
39
40
|
import "../chunk-NYAWQRB7.mjs";
|
|
40
41
|
import "../chunk-BTITP4TN.mjs";
|
|
41
|
-
import "../chunk-J4WTZ3B4.mjs";
|
|
42
42
|
import "../chunk-OHAOJE5F.mjs";
|
|
43
|
+
import "../chunk-J4WTZ3B4.mjs";
|
|
43
44
|
import "../chunk-Z76CSZFI.mjs";
|
|
44
45
|
import "../chunk-WZ6PXGGC.mjs";
|
|
45
46
|
import "../chunk-JD6AELXS.mjs";
|
|
46
47
|
export {
|
|
47
48
|
CustomAutocomplete,
|
|
49
|
+
CustomDataTableAPI,
|
|
48
50
|
CustomEnumBadge,
|
|
49
51
|
CustomNumberInput,
|
|
50
52
|
CustomPhoneNumberInput,
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -4,8 +4,9 @@ import * as next_dist_shared_lib_app_router_context_shared_runtime from 'next/di
|
|
|
4
4
|
import { B as BaseApiType, M as MyApiResponse } from '../useMyReactMutation-XkhMBQeB.mjs';
|
|
5
5
|
export { I as IPagingParams, a as MyReactMutationProps, c as createBaseApi, u as useMyReactMutation } from '../useMyReactMutation-XkhMBQeB.mjs';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
-
import { QueryKey
|
|
8
|
-
import { AxiosInstance
|
|
7
|
+
import { QueryKey } from '@tanstack/react-query';
|
|
8
|
+
import { AxiosInstance } from 'axios';
|
|
9
|
+
export { M as MyReactQueryProps, u as useMyReactQuery } from '../useMyReactQuery-io2elEak.mjs';
|
|
9
10
|
import { I as IAQModule } from '../IAQModule-bW0dxQvX.mjs';
|
|
10
11
|
import '../type_mutation-CCtnyeP3.mjs';
|
|
11
12
|
import '../IBaseEntity-Am9Cgybw.mjs';
|
|
@@ -74,18 +75,6 @@ declare const useLoadAxiosConfig: ({ axiosInstance, url, prefix }: {
|
|
|
74
75
|
setFlag: react.Dispatch<react.SetStateAction<boolean>>;
|
|
75
76
|
};
|
|
76
77
|
|
|
77
|
-
interface MyReactQueryProps<IRes, IBody, TData = IRes> {
|
|
78
|
-
queryKey?: QueryKey;
|
|
79
|
-
axiosFn?: () => Promise<AxiosResponse<MyApiResponse<IRes>, IBody>>;
|
|
80
|
-
options?: Omit<UseQueryOptions<IRes, Error, TData>, "queryKey">;
|
|
81
|
-
mockData?: IRes;
|
|
82
|
-
isPrototype?: boolean;
|
|
83
|
-
}
|
|
84
|
-
declare function useMyReactQuery<IRes, IBody, TData = IRes>({ queryKey, axiosFn, options, mockData, isPrototype, }: MyReactQueryProps<IRes, IBody, TData>): UseQueryResult<TData, Error> & {
|
|
85
|
-
dataCount: number;
|
|
86
|
-
rawData: MyApiResponse<IRes> | null;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
78
|
declare function useQ_AQ_GetAQModule(): _tanstack_react_query.UseQueryResult<IAQModule, Error>;
|
|
90
79
|
|
|
91
|
-
export { BaseApiType, MyApiResponse,
|
|
80
|
+
export { BaseApiType, MyApiResponse, useConfig, useCrudService, useEditableRows, useExportData, useLoadAxiosConfig, useMyDevice, useMyRouter, useQ_AQ_GetAQModule };
|
|
@@ -97,14 +97,14 @@ import {
|
|
|
97
97
|
MailTemplateDeleteButton,
|
|
98
98
|
useS_moduleConfig,
|
|
99
99
|
useStore_Authenticate
|
|
100
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-RTULEWWM.mjs";
|
|
101
101
|
import "../chunk-WW55EZ4B.mjs";
|
|
102
|
-
import "../chunk-7ZI7IOEP.mjs";
|
|
103
102
|
import "../chunk-KGBXMHKR.mjs";
|
|
103
|
+
import "../chunk-7ZI7IOEP.mjs";
|
|
104
104
|
import "../chunk-NYAWQRB7.mjs";
|
|
105
105
|
import "../chunk-BTITP4TN.mjs";
|
|
106
|
-
import "../chunk-J4WTZ3B4.mjs";
|
|
107
106
|
import "../chunk-OHAOJE5F.mjs";
|
|
107
|
+
import "../chunk-J4WTZ3B4.mjs";
|
|
108
108
|
import "../chunk-Z76CSZFI.mjs";
|
|
109
109
|
import "../chunk-WZ6PXGGC.mjs";
|
|
110
110
|
import "../chunk-JD6AELXS.mjs";
|
package/dist/shared/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "../chunk-NMY3UEY5.mjs";
|
|
2
2
|
import {
|
|
3
3
|
MySelect
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RTULEWWM.mjs";
|
|
5
5
|
import "../chunk-WW55EZ4B.mjs";
|
|
6
|
+
import "../chunk-KGBXMHKR.mjs";
|
|
6
7
|
import {
|
|
7
8
|
utils_converter
|
|
8
9
|
} from "../chunk-7ZI7IOEP.mjs";
|
|
9
|
-
import "../chunk-KGBXMHKR.mjs";
|
|
10
10
|
import "../chunk-NYAWQRB7.mjs";
|
|
11
11
|
import "../chunk-BTITP4TN.mjs";
|
|
12
|
+
import "../chunk-OHAOJE5F.mjs";
|
|
12
13
|
import {
|
|
13
14
|
enumLabel_gender,
|
|
14
15
|
enum_gender
|
|
15
16
|
} from "../chunk-J4WTZ3B4.mjs";
|
|
16
|
-
import "../chunk-OHAOJE5F.mjs";
|
|
17
17
|
import "../chunk-Z76CSZFI.mjs";
|
|
18
18
|
import "../chunk-WZ6PXGGC.mjs";
|
|
19
19
|
import {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
import { M as MyApiResponse } from './useMyReactMutation-XkhMBQeB.mjs';
|
|
4
|
+
|
|
5
|
+
interface MyReactQueryProps<IRes, IBody, TData = IRes> {
|
|
6
|
+
queryKey?: QueryKey;
|
|
7
|
+
axiosFn?: () => Promise<AxiosResponse<MyApiResponse<IRes>, IBody>>;
|
|
8
|
+
options?: Omit<UseQueryOptions<IRes, Error, TData>, "queryKey">;
|
|
9
|
+
mockData?: IRes;
|
|
10
|
+
isPrototype?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function useMyReactQuery<IRes, IBody, TData = IRes>({ queryKey, axiosFn, options, mockData, isPrototype, }: MyReactQueryProps<IRes, IBody, TData>): UseQueryResult<TData, Error> & {
|
|
13
|
+
dataCount: number;
|
|
14
|
+
rawData: MyApiResponse<IRes> | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { type MyReactQueryProps as M, useMyReactQuery as u };
|