enwawa-ui 2.5.2 → 2.7.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/lib/index.d.ts +494 -441
- package/lib/index.d.ts.map +1 -1
- package/lib/index.es.js +203 -90
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +202 -89
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode, ChangeEvent, JSXElementConstructor, ReactElement } from "react";
|
|
2
2
|
import { ButtonShape, ButtonSize, ButtonType } from "antd/es/button";
|
|
3
|
-
import { ButtonProps, AutoCompleteProps, DescriptionsProps, SwitchProps } from "antd/lib";
|
|
4
|
-
import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, AlertProps, ColProps, BreadcrumbProps, InputNumberProps, DropdownProps, MenuProps, SelectProps, PaginationProps, RadioChangeEvent, TooltipProps, UploadProps, RowProps, CollapseProps, LayoutProps, SiderProps, SpaceProps, FormProps, ModalFuncProps, FormInstance, TableProps,
|
|
3
|
+
import { ButtonProps, AutoCompleteProps, DescriptionsProps, BreadcrumbProps as _BreadcrumbProps1, SwitchProps } from "antd/lib";
|
|
4
|
+
import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, AlertProps, ColProps, BreadcrumbProps, InputNumberProps, DropdownProps, MenuProps, SelectProps, PaginationProps, RadioChangeEvent, TooltipProps, UploadProps, RowProps, CollapseProps, LayoutProps, SiderProps, SpaceProps, StepsProps, FormProps, ModalFuncProps, FormInstance, TableProps, ModalProps as _ModalProps1, SpinProps, TagProps } from "antd";
|
|
5
5
|
import { Dayjs } from "dayjs";
|
|
6
6
|
import { RangePickerProps } from "antd/lib/date-picker";
|
|
7
7
|
import { IconComponentProps } from "@ant-design/icons/lib/components/Icon";
|
|
@@ -19,10 +19,10 @@ import { ValueType } from "@rc-component/mini-decimal";
|
|
|
19
19
|
import { Gutter } from "antd/es/grid/row";
|
|
20
20
|
import { BlockProps, EllipsisConfig, BaseType } from "antd/es/typography/Base";
|
|
21
21
|
import { TextProps as _TextProps1 } from "antd/es/typography/Text";
|
|
22
|
+
import { AnyObject } from "antd/es/_util/type";
|
|
22
23
|
import { DrawerProps } from "antd/es/drawer";
|
|
23
24
|
import { GoogleMapProps, GoogleMap } from "@react-google-maps/api";
|
|
24
25
|
import { WatchOptions } from "rc-field-form/es/interface";
|
|
25
|
-
import { AnyObject } from "antd/es/_util/type";
|
|
26
26
|
import { ColumnsType, TablePaginationConfig } from "antd/es/table";
|
|
27
27
|
import { ExpandableConfig, FilterValue, SorterResult, TableCurrentDataSource, TableRowSelection } from "antd/es/table/interface";
|
|
28
28
|
import { CheckboxChangeEvent } from "antd/es/checkbox";
|
|
@@ -148,6 +148,10 @@ export interface AtButtonProps {
|
|
|
148
148
|
* Set the button icon
|
|
149
149
|
*/
|
|
150
150
|
icon?: ButtonProps['icon'];
|
|
151
|
+
/**
|
|
152
|
+
* Set background button transparent
|
|
153
|
+
*/
|
|
154
|
+
bgTransparent?: boolean;
|
|
151
155
|
}
|
|
152
156
|
export const AtButton: React.FC<AtButtonProps>;
|
|
153
157
|
export interface AtCheckboxProps extends CheckboxProps {
|
|
@@ -2860,231 +2864,562 @@ export interface OrDescriptionsProps extends DescriptionsProps {
|
|
|
2860
2864
|
extra?: DescriptionsProps['extra'];
|
|
2861
2865
|
}
|
|
2862
2866
|
export const OrDescriptions: React.FC<OrDescriptionsProps>;
|
|
2863
|
-
interface
|
|
2867
|
+
export interface OrStepProp {
|
|
2864
2868
|
/**
|
|
2865
|
-
*
|
|
2869
|
+
* To set the current step, counting from 0. You can overwrite this state by using status of Step
|
|
2866
2870
|
*/
|
|
2867
|
-
|
|
2871
|
+
current?: number;
|
|
2868
2872
|
/**
|
|
2869
|
-
*
|
|
2873
|
+
* To specify the direction of the step bar, horizontal or vertical
|
|
2870
2874
|
*/
|
|
2871
|
-
|
|
2872
|
-
}
|
|
2873
|
-
export interface OrDownloadUploadProps {
|
|
2875
|
+
direction?: 'horizontal' | 'vertical';
|
|
2874
2876
|
/**
|
|
2875
|
-
*
|
|
2877
|
+
*
|
|
2876
2878
|
*/
|
|
2877
|
-
|
|
2879
|
+
initial?: number;
|
|
2878
2880
|
/**
|
|
2879
|
-
*
|
|
2881
|
+
* Place title and description with horizontal or vertical direction
|
|
2882
|
+
* */
|
|
2883
|
+
labelPlacement?: 'horizontal' | 'vertical';
|
|
2884
|
+
/**
|
|
2885
|
+
* Progress circle percentage of current step in process status (only works on basic Steps)
|
|
2880
2886
|
*/
|
|
2881
|
-
|
|
2887
|
+
percent?: number;
|
|
2882
2888
|
/**
|
|
2883
|
-
*
|
|
2889
|
+
* Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
|
|
2884
2890
|
*/
|
|
2885
|
-
|
|
2891
|
+
progressDot?: StepsProps['progressDot'];
|
|
2886
2892
|
/**
|
|
2887
|
-
*
|
|
2893
|
+
* Change to vertical direction when screen width smaller than 532px
|
|
2888
2894
|
*/
|
|
2889
|
-
|
|
2890
|
-
downloadProps: OrDownloadProps;
|
|
2891
|
-
uploadProps: MlUploadProps;
|
|
2892
|
-
disabled?: boolean;
|
|
2895
|
+
responsive?: boolean;
|
|
2893
2896
|
/**
|
|
2894
|
-
*
|
|
2897
|
+
* To specify the size of the step bar, default and small are currently supported
|
|
2895
2898
|
*/
|
|
2896
|
-
|
|
2897
|
-
}
|
|
2898
|
-
export const OrDownloadUpload: React.FC<OrDownloadUploadProps>;
|
|
2899
|
-
export interface OrDrawerProps {
|
|
2899
|
+
size?: 'default' | 'small';
|
|
2900
2900
|
/**
|
|
2901
|
-
*
|
|
2901
|
+
* To specify the status of current step, can be set to one of the following values: wait process finish error
|
|
2902
2902
|
*/
|
|
2903
|
-
|
|
2903
|
+
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
2904
2904
|
/**
|
|
2905
|
-
*
|
|
2905
|
+
* Type of steps, can be set to one of the following values: default navigation inline
|
|
2906
2906
|
*/
|
|
2907
|
-
|
|
2907
|
+
type?: 'default' | 'navigation' | 'inline';
|
|
2908
2908
|
/**
|
|
2909
|
-
*
|
|
2909
|
+
* Trigger when Step is changed
|
|
2910
2910
|
*/
|
|
2911
|
-
|
|
2911
|
+
onChange?: (current: number) => void;
|
|
2912
2912
|
/**
|
|
2913
|
-
*
|
|
2913
|
+
* StepItem content
|
|
2914
2914
|
*/
|
|
2915
|
-
|
|
2915
|
+
items?: StepsProps['items'];
|
|
2916
2916
|
/**
|
|
2917
|
-
*
|
|
2917
|
+
* Element margin
|
|
2918
2918
|
*/
|
|
2919
|
-
|
|
2919
|
+
$margin?: string;
|
|
2920
2920
|
/**
|
|
2921
|
-
*
|
|
2921
|
+
* Element line height
|
|
2922
2922
|
*/
|
|
2923
|
-
|
|
2923
|
+
$lineHeight?: string;
|
|
2924
|
+
}
|
|
2925
|
+
export const OrStep: React.FC<OrStepProp>;
|
|
2926
|
+
export interface IFormStep<T> {
|
|
2927
|
+
title: string;
|
|
2928
|
+
inputs?: OrFormItemsInlineProps['inputs'];
|
|
2929
|
+
submitButtonText?: string;
|
|
2930
|
+
image?: string;
|
|
2931
|
+
cancelButtonText?: string;
|
|
2932
|
+
onCancelClick?: () => void;
|
|
2933
|
+
formInitialItems?: T;
|
|
2934
|
+
form?: OrFormProps['form'];
|
|
2935
|
+
onFinish?: (e: any) => void;
|
|
2936
|
+
cancelBtnIcon?: ReactNode;
|
|
2937
|
+
isSubmitButtonDanger?: boolean;
|
|
2938
|
+
hiddeSubmitButton?: boolean;
|
|
2939
|
+
customButtons?: {
|
|
2940
|
+
label: string;
|
|
2941
|
+
onClick: () => void;
|
|
2942
|
+
type: AtButtonProps['type'];
|
|
2943
|
+
htmlType?: AtButtonProps['htmlType'];
|
|
2944
|
+
}[];
|
|
2945
|
+
}
|
|
2946
|
+
export interface TmCrudPageProps<RecordType = AnyObject, FormType = any> {
|
|
2924
2947
|
/**
|
|
2925
|
-
*
|
|
2948
|
+
* Columns of table
|
|
2926
2949
|
*/
|
|
2927
|
-
|
|
2950
|
+
columns: OrTableProps<RecordType>['columns'];
|
|
2928
2951
|
/**
|
|
2929
|
-
*
|
|
2952
|
+
* Data record array to be displayed
|
|
2930
2953
|
*/
|
|
2931
|
-
|
|
2954
|
+
data: OrTableProps<RecordType>['dataSource'];
|
|
2932
2955
|
/**
|
|
2933
|
-
*
|
|
2956
|
+
* Loading status of table
|
|
2934
2957
|
*/
|
|
2935
|
-
|
|
2958
|
+
loadingTable?: OrTableProps['loading'];
|
|
2936
2959
|
/**
|
|
2937
|
-
*
|
|
2960
|
+
* Config of pagination. You can ref table pagination config or full pagination document, hide it by setting it to false
|
|
2938
2961
|
*/
|
|
2939
|
-
|
|
2962
|
+
pagination?: OrTableProps['pagination'];
|
|
2940
2963
|
/**
|
|
2941
|
-
*
|
|
2964
|
+
* Row's unique key, could be a string or function that returns a string
|
|
2942
2965
|
*/
|
|
2943
|
-
|
|
2966
|
+
rowKey?: OrTableProps['rowKey'];
|
|
2944
2967
|
/**
|
|
2945
|
-
*
|
|
2968
|
+
* On change form content
|
|
2946
2969
|
*/
|
|
2947
|
-
|
|
2970
|
+
onValuesChange?: OrFormProps['onValuesChange'];
|
|
2948
2971
|
/**
|
|
2949
|
-
*
|
|
2972
|
+
* Callback when pagination changes
|
|
2950
2973
|
*/
|
|
2951
|
-
|
|
2974
|
+
onChangeTable?: OrTableProps['onChange'];
|
|
2952
2975
|
/**
|
|
2953
|
-
*
|
|
2976
|
+
* Extendable table TM CrudPage
|
|
2954
2977
|
*/
|
|
2955
|
-
|
|
2978
|
+
expandable?: OrTableProps['expandable'];
|
|
2956
2979
|
/**
|
|
2957
|
-
*
|
|
2980
|
+
* On press cancel and close button function
|
|
2958
2981
|
*/
|
|
2959
|
-
|
|
2982
|
+
handleCloseCallback?: () => void;
|
|
2960
2983
|
/**
|
|
2961
|
-
*
|
|
2984
|
+
* State of the drawer
|
|
2962
2985
|
*/
|
|
2963
|
-
|
|
2986
|
+
open?: boolean;
|
|
2964
2987
|
/**
|
|
2965
|
-
*
|
|
2988
|
+
* Page title
|
|
2966
2989
|
*/
|
|
2967
|
-
|
|
2990
|
+
title?: string;
|
|
2968
2991
|
/**
|
|
2969
|
-
*
|
|
2992
|
+
* Page subtitle
|
|
2970
2993
|
*/
|
|
2971
|
-
|
|
2994
|
+
subtitle?: string;
|
|
2972
2995
|
/**
|
|
2973
|
-
*
|
|
2996
|
+
* Page subtitle content
|
|
2974
2997
|
*/
|
|
2975
|
-
|
|
2998
|
+
subContent?: string;
|
|
2976
2999
|
/**
|
|
2977
|
-
*
|
|
3000
|
+
* Page table title
|
|
2978
3001
|
*/
|
|
2979
|
-
|
|
3002
|
+
tableTitle?: string;
|
|
2980
3003
|
/**
|
|
2981
|
-
*
|
|
3004
|
+
* Button value text
|
|
2982
3005
|
*/
|
|
2983
|
-
|
|
2984
|
-
distance: string | number;
|
|
2985
|
-
};
|
|
3006
|
+
buttonAddText?: string;
|
|
2986
3007
|
/**
|
|
2987
|
-
*
|
|
3008
|
+
* Callback when add button is pressed
|
|
2988
3009
|
*/
|
|
2989
|
-
|
|
3010
|
+
addButtonOnClick?: OrModuleTableHeaderProps['buttonOnClick'];
|
|
2990
3011
|
/**
|
|
2991
|
-
*
|
|
3012
|
+
* Callback when pagination changes
|
|
2992
3013
|
*/
|
|
2993
|
-
|
|
3014
|
+
onChangePagination?: MlPaginationProps['onChange'];
|
|
2994
3015
|
/**
|
|
2995
|
-
*
|
|
3016
|
+
* Total table elements
|
|
2996
3017
|
*/
|
|
2997
|
-
|
|
3018
|
+
total?: MlPaginationProps['total'];
|
|
2998
3019
|
/**
|
|
2999
|
-
*
|
|
3020
|
+
* Way to display total pagination table
|
|
3000
3021
|
*/
|
|
3001
|
-
|
|
3022
|
+
showTotal?: MlPaginationProps['showTotal'];
|
|
3002
3023
|
/**
|
|
3003
|
-
*
|
|
3024
|
+
* Table page size
|
|
3004
3025
|
*/
|
|
3005
|
-
|
|
3026
|
+
pageSize?: MlPaginationProps['pageSize'];
|
|
3006
3027
|
/**
|
|
3007
|
-
*
|
|
3028
|
+
* Current page table
|
|
3008
3029
|
*/
|
|
3009
|
-
|
|
3030
|
+
currentPage?: number;
|
|
3010
3031
|
/**
|
|
3011
|
-
*
|
|
3032
|
+
* Disable buttons drawer
|
|
3012
3033
|
*/
|
|
3013
|
-
|
|
3034
|
+
disabledButtons?: boolean;
|
|
3014
3035
|
/**
|
|
3015
|
-
*
|
|
3036
|
+
* Form Steps info
|
|
3016
3037
|
*/
|
|
3017
|
-
|
|
3038
|
+
formSteps?: IFormStep<FormType>[];
|
|
3018
3039
|
/**
|
|
3019
|
-
*
|
|
3040
|
+
* current step
|
|
3020
3041
|
*/
|
|
3021
|
-
|
|
3042
|
+
currentFormStep?: number;
|
|
3022
3043
|
/**
|
|
3023
|
-
*
|
|
3044
|
+
* Search table elements
|
|
3024
3045
|
*/
|
|
3025
|
-
|
|
3026
|
-
}
|
|
3027
|
-
export const OrDrawer: React.FC<OrDrawerProps>;
|
|
3028
|
-
export interface OrEmptyProps {
|
|
3046
|
+
searchBoxOnSearch?: OrModuleTableHeaderProps['searchBoxOnSearch'];
|
|
3029
3047
|
/**
|
|
3030
|
-
*
|
|
3048
|
+
* title of drawer
|
|
3031
3049
|
*/
|
|
3032
|
-
|
|
3050
|
+
titleLeftDrawer?: ReactNode;
|
|
3033
3051
|
/**
|
|
3034
|
-
*
|
|
3052
|
+
* Specify a callback that will be called when a user clicks mask, close button or Cancel button
|
|
3035
3053
|
*/
|
|
3036
|
-
|
|
3037
|
-
}
|
|
3038
|
-
export const OrEmpty: React.FC<OrEmptyProps>;
|
|
3039
|
-
export interface OrFlagGridProps {
|
|
3054
|
+
onCloseLeftDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
3040
3055
|
/**
|
|
3041
|
-
*
|
|
3056
|
+
* whether left drawer is open or close
|
|
3042
3057
|
*/
|
|
3043
|
-
|
|
3058
|
+
openLeftDrawer?: boolean;
|
|
3044
3059
|
/**
|
|
3045
|
-
*
|
|
3060
|
+
* Children for Left Drawer
|
|
3046
3061
|
*/
|
|
3047
|
-
|
|
3062
|
+
leftDrawerContent?: React.ReactNode;
|
|
3048
3063
|
/**
|
|
3049
|
-
*
|
|
3064
|
+
* Custom component to render at left side of table header
|
|
3050
3065
|
*/
|
|
3051
|
-
|
|
3066
|
+
tableHeaderCustomLeftElements?: React.ReactNode;
|
|
3052
3067
|
/**
|
|
3053
|
-
*
|
|
3068
|
+
* Drawer Width
|
|
3054
3069
|
*/
|
|
3055
|
-
|
|
3070
|
+
leftDrawerWidth?: number;
|
|
3056
3071
|
/**
|
|
3057
|
-
*
|
|
3072
|
+
* searchBox placeHolder
|
|
3058
3073
|
*/
|
|
3059
|
-
|
|
3060
|
-
}
|
|
3061
|
-
export const OrFlagGrid: React.FC<OrFlagGridProps>;
|
|
3062
|
-
export interface OrFormProps extends FormProps {
|
|
3063
|
-
children: React.ReactNode;
|
|
3064
|
-
}
|
|
3065
|
-
export const OrForm: React.FC<OrFormProps>;
|
|
3066
|
-
export interface AtSpaceCompactProps {
|
|
3074
|
+
searchBoxPlaceholder?: string;
|
|
3067
3075
|
/**
|
|
3068
|
-
*
|
|
3076
|
+
* show search box
|
|
3069
3077
|
*/
|
|
3070
|
-
|
|
3078
|
+
showSearchBox?: boolean;
|
|
3071
3079
|
/**
|
|
3072
|
-
*
|
|
3080
|
+
* Drawer Content
|
|
3073
3081
|
*/
|
|
3074
|
-
|
|
3082
|
+
drawerContent?: React.ReactNode;
|
|
3075
3083
|
/**
|
|
3076
|
-
*
|
|
3084
|
+
* Drawer Title
|
|
3077
3085
|
*/
|
|
3078
|
-
|
|
3086
|
+
drawerTitle?: React.ReactNode;
|
|
3079
3087
|
/**
|
|
3080
|
-
*
|
|
3088
|
+
* Drawer Width
|
|
3081
3089
|
*/
|
|
3082
|
-
|
|
3090
|
+
drawerWidth?: number;
|
|
3083
3091
|
/**
|
|
3084
|
-
*
|
|
3092
|
+
* Text of first button
|
|
3085
3093
|
*/
|
|
3086
|
-
|
|
3087
|
-
|
|
3094
|
+
firstButtonText?: string;
|
|
3095
|
+
/**
|
|
3096
|
+
* Text of second button
|
|
3097
|
+
*/
|
|
3098
|
+
secondButtonText?: string;
|
|
3099
|
+
/**
|
|
3100
|
+
* Function to execute when first button is clicked
|
|
3101
|
+
*/
|
|
3102
|
+
onClickFirstButton?: () => void;
|
|
3103
|
+
/**
|
|
3104
|
+
* Function to execute when second button is clicked
|
|
3105
|
+
*/
|
|
3106
|
+
onClickSecondButton?: () => void;
|
|
3107
|
+
/**
|
|
3108
|
+
* Show drawer content
|
|
3109
|
+
*/
|
|
3110
|
+
showDrawerContent?: boolean;
|
|
3111
|
+
/**
|
|
3112
|
+
* margin
|
|
3113
|
+
*/
|
|
3114
|
+
$margin?: string;
|
|
3115
|
+
/**
|
|
3116
|
+
* table title level
|
|
3117
|
+
*/
|
|
3118
|
+
tableTitleLevel?: 1 | 2 | 3 | 4 | 5;
|
|
3119
|
+
/**
|
|
3120
|
+
* button optional text
|
|
3121
|
+
*/
|
|
3122
|
+
secondaryButtonText?: string;
|
|
3123
|
+
/**
|
|
3124
|
+
* button optional onClick
|
|
3125
|
+
*/
|
|
3126
|
+
secondaryOnClick?: () => void;
|
|
3127
|
+
/**
|
|
3128
|
+
* button optional text
|
|
3129
|
+
*/
|
|
3130
|
+
showFormStepper?: boolean;
|
|
3131
|
+
onBack?: () => void;
|
|
3132
|
+
padding?: string;
|
|
3133
|
+
}
|
|
3134
|
+
export const TmCrudPage: <RecordType extends AnyObject, FormType extends Store>({ columns, data, loadingTable, formSteps, onValuesChange, onCloseLeftDrawer, leftDrawerContent, openLeftDrawer, subtitle, subContent, open, pageSize, currentPage, currentFormStep, titleLeftDrawer, leftDrawerWidth, drawerContent, showDrawerContent, showSearchBox, drawerTitle, drawerWidth, firstButtonText, secondButtonText, onClickFirstButton, onClickSecondButton, $margin, title, tableTitle, buttonAddText, addButtonOnClick, onChangePagination, onChangeTable, total, showTotal, disabledButtons, searchBoxOnSearch, searchBoxPlaceholder, tableHeaderCustomLeftElements, pagination, handleCloseCallback, tableTitleLevel, secondaryButtonText, secondaryOnClick, showFormStepper, onBack, padding, expandable }: TmCrudPageProps<RecordType, FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
3135
|
+
export interface OrDetailsPageProps<FormType = any> {
|
|
3136
|
+
/**
|
|
3137
|
+
* The ID for input
|
|
3138
|
+
*/
|
|
3139
|
+
id?: string;
|
|
3140
|
+
/**
|
|
3141
|
+
* Title of the description set
|
|
3142
|
+
*/
|
|
3143
|
+
title: string;
|
|
3144
|
+
/**
|
|
3145
|
+
* Whether the table has border or not
|
|
3146
|
+
*/
|
|
3147
|
+
bordered?: boolean;
|
|
3148
|
+
/**
|
|
3149
|
+
* Items to display
|
|
3150
|
+
*/
|
|
3151
|
+
items: OrDescriptionsProps['items'];
|
|
3152
|
+
/**
|
|
3153
|
+
* Extra content to display
|
|
3154
|
+
*/
|
|
3155
|
+
extra?: OrDescriptionsProps['extra'];
|
|
3156
|
+
/**
|
|
3157
|
+
* Form Steps info
|
|
3158
|
+
*/
|
|
3159
|
+
formSteps?: IFormStep<FormType>[];
|
|
3160
|
+
/**
|
|
3161
|
+
* On press cancel and close button function
|
|
3162
|
+
*/
|
|
3163
|
+
handleCloseCallback?: () => void;
|
|
3164
|
+
/**
|
|
3165
|
+
* State of the drawer
|
|
3166
|
+
*/
|
|
3167
|
+
open?: boolean;
|
|
3168
|
+
/**
|
|
3169
|
+
* Drawer Content
|
|
3170
|
+
*/
|
|
3171
|
+
drawerContent?: React.ReactNode;
|
|
3172
|
+
/**
|
|
3173
|
+
* Drawer Title
|
|
3174
|
+
*/
|
|
3175
|
+
drawerTitle?: React.ReactNode;
|
|
3176
|
+
/**
|
|
3177
|
+
* Drawer Width
|
|
3178
|
+
*/
|
|
3179
|
+
drawerWidth?: number;
|
|
3180
|
+
/**
|
|
3181
|
+
* Disable buttons drawer
|
|
3182
|
+
*/
|
|
3183
|
+
disabledButtons?: boolean;
|
|
3184
|
+
/**
|
|
3185
|
+
* current step
|
|
3186
|
+
*/
|
|
3187
|
+
currentFormStep?: number;
|
|
3188
|
+
/**
|
|
3189
|
+
* button optional text
|
|
3190
|
+
*/
|
|
3191
|
+
showFormStepper?: boolean;
|
|
3192
|
+
/**
|
|
3193
|
+
* On change form content
|
|
3194
|
+
*/
|
|
3195
|
+
onValuesChange?: OrFormProps['onValuesChange'];
|
|
3196
|
+
}
|
|
3197
|
+
export const OrDetailsPage: <FormType extends Store>({ title, bordered, items, extra, formSteps, handleCloseCallback, open, drawerTitle, drawerWidth, disabledButtons, currentFormStep, showFormStepper, onValuesChange, }: OrDetailsPageProps<FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
3198
|
+
interface OrDownloadProps {
|
|
3199
|
+
/**
|
|
3200
|
+
* The function to call when the download button is clicked
|
|
3201
|
+
*/
|
|
3202
|
+
downloadOnClick?: () => any;
|
|
3203
|
+
/**
|
|
3204
|
+
* The text to display on the download button
|
|
3205
|
+
*/
|
|
3206
|
+
downloadText: string;
|
|
3207
|
+
}
|
|
3208
|
+
export interface OrDownloadUploadProps {
|
|
3209
|
+
/**
|
|
3210
|
+
* Key identifier
|
|
3211
|
+
*/
|
|
3212
|
+
inputKey: string;
|
|
3213
|
+
/**
|
|
3214
|
+
* The function to call when the value of the file changes
|
|
3215
|
+
*/
|
|
3216
|
+
getValueFromEvent?: (e: any) => any;
|
|
3217
|
+
/**
|
|
3218
|
+
* The rules for the file
|
|
3219
|
+
*/
|
|
3220
|
+
rules?: MlFromItemProps['rules'];
|
|
3221
|
+
/**
|
|
3222
|
+
* If the file is required
|
|
3223
|
+
*/
|
|
3224
|
+
isRequired?: boolean;
|
|
3225
|
+
downloadProps: OrDownloadProps;
|
|
3226
|
+
uploadProps: MlUploadProps;
|
|
3227
|
+
disabled?: boolean;
|
|
3228
|
+
/**
|
|
3229
|
+
* The mode of the upload
|
|
3230
|
+
*/
|
|
3231
|
+
mode?: 'drag' | 'basic';
|
|
3232
|
+
}
|
|
3233
|
+
export const OrDownloadUpload: React.FC<OrDownloadUploadProps>;
|
|
3234
|
+
export interface OrDrawerProps {
|
|
3235
|
+
/**
|
|
3236
|
+
* The ID for input
|
|
3237
|
+
*/
|
|
3238
|
+
id?: string;
|
|
3239
|
+
/**
|
|
3240
|
+
* Whether Drawer should get focused after open
|
|
3241
|
+
*/
|
|
3242
|
+
autoFocus?: boolean;
|
|
3243
|
+
/**
|
|
3244
|
+
* Callback after the animation ends when switching drawers
|
|
3245
|
+
*/
|
|
3246
|
+
afterOpenChange?: (open: boolean) => void;
|
|
3247
|
+
/**
|
|
3248
|
+
* Style of the drawer content part
|
|
3249
|
+
*/
|
|
3250
|
+
bodyStyle?: CSSProperties;
|
|
3251
|
+
/**
|
|
3252
|
+
* Config Drawer Panel className. Use rootClassName if want to config top dom style
|
|
3253
|
+
*/
|
|
3254
|
+
className?: string;
|
|
3255
|
+
/**
|
|
3256
|
+
* Custom close icon. 5.7.0: close button will be hidden when setting to null or false
|
|
3257
|
+
*/
|
|
3258
|
+
closeIcon?: boolean | ReactNode;
|
|
3259
|
+
/**
|
|
3260
|
+
* Style of the drawer wrapper of content part
|
|
3261
|
+
*/
|
|
3262
|
+
contentWrapperStyle?: CSSProperties;
|
|
3263
|
+
/**
|
|
3264
|
+
* Whether to unmount child components on closing drawer or not
|
|
3265
|
+
*/
|
|
3266
|
+
destroyOnClose?: boolean;
|
|
3267
|
+
/**
|
|
3268
|
+
* Extra actions area at corner
|
|
3269
|
+
*/
|
|
3270
|
+
extra?: ReactNode;
|
|
3271
|
+
/**
|
|
3272
|
+
* The footer for Drawer
|
|
3273
|
+
*/
|
|
3274
|
+
footer?: ReactNode;
|
|
3275
|
+
/**
|
|
3276
|
+
* Style of the drawer footer part
|
|
3277
|
+
*/
|
|
3278
|
+
footerStyle?: CSSProperties;
|
|
3279
|
+
/**
|
|
3280
|
+
* Pre-render Drawer component forcibly
|
|
3281
|
+
*/
|
|
3282
|
+
forceRender?: boolean;
|
|
3283
|
+
/**
|
|
3284
|
+
* mounted node and display window for Drawer
|
|
3285
|
+
*/
|
|
3286
|
+
getContainer?: DrawerProps['getContainer'];
|
|
3287
|
+
/**
|
|
3288
|
+
* Style of the drawer header part
|
|
3289
|
+
*/
|
|
3290
|
+
headerStyle?: CSSProperties;
|
|
3291
|
+
/**
|
|
3292
|
+
* Placement is top or bottom, height of the Drawer dialog
|
|
3293
|
+
*/
|
|
3294
|
+
height?: string | number;
|
|
3295
|
+
/**
|
|
3296
|
+
* Whether support press esc to close
|
|
3297
|
+
*/
|
|
3298
|
+
keyboard?: boolean;
|
|
3299
|
+
/**
|
|
3300
|
+
* Whether to show mask or not
|
|
3301
|
+
*/
|
|
3302
|
+
mask?: boolean;
|
|
3303
|
+
/**
|
|
3304
|
+
* Clicking on the mask (area outside the Drawer) to close the Drawer or not
|
|
3305
|
+
*/
|
|
3306
|
+
maskClosable?: boolean;
|
|
3307
|
+
/**
|
|
3308
|
+
* Style for Drawer's mask element
|
|
3309
|
+
*/
|
|
3310
|
+
maskStyle?: CSSProperties;
|
|
3311
|
+
/**
|
|
3312
|
+
* The placement of the Drawer
|
|
3313
|
+
*/
|
|
3314
|
+
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
3315
|
+
/**
|
|
3316
|
+
* Nested drawers push behavior
|
|
3317
|
+
*/
|
|
3318
|
+
push?: boolean | {
|
|
3319
|
+
distance: string | number;
|
|
3320
|
+
};
|
|
3321
|
+
/**
|
|
3322
|
+
* The class name of the container of the Drawer dialog
|
|
3323
|
+
*/
|
|
3324
|
+
rootClassName?: string;
|
|
3325
|
+
/**
|
|
3326
|
+
* Style of wrapper element which contains mask compare to style
|
|
3327
|
+
*/
|
|
3328
|
+
rootStyle?: CSSProperties;
|
|
3329
|
+
/**
|
|
3330
|
+
* Style of Drawer panel. Use bodyStyle if want to config body only
|
|
3331
|
+
*/
|
|
3332
|
+
style?: CSSProperties;
|
|
3333
|
+
/**
|
|
3334
|
+
* preset size of drawer, default 378px and large 736px
|
|
3335
|
+
*/
|
|
3336
|
+
size?: 'default' | 'large';
|
|
3337
|
+
/**
|
|
3338
|
+
* The title for Drawer
|
|
3339
|
+
*/
|
|
3340
|
+
title?: ReactNode;
|
|
3341
|
+
/**
|
|
3342
|
+
* Whether the Drawer dialog is visible or not
|
|
3343
|
+
*/
|
|
3344
|
+
open?: boolean;
|
|
3345
|
+
/**
|
|
3346
|
+
* Width of the Drawer dialog
|
|
3347
|
+
*/
|
|
3348
|
+
width?: string | number;
|
|
3349
|
+
/**
|
|
3350
|
+
* The z-index of the Drawer
|
|
3351
|
+
*/
|
|
3352
|
+
zIndex?: number;
|
|
3353
|
+
/**
|
|
3354
|
+
* Specify a callback that will be called when a user clicks mask, close button or Cancel button
|
|
3355
|
+
*/
|
|
3356
|
+
onClose?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
3357
|
+
/**
|
|
3358
|
+
* Children of the drawer
|
|
3359
|
+
*/
|
|
3360
|
+
children?: React.ReactNode;
|
|
3361
|
+
}
|
|
3362
|
+
export const OrDrawer: React.FC<OrDrawerProps>;
|
|
3363
|
+
export interface OrEmptyProps {
|
|
3364
|
+
/**
|
|
3365
|
+
* The main text of the empty card
|
|
3366
|
+
*/
|
|
3367
|
+
title: string;
|
|
3368
|
+
/**
|
|
3369
|
+
* The additional text of the empty card
|
|
3370
|
+
*/
|
|
3371
|
+
description: string;
|
|
3372
|
+
}
|
|
3373
|
+
export const OrEmpty: React.FC<OrEmptyProps>;
|
|
3374
|
+
export interface OrFlagGridProps {
|
|
3375
|
+
/**
|
|
3376
|
+
* The ID for cards
|
|
3377
|
+
*/
|
|
3378
|
+
id?: string;
|
|
3379
|
+
/**
|
|
3380
|
+
* Country data to show elements into the grid
|
|
3381
|
+
*/
|
|
3382
|
+
data?: OrCountryCardProps[];
|
|
3383
|
+
/**
|
|
3384
|
+
* Number of items that can contain a row
|
|
3385
|
+
*/
|
|
3386
|
+
itemsPerRow?: number;
|
|
3387
|
+
/**
|
|
3388
|
+
* Index selected Item
|
|
3389
|
+
*/
|
|
3390
|
+
selectedItem?: number;
|
|
3391
|
+
/**
|
|
3392
|
+
* Callback when card is clicked
|
|
3393
|
+
*/
|
|
3394
|
+
onSelectCard?: (index: number) => void;
|
|
3395
|
+
}
|
|
3396
|
+
export const OrFlagGrid: React.FC<OrFlagGridProps>;
|
|
3397
|
+
export interface OrFormProps extends FormProps {
|
|
3398
|
+
children: React.ReactNode;
|
|
3399
|
+
}
|
|
3400
|
+
export const OrForm: React.FC<OrFormProps>;
|
|
3401
|
+
export interface AtSpaceCompactProps {
|
|
3402
|
+
/**
|
|
3403
|
+
* The ID for input
|
|
3404
|
+
*/
|
|
3405
|
+
id?: string;
|
|
3406
|
+
/**
|
|
3407
|
+
* Option to fit width to its parent's width
|
|
3408
|
+
*/
|
|
3409
|
+
block?: boolean;
|
|
3410
|
+
/**
|
|
3411
|
+
* Set direction of layout
|
|
3412
|
+
*/
|
|
3413
|
+
direction?: 'vertical' | 'horizontal';
|
|
3414
|
+
/**
|
|
3415
|
+
* Set child component size
|
|
3416
|
+
*/
|
|
3417
|
+
size?: 'large' | 'middle' | 'small';
|
|
3418
|
+
/**
|
|
3419
|
+
* Children of the OrSpace
|
|
3420
|
+
*/
|
|
3421
|
+
children?: React.ReactNode;
|
|
3422
|
+
}
|
|
3088
3423
|
export const OrSpaceCompact: React.FC<AtSpaceCompactProps>;
|
|
3089
3424
|
export interface OrPhoneInputProps {
|
|
3090
3425
|
/**
|
|
@@ -3280,65 +3615,6 @@ export interface OrSelectTableProps<T = any> extends AtSelectProps {
|
|
|
3280
3615
|
rules?: MlFromItemProps['rules'][];
|
|
3281
3616
|
}
|
|
3282
3617
|
export const OrSelectTable: React.FC<OrSelectTableProps>;
|
|
3283
|
-
export interface OrStepProp {
|
|
3284
|
-
/**
|
|
3285
|
-
* To set the current step, counting from 0. You can overwrite this state by using status of Step
|
|
3286
|
-
*/
|
|
3287
|
-
current?: number;
|
|
3288
|
-
/**
|
|
3289
|
-
* To specify the direction of the step bar, horizontal or vertical
|
|
3290
|
-
*/
|
|
3291
|
-
direction?: 'horizontal' | 'vertical';
|
|
3292
|
-
/**
|
|
3293
|
-
*
|
|
3294
|
-
*/
|
|
3295
|
-
initial?: number;
|
|
3296
|
-
/**
|
|
3297
|
-
* Place title and description with horizontal or vertical direction
|
|
3298
|
-
* */
|
|
3299
|
-
labelPlacement?: 'horizontal' | 'vertical';
|
|
3300
|
-
/**
|
|
3301
|
-
* Progress circle percentage of current step in process status (only works on basic Steps)
|
|
3302
|
-
*/
|
|
3303
|
-
percent?: number;
|
|
3304
|
-
/**
|
|
3305
|
-
* Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
|
|
3306
|
-
*/
|
|
3307
|
-
progressDot?: StepsProps['progressDot'];
|
|
3308
|
-
/**
|
|
3309
|
-
* Change to vertical direction when screen width smaller than 532px
|
|
3310
|
-
*/
|
|
3311
|
-
responsive?: boolean;
|
|
3312
|
-
/**
|
|
3313
|
-
* To specify the size of the step bar, default and small are currently supported
|
|
3314
|
-
*/
|
|
3315
|
-
size?: 'default' | 'small';
|
|
3316
|
-
/**
|
|
3317
|
-
* To specify the status of current step, can be set to one of the following values: wait process finish error
|
|
3318
|
-
*/
|
|
3319
|
-
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
3320
|
-
/**
|
|
3321
|
-
* Type of steps, can be set to one of the following values: default navigation inline
|
|
3322
|
-
*/
|
|
3323
|
-
type?: 'default' | 'navigation' | 'inline';
|
|
3324
|
-
/**
|
|
3325
|
-
* Trigger when Step is changed
|
|
3326
|
-
*/
|
|
3327
|
-
onChange?: (current: number) => void;
|
|
3328
|
-
/**
|
|
3329
|
-
* StepItem content
|
|
3330
|
-
*/
|
|
3331
|
-
items?: StepsProps['items'];
|
|
3332
|
-
/**
|
|
3333
|
-
* Element margin
|
|
3334
|
-
*/
|
|
3335
|
-
$margin?: string;
|
|
3336
|
-
/**
|
|
3337
|
-
* Element line height
|
|
3338
|
-
*/
|
|
3339
|
-
$lineHeight?: string;
|
|
3340
|
-
}
|
|
3341
|
-
export const OrStep: React.FC<OrStepProp>;
|
|
3342
3618
|
interface TextProps extends AtTextProps {
|
|
3343
3619
|
text: string;
|
|
3344
3620
|
}
|
|
@@ -3572,6 +3848,28 @@ export interface OrInfoCardProps {
|
|
|
3572
3848
|
image?: string;
|
|
3573
3849
|
}
|
|
3574
3850
|
export const OrInfoCard: React.FC<OrInfoCardProps>;
|
|
3851
|
+
export interface OrInfoHeaderCardProps extends MlCardProps {
|
|
3852
|
+
/**
|
|
3853
|
+
* Left arrow click event
|
|
3854
|
+
*/
|
|
3855
|
+
onClickLeftArrow?: () => void;
|
|
3856
|
+
/**
|
|
3857
|
+
* Breadcrumb items
|
|
3858
|
+
*/
|
|
3859
|
+
breadcrumbItems?: _BreadcrumbProps1['items'];
|
|
3860
|
+
/**
|
|
3861
|
+
* Breadcrumb items
|
|
3862
|
+
*/
|
|
3863
|
+
leftElement?: React.ReactElement;
|
|
3864
|
+
/**
|
|
3865
|
+
* Breadcrumb items
|
|
3866
|
+
*/
|
|
3867
|
+
rightElement?: React.ReactElement;
|
|
3868
|
+
}
|
|
3869
|
+
/**
|
|
3870
|
+
* Primary input UI component for user interaction
|
|
3871
|
+
*/
|
|
3872
|
+
export const OrInfoHeaderCard: React.FC<OrInfoHeaderCardProps>;
|
|
3575
3873
|
export interface OrModuleTableHeaderProps {
|
|
3576
3874
|
/**
|
|
3577
3875
|
* Title of the module table header
|
|
@@ -3869,215 +4167,6 @@ interface OrModalProps {
|
|
|
3869
4167
|
content?: string | React.ReactNode;
|
|
3870
4168
|
}
|
|
3871
4169
|
export const OrModal: React.FC<OrModalProps>;
|
|
3872
|
-
export interface IFormStep<T> {
|
|
3873
|
-
title: string;
|
|
3874
|
-
inputs?: OrFormItemsInlineProps['inputs'];
|
|
3875
|
-
submitButtonText?: string;
|
|
3876
|
-
image?: string;
|
|
3877
|
-
cancelButtonText?: string;
|
|
3878
|
-
onCancelClick?: () => void;
|
|
3879
|
-
formInitialItems?: T;
|
|
3880
|
-
form?: OrFormProps['form'];
|
|
3881
|
-
onFinish?: (e: any) => void;
|
|
3882
|
-
cancelBtnIcon?: ReactNode;
|
|
3883
|
-
isSubmitButtonDanger?: boolean;
|
|
3884
|
-
hiddeSubmitButton?: boolean;
|
|
3885
|
-
customButtons?: {
|
|
3886
|
-
label: string;
|
|
3887
|
-
onClick: () => void;
|
|
3888
|
-
type: AtButtonProps['type'];
|
|
3889
|
-
htmlType?: AtButtonProps['htmlType'];
|
|
3890
|
-
}[];
|
|
3891
|
-
}
|
|
3892
|
-
export interface TmCrudPageProps<RecordType = AnyObject, FormType = any> {
|
|
3893
|
-
/**
|
|
3894
|
-
* Columns of table
|
|
3895
|
-
*/
|
|
3896
|
-
columns: OrTableProps<RecordType>['columns'];
|
|
3897
|
-
/**
|
|
3898
|
-
* Data record array to be displayed
|
|
3899
|
-
*/
|
|
3900
|
-
data: OrTableProps<RecordType>['dataSource'];
|
|
3901
|
-
/**
|
|
3902
|
-
* Loading status of table
|
|
3903
|
-
*/
|
|
3904
|
-
loadingTable?: OrTableProps['loading'];
|
|
3905
|
-
/**
|
|
3906
|
-
* Config of pagination. You can ref table pagination config or full pagination document, hide it by setting it to false
|
|
3907
|
-
*/
|
|
3908
|
-
pagination?: OrTableProps['pagination'];
|
|
3909
|
-
/**
|
|
3910
|
-
* Row's unique key, could be a string or function that returns a string
|
|
3911
|
-
*/
|
|
3912
|
-
rowKey?: OrTableProps['rowKey'];
|
|
3913
|
-
/**
|
|
3914
|
-
* On change form content
|
|
3915
|
-
*/
|
|
3916
|
-
onValuesChange?: OrFormProps['onValuesChange'];
|
|
3917
|
-
/**
|
|
3918
|
-
* Callback when pagination changes
|
|
3919
|
-
*/
|
|
3920
|
-
onChangeTable?: OrTableProps['onChange'];
|
|
3921
|
-
/**
|
|
3922
|
-
* Extendable table TM CrudPage
|
|
3923
|
-
*/
|
|
3924
|
-
expandable?: OrTableProps['expandable'];
|
|
3925
|
-
/**
|
|
3926
|
-
* On press cancel and close button function
|
|
3927
|
-
*/
|
|
3928
|
-
handleCloseCallback?: () => void;
|
|
3929
|
-
/**
|
|
3930
|
-
* State of the drawer
|
|
3931
|
-
*/
|
|
3932
|
-
open?: boolean;
|
|
3933
|
-
/**
|
|
3934
|
-
* Page title
|
|
3935
|
-
*/
|
|
3936
|
-
title?: string;
|
|
3937
|
-
/**
|
|
3938
|
-
* Page subtitle
|
|
3939
|
-
*/
|
|
3940
|
-
subtitle?: string;
|
|
3941
|
-
/**
|
|
3942
|
-
* Page subtitle content
|
|
3943
|
-
*/
|
|
3944
|
-
subContent?: string;
|
|
3945
|
-
/**
|
|
3946
|
-
* Page table title
|
|
3947
|
-
*/
|
|
3948
|
-
tableTitle?: string;
|
|
3949
|
-
/**
|
|
3950
|
-
* Button value text
|
|
3951
|
-
*/
|
|
3952
|
-
buttonAddText?: string;
|
|
3953
|
-
/**
|
|
3954
|
-
* Callback when add button is pressed
|
|
3955
|
-
*/
|
|
3956
|
-
addButtonOnClick?: OrModuleTableHeaderProps['buttonOnClick'];
|
|
3957
|
-
/**
|
|
3958
|
-
* Callback when pagination changes
|
|
3959
|
-
*/
|
|
3960
|
-
onChangePagination?: MlPaginationProps['onChange'];
|
|
3961
|
-
/**
|
|
3962
|
-
* Total table elements
|
|
3963
|
-
*/
|
|
3964
|
-
total?: MlPaginationProps['total'];
|
|
3965
|
-
/**
|
|
3966
|
-
* Way to display total pagination table
|
|
3967
|
-
*/
|
|
3968
|
-
showTotal?: MlPaginationProps['showTotal'];
|
|
3969
|
-
/**
|
|
3970
|
-
* Table page size
|
|
3971
|
-
*/
|
|
3972
|
-
pageSize?: MlPaginationProps['pageSize'];
|
|
3973
|
-
/**
|
|
3974
|
-
* Current page table
|
|
3975
|
-
*/
|
|
3976
|
-
currentPage?: number;
|
|
3977
|
-
/**
|
|
3978
|
-
* Disable buttons drawer
|
|
3979
|
-
*/
|
|
3980
|
-
disabledButtons?: boolean;
|
|
3981
|
-
/**
|
|
3982
|
-
* Form Steps info
|
|
3983
|
-
*/
|
|
3984
|
-
formSteps?: IFormStep<FormType>[];
|
|
3985
|
-
/**
|
|
3986
|
-
* current step
|
|
3987
|
-
*/
|
|
3988
|
-
currentFormStep?: number;
|
|
3989
|
-
/**
|
|
3990
|
-
* Search table elements
|
|
3991
|
-
*/
|
|
3992
|
-
searchBoxOnSearch?: OrModuleTableHeaderProps['searchBoxOnSearch'];
|
|
3993
|
-
/**
|
|
3994
|
-
* title of drawer
|
|
3995
|
-
*/
|
|
3996
|
-
titleLeftDrawer?: ReactNode;
|
|
3997
|
-
/**
|
|
3998
|
-
* Specify a callback that will be called when a user clicks mask, close button or Cancel button
|
|
3999
|
-
*/
|
|
4000
|
-
onCloseLeftDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
4001
|
-
/**
|
|
4002
|
-
* whether left drawer is open or close
|
|
4003
|
-
*/
|
|
4004
|
-
openLeftDrawer?: boolean;
|
|
4005
|
-
/**
|
|
4006
|
-
* Children for Left Drawer
|
|
4007
|
-
*/
|
|
4008
|
-
leftDrawerContent?: React.ReactNode;
|
|
4009
|
-
/**
|
|
4010
|
-
* Custom component to render at left side of table header
|
|
4011
|
-
*/
|
|
4012
|
-
tableHeaderCustomLeftElements?: React.ReactNode;
|
|
4013
|
-
/**
|
|
4014
|
-
* Drawer Width
|
|
4015
|
-
*/
|
|
4016
|
-
leftDrawerWidth?: number;
|
|
4017
|
-
/**
|
|
4018
|
-
* searchBox placeHolder
|
|
4019
|
-
*/
|
|
4020
|
-
searchBoxPlaceholder?: string;
|
|
4021
|
-
/**
|
|
4022
|
-
* show search box
|
|
4023
|
-
*/
|
|
4024
|
-
showSearchBox?: boolean;
|
|
4025
|
-
/**
|
|
4026
|
-
* Drawer Content
|
|
4027
|
-
*/
|
|
4028
|
-
drawerContent?: React.ReactNode;
|
|
4029
|
-
/**
|
|
4030
|
-
* Drawer Title
|
|
4031
|
-
*/
|
|
4032
|
-
drawerTitle?: React.ReactNode;
|
|
4033
|
-
/**
|
|
4034
|
-
* Drawer Width
|
|
4035
|
-
*/
|
|
4036
|
-
drawerWidth?: number;
|
|
4037
|
-
/**
|
|
4038
|
-
* Text of first button
|
|
4039
|
-
*/
|
|
4040
|
-
firstButtonText?: string;
|
|
4041
|
-
/**
|
|
4042
|
-
* Text of second button
|
|
4043
|
-
*/
|
|
4044
|
-
secondButtonText?: string;
|
|
4045
|
-
/**
|
|
4046
|
-
* Function to execute when first button is clicked
|
|
4047
|
-
*/
|
|
4048
|
-
onClickFirstButton?: () => void;
|
|
4049
|
-
/**
|
|
4050
|
-
* Function to execute when second button is clicked
|
|
4051
|
-
*/
|
|
4052
|
-
onClickSecondButton?: () => void;
|
|
4053
|
-
/**
|
|
4054
|
-
* Show drawer content
|
|
4055
|
-
*/
|
|
4056
|
-
showDrawerContent?: boolean;
|
|
4057
|
-
/**
|
|
4058
|
-
* margin
|
|
4059
|
-
*/
|
|
4060
|
-
$margin?: string;
|
|
4061
|
-
/**
|
|
4062
|
-
* table title level
|
|
4063
|
-
*/
|
|
4064
|
-
tableTitleLevel?: 1 | 2 | 3 | 4 | 5;
|
|
4065
|
-
/**
|
|
4066
|
-
* button optional text
|
|
4067
|
-
*/
|
|
4068
|
-
secondaryButtonText?: string;
|
|
4069
|
-
/**
|
|
4070
|
-
* button optional onClick
|
|
4071
|
-
*/
|
|
4072
|
-
secondaryOnClick?: () => void;
|
|
4073
|
-
/**
|
|
4074
|
-
* button optional text
|
|
4075
|
-
*/
|
|
4076
|
-
showFormStepper?: boolean;
|
|
4077
|
-
onBack?: () => void;
|
|
4078
|
-
padding?: string;
|
|
4079
|
-
}
|
|
4080
|
-
export const TmCrudPage: <RecordType extends AnyObject, FormType extends Store>({ columns, data, loadingTable, formSteps, onValuesChange, onCloseLeftDrawer, leftDrawerContent, openLeftDrawer, subtitle, subContent, open, pageSize, currentPage, currentFormStep, titleLeftDrawer, leftDrawerWidth, drawerContent, showDrawerContent, showSearchBox, drawerTitle, drawerWidth, firstButtonText, secondButtonText, onClickFirstButton, onClickSecondButton, $margin, title, tableTitle, buttonAddText, addButtonOnClick, onChangePagination, onChangeTable, total, showTotal, disabledButtons, searchBoxOnSearch, searchBoxPlaceholder, tableHeaderCustomLeftElements, pagination, handleCloseCallback, tableTitleLevel, secondaryButtonText, secondaryOnClick, showFormStepper, onBack, padding, expandable }: TmCrudPageProps<RecordType, FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
4081
4170
|
export interface TmCustomTabsPageProps<FormType = any> {
|
|
4082
4171
|
/**
|
|
4083
4172
|
* Avatar image
|
|
@@ -4173,15 +4262,11 @@ export interface TmCustomTabsPageProps<FormType = any> {
|
|
|
4173
4262
|
tabsProps: OrTabsProps;
|
|
4174
4263
|
}
|
|
4175
4264
|
export const TmCustomTabsPage: <FormType extends Store>({ avatar, username, phone, balanceLabel, balanceValue, infoIcon, infoLabel, infoValue, mainButtonLabel, mainButtonIcon, onClickLeftArrow, onClickMainAction, formSteps, handleCloseCallback, open, drawerTitle, drawerWidth, disabledButtons, currentFormStep, showFormStepper, onValuesChange, tabsProps, }: TmCustomTabsPageProps<FormType>) => import("react/jsx-runtime").JSX.Element;
|
|
4176
|
-
export interface
|
|
4177
|
-
/**
|
|
4178
|
-
* The ID for input
|
|
4179
|
-
*/
|
|
4180
|
-
id?: string;
|
|
4265
|
+
export interface TmDescriptionsPageProps {
|
|
4181
4266
|
/**
|
|
4182
|
-
*
|
|
4267
|
+
* The ID for input
|
|
4183
4268
|
*/
|
|
4184
|
-
|
|
4269
|
+
id?: string;
|
|
4185
4270
|
/**
|
|
4186
4271
|
* Whether the table has border or not
|
|
4187
4272
|
*/
|
|
@@ -4189,53 +4274,21 @@ export interface TmDetailsPageProps<FormType = any> {
|
|
|
4189
4274
|
/**
|
|
4190
4275
|
* Items to display
|
|
4191
4276
|
*/
|
|
4192
|
-
items:
|
|
4193
|
-
/**
|
|
4194
|
-
* Extra content to display
|
|
4195
|
-
*/
|
|
4196
|
-
extra?: OrDescriptionsProps['extra'];
|
|
4197
|
-
/**
|
|
4198
|
-
* Form Steps info
|
|
4199
|
-
*/
|
|
4200
|
-
formSteps?: IFormStep<FormType>[];
|
|
4201
|
-
/**
|
|
4202
|
-
* On press cancel and close button function
|
|
4203
|
-
*/
|
|
4204
|
-
handleCloseCallback?: () => void;
|
|
4205
|
-
/**
|
|
4206
|
-
* State of the drawer
|
|
4207
|
-
*/
|
|
4208
|
-
open?: boolean;
|
|
4209
|
-
/**
|
|
4210
|
-
* Drawer Content
|
|
4211
|
-
*/
|
|
4212
|
-
drawerContent?: React.ReactNode;
|
|
4213
|
-
/**
|
|
4214
|
-
* Drawer Title
|
|
4215
|
-
*/
|
|
4216
|
-
drawerTitle?: React.ReactNode;
|
|
4217
|
-
/**
|
|
4218
|
-
* Drawer Width
|
|
4219
|
-
*/
|
|
4220
|
-
drawerWidth?: number;
|
|
4277
|
+
items: Array<OrDetailsPageProps | Array<OrDetailsPageProps>>;
|
|
4221
4278
|
/**
|
|
4222
4279
|
* Disable buttons drawer
|
|
4223
4280
|
*/
|
|
4224
4281
|
disabledButtons?: boolean;
|
|
4225
|
-
/**
|
|
4226
|
-
* current step
|
|
4227
|
-
*/
|
|
4228
|
-
currentFormStep?: number;
|
|
4229
|
-
/**
|
|
4230
|
-
* button optional text
|
|
4231
|
-
*/
|
|
4232
|
-
showFormStepper?: boolean;
|
|
4233
4282
|
/**
|
|
4234
4283
|
* On change form content
|
|
4235
4284
|
*/
|
|
4236
4285
|
onValuesChange?: OrFormProps['onValuesChange'];
|
|
4286
|
+
/**
|
|
4287
|
+
* Custom header page template
|
|
4288
|
+
*/
|
|
4289
|
+
header?: React.ReactElement;
|
|
4237
4290
|
}
|
|
4238
|
-
export const
|
|
4291
|
+
export const TmDescriptionsPage: ({ items, header, }: TmDescriptionsPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
4239
4292
|
export interface TmFormListPageProps<FormType = any> {
|
|
4240
4293
|
formList?: {
|
|
4241
4294
|
title?: string;
|