aq-fe-framework 0.1.1174 → 0.2.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.
@@ -0,0 +1,55 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ModalProps, ScrollAreaAutosizeProps, SelectProps } from '@mantine/core';
3
+ import { ReactNode } from 'react';
4
+ import { MRT_RowData } from 'mantine-react-table';
5
+ import { u as useMyReactQuery } from './useMyReactQuery-CqXIs4-6.mjs';
6
+ import { M as MyApiResponse, a as MyReactMutationProps } from './useMyReactMutation-C4T2Bi5O.mjs';
7
+ import { AxiosResponse } from 'axios';
8
+ import { UseFormReturnType } from '@mantine/form';
9
+ import { useDisclosure } from '@mantine/hooks';
10
+ import { a as MyActionIconProps, M as MyButtonProps } from './MyButton-B-zlvQ58.mjs';
11
+ import { M as MyDataTableProps } from './MyDataTable-EHNm2xBh.mjs';
12
+
13
+ interface MyButtonCreateUpdateProps<IReq, IRes> {
14
+ /** Props của modal hiển thị */
15
+ modalProps?: Omit<ModalProps, "opened" | "onClose">;
16
+ actionIconProps?: MyActionIconProps;
17
+ buttonProps?: MyButtonProps;
18
+ submitButtonProps?: MyButtonProps;
19
+ scrollAreaAutosizeProps?: ScrollAreaAutosizeProps;
20
+ isUpdate?: boolean;
21
+ onSubmit: (values: IReq, isUpdate?: boolean) => Promise<AxiosResponse<MyApiResponse<IRes>>> | false | void;
22
+ ignoreDefaultOnSuccess?: boolean;
23
+ ignoreDefaultOnError?: boolean;
24
+ form: UseFormReturnType<IReq>;
25
+ closeModalWhenSubmit?: boolean;
26
+ resetFormWhenSubmit?: boolean;
27
+ disclosure?: ReturnType<typeof useDisclosure>;
28
+ children?: ReactNode;
29
+ useMyReactMutationProps?: Omit<MyReactMutationProps<Promise<AxiosResponse<MyApiResponse<IRes>, any>>, IRes>, "axiosFn">;
30
+ onSuccess?: (...args: any[]) => void;
31
+ onError?: (...args: any[]) => void;
32
+ initValues?: IReq;
33
+ }
34
+ declare function MyButtonCreateUpdate<IReq, IRes>({ modalProps, actionIconProps, buttonProps, submitButtonProps, form, onSubmit, onSuccess, onError, ignoreDefaultOnError, ignoreDefaultOnSuccess, closeModalWhenSubmit, resetFormWhenSubmit, children, disclosure: externalDisclosure, isUpdate, scrollAreaAutosizeProps, useMyReactMutationProps, initValues }: MyButtonCreateUpdateProps<IReq, IRes>): react_jsx_runtime.JSX.Element;
35
+
36
+ interface MySelectProps extends SelectProps {
37
+ label?: ReactNode;
38
+ isLoading?: boolean;
39
+ isError?: boolean;
40
+ }
41
+ declare function MySelect({ label, isLoading, isError, ...rest }: MySelectProps): react_jsx_runtime.JSX.Element;
42
+
43
+ interface CustomDataTableAPIProps<TData extends MRT_RowData, IReq = any, IResQuery = TData[], IResMutation = TData> extends Omit<MyDataTableProps<TData>, "data"> {
44
+ query: ReturnType<typeof useMyReactQuery<IResQuery, IReq, TData[]>>;
45
+ deleteFn?: (id: number) => Promise<any> | void;
46
+ deleteListFn?: (ids: number[]) => Promise<any> | void;
47
+ buttonCreateUpdateProps?: MyButtonCreateUpdateProps<IReq, IResMutation>;
48
+ renderCreateUpdateContent?: (isUpdate: boolean) => ReactNode;
49
+ getInitValues?: (rowData: TData) => IReq;
50
+ enableCreate?: boolean;
51
+ enableUpdate?: boolean;
52
+ }
53
+ declare function CustomDataTableAPI<TData extends MRT_RowData, IReq = any, IResQuery = TData[], IResMutation = TData>({ deleteFn, deleteListFn, buttonCreateUpdateProps, query, renderCreateUpdateContent, getInitValues, enableCreate, enableUpdate, ...rest }: CustomDataTableAPIProps<TData, IReq, IResQuery, IResMutation>): react_jsx_runtime.JSX.Element;
54
+
55
+ export { type CustomDataTableAPIProps as C, type MySelectProps as M, type MyButtonCreateUpdateProps as a, MyButtonCreateUpdate as b, MySelect as c, CustomDataTableAPI as d };
@@ -13,19 +13,19 @@
13
13
  }
14
14
 
15
15
  .tab:first-of-type {
16
- border-radius: 4px 0 0 4px;
16
+ border-radius: calc(0.25rem * var(--mantine-scale)) 0 0 calc(0.25rem * var(--mantine-scale));
17
17
  }
18
18
 
19
19
  [dir="rtl"] .tab:first-of-type {
20
- border-radius: 0 4px 4px 0;
20
+ border-radius: 0 calc(0.25rem * var(--mantine-scale)) calc(0.25rem * var(--mantine-scale)) 0;
21
21
  }
22
22
 
23
23
  .tab:last-of-type {
24
- border-radius: 0 4px 4px 0;
24
+ border-radius: 0 calc(0.25rem * var(--mantine-scale)) calc(0.25rem * var(--mantine-scale)) 0;
25
25
  }
26
26
 
27
27
  [dir="rtl"] .tab:last-of-type {
28
- border-radius: 4px 0 0 4px;
28
+ border-radius: calc(0.25rem * var(--mantine-scale)) 0 0 calc(0.25rem * var(--mantine-scale));
29
29
  }
30
30
 
31
31
  .tab + .tab {
@@ -34,7 +34,7 @@
34
34
 
35
35
  [dir="rtl"] .tab + .tab {
36
36
  border-right-width: 0;
37
- border-left-width: 1px;
37
+ border-left-width: calc(0.0625rem * var(--mantine-scale));
38
38
  }
39
39
 
40
40
  @media (hover: hover) {
@@ -0,0 +1,41 @@
1
+ import { I as IAQFileDetail } from './utils_file-JlhzjLGS.mjs';
2
+ import { I as IBaseEntity } from './IBaseEntity-BVJRftBU.mjs';
3
+
4
+ interface IFaculty extends IBaseEntity {
5
+ }
6
+
7
+ interface IUserSkillCenters extends IBaseEntity {
8
+ userId?: number;
9
+ skillCenterId?: number;
10
+ }
11
+
12
+ interface IWorkingUnit extends IBaseEntity {
13
+ }
14
+
15
+ interface IUser extends IBaseEntity {
16
+ password?: string;
17
+ passwordHash?: string;
18
+ userName?: string;
19
+ phoneNumber?: string;
20
+ email?: string;
21
+ fullName?: string;
22
+ address?: string;
23
+ isBlocked?: boolean;
24
+ AQModuleId?: number;
25
+ avatarFileDetail?: IAQFileDetail;
26
+ workingUnit?: IWorkingUnit;
27
+ workingUnitId?: number;
28
+ workingUnitName?: string;
29
+ gender?: number;
30
+ dateOfBirth?: Date;
31
+ userSkillCenters?: IUserSkillCenters[];
32
+ note?: string;
33
+ isExternal?: boolean;
34
+ facultyId?: number;
35
+ faculty?: IFaculty;
36
+ }
37
+
38
+ interface IAccount extends IUser {
39
+ }
40
+
41
+ export type { IAccount as I, IFaculty as a, IUser as b, IUserSkillCenters as c, IWorkingUnit as d };
@@ -0,0 +1,21 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { t as type_action } from './type_action-hMF6_2Mr.mjs';
3
+ import { ActionIconProps, TooltipProps, ButtonProps } from '@mantine/core';
4
+ import { ReactNode } from 'react';
5
+
6
+ interface MyActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
7
+ actionType?: type_action;
8
+ isCheckPermission?: boolean;
9
+ toolTipProps?: TooltipProps;
10
+ }
11
+ declare function MyActionIcon({ children, actionType, isCheckPermission, toolTipProps, ...rest }: MyActionIconProps): react_jsx_runtime.JSX.Element;
12
+
13
+ interface MyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
14
+ actionType?: type_action;
15
+ children?: ReactNode;
16
+ /** Không cần bật kiểm tra quyền mặc định = true */
17
+ isCheckPermission?: boolean;
18
+ }
19
+ declare function MyButton({ children, actionType, isCheckPermission, ...rest }: MyButtonProps): react_jsx_runtime.JSX.Element;
20
+
21
+ export { type MyButtonProps as M, type MyActionIconProps as a, MyActionIcon as b, MyButton as c };
@@ -1,23 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, ComponentProps } from 'react';
3
- import { ActionIconProps, TooltipProps, ButtonProps, ModalProps } from '@mantine/core';
3
+ import { ModalProps, TooltipProps } from '@mantine/core';
4
4
  import { useDisclosure } from '@mantine/hooks';
5
- import { t as type_action } from './type_action-hMF6_2Mr.mjs';
6
-
7
- interface MyActionIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
8
- actionType?: type_action;
9
- isCheckPermission?: boolean;
10
- toolTipProps?: TooltipProps;
11
- }
12
- declare function MyActionIcon({ children, actionType, isCheckPermission, toolTipProps, ...rest }: MyActionIconProps): react_jsx_runtime.JSX.Element;
13
-
14
- interface MyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
15
- actionType?: type_action;
16
- children?: ReactNode;
17
- /** Không cần bật kiểm tra quyền mặc định = true */
18
- isCheckPermission?: boolean;
19
- }
20
- declare function MyButton({ children, actionType, isCheckPermission, ...rest }: MyButtonProps): react_jsx_runtime.JSX.Element;
5
+ import { M as MyButtonProps, a as MyActionIconProps } from './MyButton-B-zlvQ58.mjs';
21
6
 
22
7
  interface MyButtonModalProps {
23
8
  children?: ReactNode;
@@ -52,4 +37,4 @@ interface MyButtonDeleteListProps extends Omit<ComponentProps<typeof MyButtonMod
52
37
  }
53
38
  declare function MyButtonDeleteList({ onSubmit, onSuccess, onError, contextData, count, ...rest }: MyButtonDeleteListProps): react_jsx_runtime.JSX.Element;
54
39
 
55
- export { type MyButtonModalProps as M, type MyActionIconProps as a, type MyButtonProps as b, type MyButtonDeleteListProps as c, MyActionIcon as d, MyButton as e, MyButtonModal as f, MyButtonDeleteList as g };
40
+ export { type MyButtonModalProps as M, type MyButtonDeleteListProps as a, MyButtonModal as b, MyButtonDeleteList as c };
@@ -27,4 +27,4 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
27
27
  }
28
28
  declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, renderTopToolbarCustomActions, visibleFields, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
29
29
 
30
- export { type MyColumnDef as M, type PaginationState as P, type MyDataTableProps as a, type MyDataTableInternalProps as b, MyDataTable as c };
30
+ export { type MyDataTableProps as M, type PaginationState as P, type MyColumnDef as a, type MyDataTableInternalProps as b, MyDataTable as c };