aq-fe-framework 0.1.25 → 0.1.27
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/components/index.d.mts +439 -0
- package/dist/{utils/components → components}/index.mjs +1314 -1
- package/dist/excel---d-HDs7.d.mts +19 -0
- package/dist/utils/{utils/index.d.mts → index.d.mts} +3 -18
- package/package.json +1 -1
- package/dist/utils/components/index.d.mts +0 -128
- /package/dist/{utils/chunk-ZEQATKHS.mjs → chunk-ZEQATKHS.mjs} +0 -0
- /package/dist/{utils/components → components}/index.css +0 -0
- /package/dist/utils/{utils/index.mjs → index.mjs} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ExcelJS from 'exceljs';
|
|
2
|
+
|
|
3
|
+
interface IUtils_Excel_ColumnConfig<T> {
|
|
4
|
+
fieldKey: keyof T;
|
|
5
|
+
fieldName: string;
|
|
6
|
+
isRequired?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function utils_excel_exportExcel<T extends Record<string, any>>({ workbook, sheetName, data, config, }: {
|
|
9
|
+
workbook: ExcelJS.Workbook;
|
|
10
|
+
sheetName: string;
|
|
11
|
+
data: T[];
|
|
12
|
+
config: IUtils_Excel_ColumnConfig<T>[];
|
|
13
|
+
}): Promise<ExcelJS.Workbook>;
|
|
14
|
+
declare function utils_excel_download({ workbook, name }: {
|
|
15
|
+
workbook: ExcelJS.Workbook;
|
|
16
|
+
name: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
|
|
19
|
+
export { type IUtils_Excel_ColumnConfig as I, utils_excel_download as a, utils_excel_exportExcel as u };
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export { I as IUtils_Excel_ColumnConfig, a as utils_excel_download, u as utils_excel_exportExcel } from '../excel---d-HDs7.mjs';
|
|
2
2
|
import { DefaultMantineColor } from '@mantine/core';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
|
|
5
|
-
interface IUtils_Excel_ColumnConfig<T> {
|
|
6
|
-
fieldKey: keyof T;
|
|
7
|
-
fieldName: string;
|
|
8
|
-
isRequired?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare function utils_excel_exportExcel<T extends Record<string, any>>({ workbook, sheetName, data, config, }: {
|
|
11
|
-
workbook: ExcelJS.Workbook;
|
|
12
|
-
sheetName: string;
|
|
13
|
-
data: T[];
|
|
14
|
-
config: IUtils_Excel_ColumnConfig<T>[];
|
|
15
|
-
}): Promise<ExcelJS.Workbook>;
|
|
16
|
-
declare function utils_excel_download({ workbook, name }: {
|
|
17
|
-
workbook: ExcelJS.Workbook;
|
|
18
|
-
name: string;
|
|
19
|
-
}): Promise<void>;
|
|
4
|
+
import 'exceljs';
|
|
20
5
|
|
|
21
6
|
declare const utils_converter_enumToOptions: (enumObj: object) => {
|
|
22
7
|
value: string;
|
|
@@ -59,4 +44,4 @@ declare const utils_time_getCurrentTimeString: () => string;
|
|
|
59
44
|
declare function U0MyValidateEmpty(message?: string): (value: unknown) => string | number | bigint | true | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
|
|
60
45
|
declare function U0MyValidateEmail(value?: string): "Email không đúng định dạng" | null;
|
|
61
46
|
|
|
62
|
-
export {
|
|
47
|
+
export { U0DateToDDMMYYYString, U0MyValidateEmail, U0MyValidateEmpty, utils_converter_enumToOptions, utils_converter_enumToSelectOptions, utils_converter_getKeyByValue, utils_converter_getLabelByValue, utils_date_dateToDDMMYYYString, utils_file_docxtemplaterDownload, utils_file_fileToAQDocumentType, utils_notification_show, utils_pdf_download, utils_time_convertTimeStringToSeconds, utils_time_getCurrentTimeString };
|
package/package.json
CHANGED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import react__default, { ReactNode } from 'react';
|
|
3
|
-
import { MantineSize, ActionIconProps, ButtonProps, useModalsStack } from '@mantine/core';
|
|
4
|
-
import { useDisclosure } from '@mantine/hooks';
|
|
5
|
-
import { ConfigOptions } from 'export-to-csv';
|
|
6
|
-
import { MRT_RowData, MRT_TableOptions, MRT_ColumnDef, MRT_TableInstance } from 'mantine-react-table';
|
|
7
|
-
import { EditorOptions } from '@tiptap/react';
|
|
8
|
-
|
|
9
|
-
declare const MyBoxesCore: ({ className, ...rest }: {
|
|
10
|
-
className?: string;
|
|
11
|
-
}) => react__default.JSX.Element;
|
|
12
|
-
declare const Boxes: react__default.MemoExoticComponent<({ className, ...rest }: {
|
|
13
|
-
className?: string;
|
|
14
|
-
}) => react__default.JSX.Element>;
|
|
15
|
-
|
|
16
|
-
type T0MANTINE_SIZE = number | MantineSize | (string & {}) | undefined;
|
|
17
|
-
type T0CRUD = "default" | "create" | "update" | "delete" | "save" | "createMultiple" | "check" | "import" | "print" | "cancel" | "export" | "select";
|
|
18
|
-
|
|
19
|
-
interface IMyActionIcon extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
|
|
20
|
-
crudType?: T0CRUD;
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
declare function MyActionIcon({ children, crudType, ...rest }: IMyActionIcon): react.JSX.Element | undefined;
|
|
24
|
-
|
|
25
|
-
interface IMyActionIconModal extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ActionIconProps {
|
|
26
|
-
title?: string;
|
|
27
|
-
children?: ReactNode;
|
|
28
|
-
crudType?: T0CRUD;
|
|
29
|
-
modalSize?: T0MANTINE_SIZE;
|
|
30
|
-
disclosure: ReturnType<typeof useDisclosure>;
|
|
31
|
-
fullScreen?: boolean;
|
|
32
|
-
icon?: ReactNode;
|
|
33
|
-
}
|
|
34
|
-
declare function MyActionIconModal({ fullScreen, crudType, disclosure, modalSize, title, children, icon, ...rest }: IMyActionIconModal): react.JSX.Element | undefined;
|
|
35
|
-
|
|
36
|
-
declare function MySwitchTheme(): react.JSX.Element;
|
|
37
|
-
|
|
38
|
-
interface I0LinkItem {
|
|
39
|
-
pageId?: number;
|
|
40
|
-
name?: string;
|
|
41
|
-
label: string;
|
|
42
|
-
status?: "Default" | "Prototype" | "New" | "Menu" | "Change";
|
|
43
|
-
link?: string;
|
|
44
|
-
links?: I0LinkItem[];
|
|
45
|
-
}
|
|
46
|
-
declare function BasicAppShell_transformMenuToEnum(prefixProjectName: string, menu: I0LinkItem[]): Record<string, number>;
|
|
47
|
-
declare function BasicAppShell({ children, menu }: {
|
|
48
|
-
children: ReactNode;
|
|
49
|
-
menu: I0LinkItem[];
|
|
50
|
-
}): react.JSX.Element;
|
|
51
|
-
declare const groupToTwoLevels: (menu: I0LinkItem[]) => I0LinkItem[];
|
|
52
|
-
declare function utils_layout_getItemsWithoutLinks(menu: I0LinkItem[]): I0LinkItem[];
|
|
53
|
-
|
|
54
|
-
declare function MyAppSpotlight({ menu }: {
|
|
55
|
-
menu: I0LinkItem[];
|
|
56
|
-
}): react.JSX.Element;
|
|
57
|
-
declare function SpotlightTrigger(): react.JSX.Element;
|
|
58
|
-
|
|
59
|
-
interface IMyButton extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
|
|
60
|
-
crudType?: T0CRUD;
|
|
61
|
-
children?: ReactNode;
|
|
62
|
-
}
|
|
63
|
-
declare function MyButton({ children, crudType, ...rest }: IMyButton): react.JSX.Element | undefined;
|
|
64
|
-
|
|
65
|
-
interface IMyButtonModal extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "style">, ButtonProps {
|
|
66
|
-
label?: string;
|
|
67
|
-
title?: string;
|
|
68
|
-
children?: ReactNode;
|
|
69
|
-
crudType?: T0CRUD;
|
|
70
|
-
modalSize?: T0MANTINE_SIZE;
|
|
71
|
-
objectName?: string;
|
|
72
|
-
disclosure: ReturnType<typeof useDisclosure>;
|
|
73
|
-
fullScreen?: boolean;
|
|
74
|
-
}
|
|
75
|
-
declare function MyButtonModal({ fullScreen, crudType, disclosure, modalSize, title, label, children, objectName, ...rest }: IMyButtonModal): react.JSX.Element | undefined;
|
|
76
|
-
|
|
77
|
-
interface SelectFileModalProps {
|
|
78
|
-
onExportStructure?: () => void;
|
|
79
|
-
stack: ReturnType<typeof useModalsStack<"select-file-page" | "select-field-page" | "implement-page">>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
interface IAQCardProps {
|
|
83
|
-
imgSrc?: string | null;
|
|
84
|
-
title?: string;
|
|
85
|
-
description?: string;
|
|
86
|
-
children?: ReactNode;
|
|
87
|
-
date?: string;
|
|
88
|
-
status?: string;
|
|
89
|
-
href?: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
type FormatFunction<TData extends MRT_RowData> = (value: any) => any;
|
|
93
|
-
interface IDataTable<TData extends MRT_RowData> extends MRT_TableOptions<TData> {
|
|
94
|
-
columns: MRT_ColumnDef<TData>[];
|
|
95
|
-
data: TData[];
|
|
96
|
-
rowActionSize?: number;
|
|
97
|
-
exportAble?: boolean;
|
|
98
|
-
renderTopToolbarCustomActions?: ((props: {
|
|
99
|
-
table: MRT_TableInstance<TData>;
|
|
100
|
-
}) => ReactNode) | undefined;
|
|
101
|
-
csvConfigProps?: ConfigOptions;
|
|
102
|
-
formats?: {
|
|
103
|
-
[K in keyof TData]?: FormatFunction<TData>;
|
|
104
|
-
};
|
|
105
|
-
setSelectedRow?: (data: any) => void;
|
|
106
|
-
}
|
|
107
|
-
declare function MyDataTable<TData extends MRT_RowData>({ formats, exportAble, csvConfigProps, rowActionSize, columns, data, renderTopToolbarCustomActions, setSelectedRow, ...rest }: IDataTable<TData>): react.JSX.Element | undefined;
|
|
108
|
-
|
|
109
|
-
interface IMyTextEditor extends Partial<EditorOptions> {
|
|
110
|
-
label?: string;
|
|
111
|
-
error?: string;
|
|
112
|
-
value?: string;
|
|
113
|
-
onChange?: any;
|
|
114
|
-
contentHeight?: MantineSize | string;
|
|
115
|
-
autoHiddenToolBar?: boolean;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface IMenu {
|
|
119
|
-
label?: string;
|
|
120
|
-
href?: string;
|
|
121
|
-
}
|
|
122
|
-
interface IHeaderMegaMenu {
|
|
123
|
-
children?: ReactNode;
|
|
124
|
-
menus?: IMenu[];
|
|
125
|
-
}
|
|
126
|
-
declare function HeaderMegaMenu({ children, menus }: IHeaderMegaMenu): react.JSX.Element;
|
|
127
|
-
|
|
128
|
-
export { BasicAppShell, BasicAppShell_transformMenuToEnum, Boxes, HeaderMegaMenu, type I0LinkItem, type IAQCardProps, type IMyTextEditor, MyActionIcon, MyActionIconModal, MyAppSpotlight, MyBoxesCore, MyButton, MyButtonModal, MyDataTable, MySwitchTheme, type SelectFileModalProps, SpotlightTrigger, groupToTwoLevels, utils_layout_getItemsWithoutLinks };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|