aquasis-fe-components 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 +30 -0
- package/dist/aquasis-fe-components.js +57456 -0
- package/dist/aquasis-fe-components.umd.cjs +1221 -0
- package/dist/components/FormField/Props.d.ts +60 -0
- package/dist/components/FormField/index.d.ts +15 -0
- package/dist/components/ThemeProvider/index.d.ts +6 -0
- package/dist/enums/app.d.ts +22 -0
- package/dist/enums/helpdesk.d.ts +7 -0
- package/dist/helpers/formFields.d.ts +6 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/hooks/index.d.ts +19 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/locales/br.json.d.ts +37 -0
- package/dist/i18n/locales/en.json.d.ts +37 -0
- package/dist/i18n/locales/es.json.d.ts +37 -0
- package/dist/i18n/locales/jp.json.d.ts +816 -0
- package/dist/i18n/locales/pt.json.d.ts +37 -0
- package/dist/i18n/locales/ro.json.d.ts +37 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/lib/Helpdesk/HelpdeskConnector.d.ts +7 -0
- package/dist/lib/Helpdesk/HelpdeskContent/index.d.ts +5 -0
- package/dist/lib/Helpdesk/index.d.ts +6 -0
- package/dist/services/HelpdeskServices.d.ts +2 -0
- package/dist/services/HttpClient.d.ts +3 -0
- package/dist/store/index.d.ts +5 -0
- package/dist/store/reducers/index.d.ts +2 -0
- package/dist/store/selectors/index.d.ts +0 -0
- package/dist/store/storage.d.ts +5 -0
- package/dist/themes/dark.data.d.ts +20 -0
- package/dist/themes/index.d.ts +5 -0
- package/dist/themes/light.data.d.ts +20 -0
- package/dist/types/app.d.ts +10 -0
- package/dist/types/helpdesk.d.ts +43 -0
- package/dist/utils/app.d.ts +0 -0
- package/package.json +112 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ColorPickerProps, DatePickerProps, InputNumberProps, InputProps, RadioGroupProps, SegmentedProps, SelectProps, SwitchProps, TransferProps, TreeSelectProps } from "antd";
|
|
2
|
+
import { RangePickerProps } from "antd/es/date-picker";
|
|
3
|
+
import { Rule } from "antd/es/form";
|
|
4
|
+
import { LabelTooltipType } from "antd/es/form/FormItemLabel";
|
|
5
|
+
import { TextAreaProps } from "antd/es/input";
|
|
6
|
+
import { ColumnsType } from "antd/es/table";
|
|
7
|
+
import { TransferItem } from "antd/es/transfer";
|
|
8
|
+
import { CheckboxProps } from "antd/lib/checkbox";
|
|
9
|
+
import { CSSProperties } from "react";
|
|
10
|
+
interface FormFieldProps {
|
|
11
|
+
fieldName: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
rules?: Rule[];
|
|
14
|
+
className?: string;
|
|
15
|
+
formItemStyles?: CSSProperties;
|
|
16
|
+
tooltip?: LabelTooltipType;
|
|
17
|
+
block?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface MultiTableItem {
|
|
20
|
+
key: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
[name: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export interface FormFieldSelectProps extends FormFieldProps, SelectProps {
|
|
25
|
+
hidden?: boolean;
|
|
26
|
+
sort?: boolean;
|
|
27
|
+
labelIsNumber?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export type FormFieldDatePickerProps = FormFieldProps & DatePickerProps;
|
|
30
|
+
export type FormFieldRangePickerProps = FormFieldProps & RangePickerProps;
|
|
31
|
+
export interface FormFieldInputProps extends FormFieldProps, InputProps {
|
|
32
|
+
isPassword?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface FormFieldCheckboxProps extends FormFieldProps, CheckboxProps {
|
|
35
|
+
}
|
|
36
|
+
export interface FormFieldRadioProps extends FormFieldProps, RadioGroupProps {
|
|
37
|
+
}
|
|
38
|
+
export interface FormFieldInputNumberProps extends FormFieldProps, InputNumberProps {
|
|
39
|
+
}
|
|
40
|
+
export interface FormFieldSegmentedProps extends FormFieldProps, SegmentedProps {
|
|
41
|
+
ref?: any;
|
|
42
|
+
}
|
|
43
|
+
export interface FormFieldTextAreaProps extends FormFieldProps, TextAreaProps {
|
|
44
|
+
}
|
|
45
|
+
export interface FormFieldSwitchProps extends FormFieldProps, SwitchProps {
|
|
46
|
+
}
|
|
47
|
+
export interface FormFieldTransferProps extends FormFieldProps, TransferProps<TransferItem> {
|
|
48
|
+
height?: number | string;
|
|
49
|
+
}
|
|
50
|
+
export interface FormFieldMultiTableProps extends FormFieldProps, TransferProps<MultiTableItem> {
|
|
51
|
+
height?: number | string;
|
|
52
|
+
columns: ColumnsType<MultiTableItem>;
|
|
53
|
+
rowKeyFilter: string[];
|
|
54
|
+
showIOswitch?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface FormFieldTreeSelectProps extends FormFieldProps, TreeSelectProps {
|
|
57
|
+
}
|
|
58
|
+
export interface FormFieldColorPickerProps extends FormFieldProps, ColorPickerProps {
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormFieldCheckboxProps, FormFieldColorPickerProps, FormFieldDatePickerProps, FormFieldInputNumberProps, FormFieldInputProps, FormFieldRadioProps, FormFieldRangePickerProps, FormFieldSegmentedProps, FormFieldSelectProps, FormFieldSwitchProps, FormFieldTextAreaProps, FormFieldTransferProps, FormFieldTreeSelectProps } from "./Props";
|
|
2
|
+
declare const FormFieldSelect: ({ fieldName, label, rules, formItemStyles, className, tooltip, showSearch, options, sort, block, hidden, labelIsNumber, ...props }: FormFieldSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const FormFieldDatePicker: ({ fieldName, label, rules, className, formItemStyles, tooltip, block, ...props }: FormFieldDatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const FormFieldRangePicker: ({ fieldName, label, rules, className, formItemStyles, tooltip, block, ...props }: FormFieldRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const FormFieldColorPicker: ({ fieldName, label, rules, className, formItemStyles, tooltip, ...props }: FormFieldColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const FormFieldInput: ({ fieldName, label, rules, className, formItemStyles, isPassword, tooltip, block, hidden, ...props }: FormFieldInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const FormFieldCheckbox: ({ fieldName, label, rules, className, formItemStyles, tooltip, ...props }: FormFieldCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const FormFieldRadio: ({ fieldName, label, rules, className, formItemStyles, tooltip, block, ...props }: FormFieldRadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const FormFieldInputNumber: ({ fieldName, label, rules, className, formItemStyles, tooltip, block, hidden, ...props }: FormFieldInputNumberProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const FormFieldSegmented: ({ fieldName, label, rules, className, formItemStyles, tooltip, ...props }: FormFieldSegmentedProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const FormFieldTextArea: ({ fieldName, label, rules, className, formItemStyles, tooltip, block, ...props }: FormFieldTextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const FormFieldSwitch: ({ fieldName, label, rules, className, formItemStyles, tooltip, ...props }: FormFieldSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const FormFieldTransfer: ({ fieldName, label, rules, className, formItemStyles, tooltip, height, showSearch, ...props }: FormFieldTransferProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const FormFieldTreeSelect: ({ fieldName, label, rules, className, formItemStyles, tooltip, showSearch, block, ...props }: FormFieldTreeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { FormFieldCheckbox, FormFieldColorPicker, FormFieldDatePicker, FormFieldInput, FormFieldInputNumber, FormFieldRadio, FormFieldRangePicker, FormFieldSegmented, FormFieldSelect, FormFieldSwitch, FormFieldTextArea, FormFieldTransfer, FormFieldTreeSelect, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a common enums
|
|
3
|
+
*/
|
|
4
|
+
export declare enum LocalStorageKey {
|
|
5
|
+
UserID = "userId",
|
|
6
|
+
AuthToken = "authenticationToken",
|
|
7
|
+
Tenants = "userTenants",
|
|
8
|
+
Theme = "theme",
|
|
9
|
+
Language = "AppLanguage",
|
|
10
|
+
TenantID = "AppTenant",
|
|
11
|
+
ZoneID = "ZoneID",
|
|
12
|
+
UserPictureUrl = "userPictureUrl",
|
|
13
|
+
UserRole = "userRole",
|
|
14
|
+
UserRoleId = "userRoleId",
|
|
15
|
+
AppId = "appId",
|
|
16
|
+
User = "user",
|
|
17
|
+
AppName = "appName"
|
|
18
|
+
}
|
|
19
|
+
export declare enum Themes {
|
|
20
|
+
Dark = "dark",
|
|
21
|
+
Light = "light"
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DefaultOptionType } from "antd/es/select";
|
|
2
|
+
import { SwitchSize } from "antd/es/switch";
|
|
3
|
+
export declare const sortOptions: (options?: DefaultOptionType[], order?: "desc" | "asc") => DefaultOptionType[];
|
|
4
|
+
export declare const sortOptionsForNumber: (options?: DefaultOptionType[], order?: "desc" | "asc") => DefaultOptionType[];
|
|
5
|
+
export declare const onFilterOptions: (value: any, option: any) => any;
|
|
6
|
+
export declare const getFontSize: (size?: SwitchSize) => 14 | 26;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FlagType } from '../types/app';
|
|
2
|
+
export declare const getInitLanguage: () => FlagType;
|
|
3
|
+
export declare function getCookie<T>(key: string): T;
|
|
4
|
+
export declare const setCookie: (key: string, value: any) => void;
|
|
5
|
+
export declare const removeCookie: (key: string) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppDispatch, RootState } from '../store';
|
|
2
|
+
import { FlagType } from '../types/app';
|
|
3
|
+
import { TypedUseSelectorHook } from "react-redux";
|
|
4
|
+
type DispatchFunc = () => AppDispatch;
|
|
5
|
+
export declare const useAppDispatch: DispatchFunc;
|
|
6
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
7
|
+
export declare const useGetLanguage: () => FlagType;
|
|
8
|
+
export declare const useDevice: () => {
|
|
9
|
+
isMobile: boolean;
|
|
10
|
+
isTablet: boolean;
|
|
11
|
+
isDesktop: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const useGetRequiredRules: () => {
|
|
14
|
+
requiredField: {
|
|
15
|
+
required: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"translation": {
|
|
3
|
+
"HELPDESK": {
|
|
4
|
+
"ERRORS_CODE": {
|
|
5
|
+
"DATATYPE_MISMATCH": "Deve conter apenas elementos do tipo de formato de arquivo válido.",
|
|
6
|
+
"INVALID_VALUE": "Valor inválido"
|
|
7
|
+
},
|
|
8
|
+
"FORM": {
|
|
9
|
+
"BUTTONS": {
|
|
10
|
+
"SEND": "Enviar"
|
|
11
|
+
},
|
|
12
|
+
"FIELDS": {
|
|
13
|
+
"ATTACHMENTS": "Anexos",
|
|
14
|
+
"DESCRIPTION": "Descrição",
|
|
15
|
+
"DESCRIPTION_PLACEHOLDER": "Insira a descrição...",
|
|
16
|
+
"EMAIL": "Email",
|
|
17
|
+
"EMAIL_PLACEHOLDER": "Insira o seu email...",
|
|
18
|
+
"NAME": "$t(Name)",
|
|
19
|
+
"NAME_PLACEHOLDER": "Insira seu nome...",
|
|
20
|
+
"SUBJECT": "Assunto",
|
|
21
|
+
"SUBJECT_PLACEHOLDER": "Insira o assunto...",
|
|
22
|
+
"TITLE": "Contate-nos",
|
|
23
|
+
"UPLOAD_FILES": "<strong>Subir arquivo(s) (max. 5)</strong><br/><small>Clique para adicionar ou arraste e solte o(s) arquivo(s).</small>"
|
|
24
|
+
},
|
|
25
|
+
"TITLE": "Bem-vindo ao apoio"
|
|
26
|
+
},
|
|
27
|
+
"SUPPORT": "Apoio",
|
|
28
|
+
"TABLE": {
|
|
29
|
+
"CODE": "Mensagem",
|
|
30
|
+
"FIELD": "Campo"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"translation": {
|
|
3
|
+
"HELPDESK": {
|
|
4
|
+
"ERRORS_CODE": {
|
|
5
|
+
"DATATYPE_MISMATCH": "It should contain elements of type valid file format only",
|
|
6
|
+
"INVALID_VALUE": "Invalid value"
|
|
7
|
+
},
|
|
8
|
+
"FORM": {
|
|
9
|
+
"BUTTONS": {
|
|
10
|
+
"SEND": "Send"
|
|
11
|
+
},
|
|
12
|
+
"FIELDS": {
|
|
13
|
+
"ATTACHMENTS": "Attachments",
|
|
14
|
+
"DESCRIPTION": "Description",
|
|
15
|
+
"DESCRIPTION_PLACEHOLDER": "Insert description…",
|
|
16
|
+
"EMAIL": "Email",
|
|
17
|
+
"EMAIL_PLACEHOLDER": "Insert your email...",
|
|
18
|
+
"NAME": "$t(Name)",
|
|
19
|
+
"NAME_PLACEHOLDER": "Insert your name...",
|
|
20
|
+
"SUBJECT": "Subject",
|
|
21
|
+
"SUBJECT_PLACEHOLDER": "Insert subject...",
|
|
22
|
+
"TITLE": "Contact us",
|
|
23
|
+
"UPLOAD_FILES": "<strong>Upload files (max. 5)</strong><br/><small>Click to add or drag and drop files.</small>"
|
|
24
|
+
},
|
|
25
|
+
"TITLE": "Welcome to support"
|
|
26
|
+
},
|
|
27
|
+
"SUPPORT": "Support",
|
|
28
|
+
"TABLE": {
|
|
29
|
+
"CODE": "Message",
|
|
30
|
+
"FIELD": "Field"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"translation": {
|
|
3
|
+
"HELPDESK": {
|
|
4
|
+
"ERRORS_CODE": {
|
|
5
|
+
"DATATYPE_MISMATCH": "Debe contener elementos de tipo formato de archivo válido únicamente.",
|
|
6
|
+
"INVALID_VALUE": "Valor no válido"
|
|
7
|
+
},
|
|
8
|
+
"FORM": {
|
|
9
|
+
"BUTTONS": {
|
|
10
|
+
"SEND": "Enviar"
|
|
11
|
+
},
|
|
12
|
+
"FIELDS": {
|
|
13
|
+
"ATTACHMENTS": "Archivos adjuntos",
|
|
14
|
+
"DESCRIPTION": "Descripción",
|
|
15
|
+
"DESCRIPTION_PLACEHOLDER": "Insertar descripción...",
|
|
16
|
+
"EMAIL": "Correo",
|
|
17
|
+
"EMAIL_PLACEHOLDER": "Introduzca su correo electrónico...",
|
|
18
|
+
"NAME": "$t(Name)",
|
|
19
|
+
"NAME_PLACEHOLDER": "Introduzca su nombre...",
|
|
20
|
+
"SUBJECT": "Asunto",
|
|
21
|
+
"SUBJECT_PLACEHOLDER": "Insertar asunto...",
|
|
22
|
+
"TITLE": "Contacta con nosotros",
|
|
23
|
+
"UPLOAD_FILES": "<strong>Subir archivos (máx. 5)</strong><br/><small>Haga clic para agregar o arrastrar y soltar archivos.</small>"
|
|
24
|
+
},
|
|
25
|
+
"TITLE": "Bienvenido a apoyo"
|
|
26
|
+
},
|
|
27
|
+
"SUPPORT": "Apoyo",
|
|
28
|
+
"TABLE": {
|
|
29
|
+
"CODE": "Mensaje",
|
|
30
|
+
"FIELD": "Campo"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
|
|
37
|
+
export default _default;
|