@esvndev/es-react-import-export 1.0.0
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/README.md +93 -0
- package/dist/component/icon/index.d.ts +2 -0
- package/dist/component/input/index.d.ts +8 -0
- package/dist/component/input/input-checkbox/index.d.ts +17 -0
- package/dist/component/input/input-date/index.d.ts +10 -0
- package/dist/component/input/input-number/index.d.ts +27 -0
- package/dist/component/input/input-style/fonts.d.ts +4 -0
- package/dist/component/input/input-style/index.d.ts +23 -0
- package/dist/component/input/input-style/input-box.d.ts +24 -0
- package/dist/component/input/input-text/index.d.ts +25 -0
- package/dist/component/modal-export-excel/IExcel.d.ts +41 -0
- package/dist/component/modal-export-excel/IStyleSetting.d.ts +10 -0
- package/dist/component/modal-export-excel/default-data.d.ts +3 -0
- package/dist/component/modal-export-excel/index.d.ts +12 -0
- package/dist/component/modal-header/index.d.ts +8 -0
- package/dist/component/modal-import-excel/IType.d.ts +24 -0
- package/dist/component/modal-import-excel/index.d.ts +26 -0
- package/dist/component/modal-import-excel/tab-handle-error.d.ts +11 -0
- package/dist/component/modal-import-excel/tab-merge.d.ts +15 -0
- package/dist/component/modal-import-excel/tab-select-file.d.ts +12 -0
- package/dist/component/modal-import-excel/tab-validate.d.ts +13 -0
- package/dist/component/modal-import-excel/utils.d.ts +21 -0
- package/dist/component/notifications.d.ts +9 -0
- package/dist/component/select-table/index.d.ts +32 -0
- package/dist/component/sidebar/index.d.ts +11 -0
- package/dist/component/utils.d.ts +17 -0
- package/dist/component/wizard/index.d.ts +3 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +83828 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +83790 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# ES TEAMPLATE IMPORT EXPORT
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
8
|
+
|
|
9
|
+
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
10
|
+
|
|
11
|
+
## Add your files
|
|
12
|
+
|
|
13
|
+
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
14
|
+
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
cd existing_repo
|
|
18
|
+
git remote add origin http://git.becoxy.com/saas/es-teamplate-import-export.git
|
|
19
|
+
git branch -M main
|
|
20
|
+
git push -uf origin main
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Integrate with your tools
|
|
24
|
+
|
|
25
|
+
- [ ] [Set up project integrations](http://git.becoxy.com/saas/es-teamplate-import-export/-/settings/integrations)
|
|
26
|
+
|
|
27
|
+
## Collaborate with your team
|
|
28
|
+
|
|
29
|
+
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
|
30
|
+
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
31
|
+
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
32
|
+
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
33
|
+
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
|
34
|
+
|
|
35
|
+
## Test and Deploy
|
|
36
|
+
|
|
37
|
+
Use the built-in continuous integration in GitLab.
|
|
38
|
+
|
|
39
|
+
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
|
40
|
+
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
41
|
+
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
42
|
+
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
43
|
+
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
# Editing this README
|
|
48
|
+
|
|
49
|
+
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
50
|
+
|
|
51
|
+
## Suggestions for a good README
|
|
52
|
+
|
|
53
|
+
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
54
|
+
|
|
55
|
+
## Name
|
|
56
|
+
Choose a self-explaining name for your project.
|
|
57
|
+
|
|
58
|
+
## Description
|
|
59
|
+
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
60
|
+
|
|
61
|
+
## Badges
|
|
62
|
+
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
63
|
+
|
|
64
|
+
## Visuals
|
|
65
|
+
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
72
|
+
|
|
73
|
+
## Support
|
|
74
|
+
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
75
|
+
|
|
76
|
+
## Roadmap
|
|
77
|
+
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
78
|
+
|
|
79
|
+
## Contributing
|
|
80
|
+
State if you are open to contributions and what your requirements are for accepting them.
|
|
81
|
+
|
|
82
|
+
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
83
|
+
|
|
84
|
+
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
85
|
+
|
|
86
|
+
## Authors and acknowledgment
|
|
87
|
+
Show your appreciation to those who have contributed to the project.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
For open source projects, say how it is licensed.
|
|
91
|
+
|
|
92
|
+
## Project status
|
|
93
|
+
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface IFormInput {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
labelSize?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
callback?: any;
|
|
8
|
+
isLabel?: boolean;
|
|
9
|
+
inLine?: boolean;
|
|
10
|
+
confirmHandle?: any;
|
|
11
|
+
reverse?: boolean;
|
|
12
|
+
desciptionLabel?: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const CheckboxInput: (props: IFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default CheckboxInput;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputType } from "reactstrap/types/lib/Input";
|
|
2
|
+
interface IFFormInput {
|
|
3
|
+
control: any;
|
|
4
|
+
name: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: InputType;
|
|
7
|
+
label: string;
|
|
8
|
+
labelSize?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
errors?: any;
|
|
11
|
+
classes?: string;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
fractionCurrency?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
width?: number;
|
|
17
|
+
isLabel?: boolean;
|
|
18
|
+
inLine?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
thousandSeparator?: string;
|
|
21
|
+
decimalSeparator?: string;
|
|
22
|
+
callback?: any;
|
|
23
|
+
allowNegative?: boolean;
|
|
24
|
+
fixedDecimalScale?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const NumberInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default NumberInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface IFDataStyleSetting {
|
|
2
|
+
color: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
bold: boolean;
|
|
7
|
+
italic: boolean;
|
|
8
|
+
underline: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IFDataInputStyle {
|
|
11
|
+
value: IFDataStyleSetting;
|
|
12
|
+
onChange: any;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
disabledColor?: boolean;
|
|
15
|
+
disabledBackgroundColor?: boolean;
|
|
16
|
+
disabledFontFamily?: boolean;
|
|
17
|
+
disabledFontSize?: boolean;
|
|
18
|
+
disabledBold?: boolean;
|
|
19
|
+
disabledItalic?: boolean;
|
|
20
|
+
disabledUnderline?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const InputStyleComponent: (props: IFDataInputStyle) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { InputStyleComponent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface IFFormInput {
|
|
2
|
+
control: any;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
labelSize?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
errors?: any;
|
|
8
|
+
classes?: string;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
isLabel?: boolean;
|
|
12
|
+
inLine?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
callback?: any;
|
|
15
|
+
tooltipText?: string;
|
|
16
|
+
disabledBackgroundColor?: boolean;
|
|
17
|
+
disabledFontFamily?: boolean;
|
|
18
|
+
disabledFontSize?: boolean;
|
|
19
|
+
disabledBold?: boolean;
|
|
20
|
+
disabledItalic?: boolean;
|
|
21
|
+
disabledUnderline?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const StyleInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default StyleInput;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InputType } from "reactstrap/types/lib/Input";
|
|
2
|
+
interface IFFormInput {
|
|
3
|
+
control: any;
|
|
4
|
+
name: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: InputType;
|
|
7
|
+
label: string;
|
|
8
|
+
labelSize?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
errors?: any;
|
|
11
|
+
classes?: string;
|
|
12
|
+
height?: number | string;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
row?: number;
|
|
17
|
+
isLabel?: boolean;
|
|
18
|
+
inLine?: boolean;
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
callback?: any;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const TextInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default TextInput;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IFDataStyleSetting } from "./IStyleSetting";
|
|
2
|
+
export interface IFGetInfoSheetApiParams {
|
|
3
|
+
file: any;
|
|
4
|
+
}
|
|
5
|
+
export interface IFGetInfoColumnApiParams {
|
|
6
|
+
file: any;
|
|
7
|
+
headerRow: number;
|
|
8
|
+
sheetId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IFExportExcel {
|
|
11
|
+
columns: any[];
|
|
12
|
+
keyword?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
countRowHeader: number;
|
|
15
|
+
title: string;
|
|
16
|
+
subtitle: string;
|
|
17
|
+
organizationId: string;
|
|
18
|
+
filter: string;
|
|
19
|
+
order: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IFReportExportExcel extends IFExportExcel {
|
|
22
|
+
fieldSums: string[];
|
|
23
|
+
groupby: string[];
|
|
24
|
+
style: IFDataExportExcelSetting;
|
|
25
|
+
}
|
|
26
|
+
export interface IFLastTMSReportApi {
|
|
27
|
+
resourceCode: string;
|
|
28
|
+
organizationId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IFDataExportExcelSetting {
|
|
31
|
+
title: IFDataStyleSetting;
|
|
32
|
+
subtitle: IFDataStyleSetting;
|
|
33
|
+
header: IFDataStyleSetting;
|
|
34
|
+
group1: IFDataStyleSetting;
|
|
35
|
+
group2: IFDataStyleSetting;
|
|
36
|
+
group3: IFDataStyleSetting;
|
|
37
|
+
content: IFDataStyleSetting;
|
|
38
|
+
summary: IFDataStyleSetting;
|
|
39
|
+
textTitle?: string;
|
|
40
|
+
textSubtitle?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type IFDataProps = {
|
|
2
|
+
openModal: boolean;
|
|
3
|
+
typeModal: string;
|
|
4
|
+
handleModal: any;
|
|
5
|
+
windowSize: any;
|
|
6
|
+
dataItem: any;
|
|
7
|
+
columns: any;
|
|
8
|
+
setCheckDetailExport?: any;
|
|
9
|
+
columnGroups?: any[];
|
|
10
|
+
};
|
|
11
|
+
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { ExportExcelComponent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface IFDataExcel {
|
|
2
|
+
step: number;
|
|
3
|
+
file?: any;
|
|
4
|
+
sheetId?: string;
|
|
5
|
+
headerRow?: number;
|
|
6
|
+
dataMap: IFDataMapExcel[];
|
|
7
|
+
}
|
|
8
|
+
export interface IFDataMapExcel {
|
|
9
|
+
field: string;
|
|
10
|
+
headerDefault: string[];
|
|
11
|
+
header: string;
|
|
12
|
+
dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
|
|
13
|
+
column?: string;
|
|
14
|
+
disableEdit?: boolean;
|
|
15
|
+
isRequired?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type IFNumberFormat = {
|
|
18
|
+
dateFormat?: string;
|
|
19
|
+
decimalSeparator?: string;
|
|
20
|
+
thousandSeparator?: string;
|
|
21
|
+
colorNegative?: string;
|
|
22
|
+
prefixNegative?: string;
|
|
23
|
+
suffixNegative?: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Control, FieldErrors, UseFormGetValues, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { IFDataExcel } from './utils';
|
|
4
|
+
import { IFNumberFormat } from './IType';
|
|
5
|
+
export interface IFPropsDetail {
|
|
6
|
+
control: Control<IFDataExcel>;
|
|
7
|
+
watch: UseFormWatch<IFDataExcel>;
|
|
8
|
+
errors: FieldErrors<IFDataExcel>;
|
|
9
|
+
setValue: UseFormSetValue<IFDataExcel>;
|
|
10
|
+
getValues: UseFormGetValues<IFDataExcel>;
|
|
11
|
+
formatNumber?: IFNumberFormat;
|
|
12
|
+
pageOptions: number[];
|
|
13
|
+
pageSizeDefault: number;
|
|
14
|
+
windowSize: any;
|
|
15
|
+
getExcelTemplate?: any;
|
|
16
|
+
optionField: any[];
|
|
17
|
+
dataInvalid: any[];
|
|
18
|
+
dataValid: any[];
|
|
19
|
+
dataValidate: any[];
|
|
20
|
+
dataError: any[];
|
|
21
|
+
headerValidateExcelColumns: any[];
|
|
22
|
+
headerHandleErrorExcelColumns: any[];
|
|
23
|
+
setStepper: Dispatch<any>;
|
|
24
|
+
}
|
|
25
|
+
declare const ImportExcelComponent: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { ImportExcelComponent };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFNumberFormat } from './IType';
|
|
2
|
+
export interface IFPropsDetail {
|
|
3
|
+
dataError: any[];
|
|
4
|
+
windowSize: any;
|
|
5
|
+
formatNumber?: IFNumberFormat;
|
|
6
|
+
pageOptions: number[];
|
|
7
|
+
pageSizeDefault: number;
|
|
8
|
+
headerHandleErrorExcelColumns: any[];
|
|
9
|
+
}
|
|
10
|
+
declare const TabHandleErrorImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default TabHandleErrorImportExcel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Control, FieldErrors, UseFormGetValues, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
|
+
import { IFDataExcel } from './utils';
|
|
3
|
+
import { IFNumberFormat } from './IType';
|
|
4
|
+
export interface IFPropsDetail {
|
|
5
|
+
control: Control<IFDataExcel>;
|
|
6
|
+
watch: UseFormWatch<IFDataExcel>;
|
|
7
|
+
errors: FieldErrors<IFDataExcel>;
|
|
8
|
+
setValue: UseFormSetValue<IFDataExcel>;
|
|
9
|
+
getValues: UseFormGetValues<IFDataExcel>;
|
|
10
|
+
optionField: any[];
|
|
11
|
+
windowSize: any;
|
|
12
|
+
formatNumber?: IFNumberFormat;
|
|
13
|
+
}
|
|
14
|
+
declare const TabMergeImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default TabMergeImportExcel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control, FieldErrors, UseFormGetValues, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
2
|
+
import { IFDataExcel } from './utils';
|
|
3
|
+
export interface IFPropsDetail {
|
|
4
|
+
control: Control<IFDataExcel>;
|
|
5
|
+
watch: UseFormWatch<IFDataExcel>;
|
|
6
|
+
errors: FieldErrors<IFDataExcel>;
|
|
7
|
+
setValue: UseFormSetValue<IFDataExcel>;
|
|
8
|
+
getValues: UseFormGetValues<IFDataExcel>;
|
|
9
|
+
getExcelTemplate: any;
|
|
10
|
+
}
|
|
11
|
+
declare const TabSelectFileImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default TabSelectFileImportExcel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFNumberFormat } from './IType';
|
|
2
|
+
export interface IFPropsDetail {
|
|
3
|
+
dataInvalid: any[];
|
|
4
|
+
dataValid: any[];
|
|
5
|
+
dataValidate: any[];
|
|
6
|
+
windowSize: any;
|
|
7
|
+
headerValidateExcelColumns: any[];
|
|
8
|
+
formatNumber?: IFNumberFormat;
|
|
9
|
+
pageOptions: number[];
|
|
10
|
+
pageSizeDefault: number;
|
|
11
|
+
}
|
|
12
|
+
declare const TabValidateImportExcel: (props: IFPropsDetail) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default TabValidateImportExcel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { UseFormSetValue } from 'react-hook-form';
|
|
3
|
+
export interface IFDataExcel {
|
|
4
|
+
step: number;
|
|
5
|
+
file?: any;
|
|
6
|
+
sheetId?: string;
|
|
7
|
+
headerRow?: number;
|
|
8
|
+
dataMap: IFDataMapExcel[];
|
|
9
|
+
}
|
|
10
|
+
export interface IFDataMapExcel {
|
|
11
|
+
field: string;
|
|
12
|
+
headerDefault: string[];
|
|
13
|
+
header: string;
|
|
14
|
+
dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
|
|
15
|
+
column?: string;
|
|
16
|
+
disableEdit?: boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const getSheetsExcel: (file: any, setValue: UseFormSetValue<any>, setOptionSheetName: Dispatch<SetStateAction<any[]>>) => void;
|
|
20
|
+
export declare const getColumnsSheetExcel: (file: any, headerRow: number, sheetName: string, handleSetColumns: any) => void;
|
|
21
|
+
export declare const mapDataImportExcel: (dataSheet: any[], headerRow: number, dataMap: IFDataMapExcel[], handleValidate: any) => Promise<any[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TFunction } from 'react-i18next';
|
|
2
|
+
export declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
3
|
+
export declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
4
|
+
export declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
5
|
+
export declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
6
|
+
export declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
|
|
7
|
+
export declare const notificationError: (param: string) => string;
|
|
8
|
+
export declare const notificationSuccess: (param: string) => string;
|
|
9
|
+
export declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IFColumnSelectTable } from "react-table-edit";
|
|
2
|
+
interface ISelectTableBox {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
control: any;
|
|
6
|
+
defaultValue?: any;
|
|
7
|
+
isMulti?: boolean;
|
|
8
|
+
isLabel?: boolean;
|
|
9
|
+
inLine?: boolean;
|
|
10
|
+
labelComponent?: any;
|
|
11
|
+
options: any[];
|
|
12
|
+
loadOptions?: any;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
label?: any;
|
|
16
|
+
labelSize?: any;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
errors?: any;
|
|
19
|
+
cssClass?: string;
|
|
20
|
+
callback?: any;
|
|
21
|
+
confirmHandle?: any;
|
|
22
|
+
columns?: IFColumnSelectTable[];
|
|
23
|
+
handleAddNew?: any;
|
|
24
|
+
fieldLabel?: string;
|
|
25
|
+
fieldValue?: string;
|
|
26
|
+
isClearable?: boolean;
|
|
27
|
+
noHeader?: boolean;
|
|
28
|
+
desciptionLabel?: string;
|
|
29
|
+
classLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const SelectTableBox: (props: ISelectTableBox) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default SelectTableBox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface IFDataProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
children: any;
|
|
4
|
+
toggleSidebar: any;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
keyboard?: boolean;
|
|
7
|
+
hiddenBackground?: boolean;
|
|
8
|
+
hiddenFullScreenButton?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Sidebar: (props: IFDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Sidebar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
2
|
+
export declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
3
|
+
export declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
4
|
+
export declare const isNullOrUndefined: (d: any) => boolean;
|
|
5
|
+
export declare const generateUUID: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* format chuỗi kí tự số
|
|
8
|
+
* @param str chuỗi số cần format
|
|
9
|
+
* @param decimalSeparator kí tự thập phân
|
|
10
|
+
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
11
|
+
* @param fraction số kí tự thập phân
|
|
12
|
+
* @param isDone đã nhập xong
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
16
|
+
export declare const roundNumber: (num: number, fraction: number) => number;
|
|
17
|
+
export declare const formatDateTime: (data: any, format?: string) => string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Control, UseFormWatch, FieldErrors, UseFormSetValue, UseFormGetValues } from 'react-hook-form';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const useOnClickOutside: (ref: any, handler: any) => void;
|
|
6
|
+
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
7
|
+
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
|
|
8
|
+
declare const isNullOrUndefined: (d: any) => boolean;
|
|
9
|
+
declare const generateUUID: () => string;
|
|
10
|
+
/**
|
|
11
|
+
* format chuỗi kí tự số
|
|
12
|
+
* @param str chuỗi số cần format
|
|
13
|
+
* @param decimalSeparator kí tự thập phân
|
|
14
|
+
* @param thousandSeparator kí tự phân cách hàng nghìn
|
|
15
|
+
* @param fraction số kí tự thập phân
|
|
16
|
+
* @param isDone đã nhập xong
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
|
|
20
|
+
declare const roundNumber: (num: number, fraction: number) => number;
|
|
21
|
+
declare const formatDateTime: (data: any, format?: string) => string;
|
|
22
|
+
|
|
23
|
+
interface IFDataStyleSetting {
|
|
24
|
+
color: string;
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
fontFamily: string;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
bold: boolean;
|
|
29
|
+
italic: boolean;
|
|
30
|
+
underline: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface IFDataInputStyle {
|
|
33
|
+
value: IFDataStyleSetting;
|
|
34
|
+
onChange: any;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
disabledColor?: boolean;
|
|
37
|
+
disabledBackgroundColor?: boolean;
|
|
38
|
+
disabledFontFamily?: boolean;
|
|
39
|
+
disabledFontSize?: boolean;
|
|
40
|
+
disabledBold?: boolean;
|
|
41
|
+
disabledItalic?: boolean;
|
|
42
|
+
disabledUnderline?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
46
|
+
type IFDataProps = {
|
|
47
|
+
openModal: boolean;
|
|
48
|
+
typeModal: string;
|
|
49
|
+
handleModal: any;
|
|
50
|
+
windowSize: any;
|
|
51
|
+
dataItem: any;
|
|
52
|
+
columns: any;
|
|
53
|
+
setCheckDetailExport?: any;
|
|
54
|
+
columnGroups?: any[];
|
|
55
|
+
};
|
|
56
|
+
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps) => react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
interface IFDataExcel {
|
|
59
|
+
step: number;
|
|
60
|
+
file?: any;
|
|
61
|
+
sheetId?: string;
|
|
62
|
+
headerRow?: number;
|
|
63
|
+
dataMap: IFDataMapExcel[];
|
|
64
|
+
}
|
|
65
|
+
interface IFDataMapExcel {
|
|
66
|
+
field: string;
|
|
67
|
+
headerDefault: string[];
|
|
68
|
+
header: string;
|
|
69
|
+
dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
|
|
70
|
+
column?: string;
|
|
71
|
+
disableEdit?: boolean;
|
|
72
|
+
isRequired?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type IFNumberFormat = {
|
|
76
|
+
dateFormat?: string;
|
|
77
|
+
decimalSeparator?: string;
|
|
78
|
+
thousandSeparator?: string;
|
|
79
|
+
colorNegative?: string;
|
|
80
|
+
prefixNegative?: string;
|
|
81
|
+
suffixNegative?: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
interface IFPropsDetail {
|
|
85
|
+
control: Control<IFDataExcel>;
|
|
86
|
+
watch: UseFormWatch<IFDataExcel>;
|
|
87
|
+
errors: FieldErrors<IFDataExcel>;
|
|
88
|
+
setValue: UseFormSetValue<IFDataExcel>;
|
|
89
|
+
getValues: UseFormGetValues<IFDataExcel>;
|
|
90
|
+
formatNumber?: IFNumberFormat;
|
|
91
|
+
pageOptions: number[];
|
|
92
|
+
pageSizeDefault: number;
|
|
93
|
+
windowSize: any;
|
|
94
|
+
getExcelTemplate?: any;
|
|
95
|
+
optionField: any[];
|
|
96
|
+
dataInvalid: any[];
|
|
97
|
+
dataValid: any[];
|
|
98
|
+
dataValidate: any[];
|
|
99
|
+
dataError: any[];
|
|
100
|
+
headerValidateExcelColumns: any[];
|
|
101
|
+
headerHandleErrorExcelColumns: any[];
|
|
102
|
+
setStepper: Dispatch<any>;
|
|
103
|
+
}
|
|
104
|
+
declare const ImportExcelComponent: (props: IFPropsDetail) => react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
export { ExportExcelComponent, type IFPropsDetail, ImportExcelComponent, InputStyleComponent, checkDecimalSeparator, checkThousandSeparator, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, roundNumber, useOnClickOutside };
|