enwawa-ui 2.5.2 → 2.7.1

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 CHANGED
@@ -1,11 +1,13 @@
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, StepsProps, ModalProps as _ModalProps1, SpinProps, TagProps } from "antd";
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";
8
8
  import * as Icons from "@ant-design/icons";
9
+ import { BlockProps, EllipsisConfig, BaseType } from "antd/es/typography/Base";
10
+ import { TextProps as _TextProps1 } from "antd/es/typography/Text";
9
11
  import { TabsProps } from "antd/es/tabs";
10
12
  import { CardTabListType } from "antd/es/card";
11
13
  import { CardType } from "antd/es/card/Card";
@@ -17,12 +19,10 @@ import { DotPosition } from "antd/es/carousel";
17
19
  import { CheckboxGroupProps } from "antd/es/checkbox/Group";
18
20
  import { ValueType } from "@rc-component/mini-decimal";
19
21
  import { Gutter } from "antd/es/grid/row";
20
- import { BlockProps, EllipsisConfig, BaseType } from "antd/es/typography/Base";
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 {
@@ -521,6 +525,89 @@ export interface AtIconProps {
521
525
  twoToneColor?: string;
522
526
  }
523
527
  export const AtIcon: React.FC<AtIconProps>;
528
+ declare const colorMap: {
529
+ violet: string;
530
+ gold: string;
531
+ white: string;
532
+ gray: string;
533
+ lightGray: string;
534
+ black: string;
535
+ };
536
+ export interface AtTextProps {
537
+ /**
538
+ * Content type
539
+ */
540
+ type?: 'secondary' | 'success' | 'warning' | 'danger';
541
+ /**
542
+ * Whether the text is strong or not
543
+ */
544
+ strong?: boolean;
545
+ /**
546
+ * Whether the text is italic or not
547
+ */
548
+ italic?: boolean;
549
+ /**
550
+ * Whether the text is underline or not
551
+ */
552
+ underline?: boolean;
553
+ /**
554
+ * Whether the text is mark or not
555
+ */
556
+ mark?: boolean;
557
+ /**
558
+ * If editable. Can control edit state when is object
559
+ */
560
+ editable?: boolean | BlockProps['editable'];
561
+ /**
562
+ * Whether to be copyable, customize it via setting an object
563
+ */
564
+ copyable?: boolean | BlockProps['copyable'];
565
+ /**
566
+ * Keyboard style
567
+ */
568
+ keyboard?: boolean;
569
+ /**
570
+ * Code style
571
+ */
572
+ code?: boolean;
573
+ /**
574
+ * children
575
+ */
576
+ children?: React.ReactNode;
577
+ /**
578
+ * Color of the text
579
+ */
580
+ color?: keyof typeof colorMap;
581
+ /**
582
+ * Element width
583
+ */
584
+ $width?: number | string;
585
+ /**
586
+ * Element max width
587
+ */
588
+ $maxWidth?: number | string;
589
+ /**
590
+ * font size
591
+ */
592
+ $fontSize?: number;
593
+ /**
594
+ * textAlign
595
+ */
596
+ $textAlign?: "center" | "left" | "right" | "justify" | "initial" | "inherit" | "unset";
597
+ /**
598
+ * opacity
599
+ */
600
+ $opacity?: number;
601
+ /**
602
+ * ellipsis
603
+ */
604
+ ellipsis?: _TextProps1['ellipsis'];
605
+ /**
606
+ * line height
607
+ */
608
+ $lineHeight?: number;
609
+ }
610
+ export const AtText: React.FC<AtTextProps>;
524
611
  export interface AtImageProps {
525
612
  /**
526
613
  * Image description
@@ -727,14 +814,6 @@ export interface OrTabsProps {
727
814
  hideExtra?: boolean;
728
815
  }
729
816
  export const OrTabs: React.FC<OrTabsProps>;
730
- declare const colorMap: {
731
- violet: string;
732
- gold: string;
733
- white: string;
734
- gray: string;
735
- lightGray: string;
736
- black: string;
737
- };
738
817
  export interface MlCardProps {
739
818
  /**
740
819
  * The ID for input
@@ -2431,81 +2510,6 @@ export interface OrContentProps extends LayoutProps {
2431
2510
  $backgroundSrc?: string;
2432
2511
  }
2433
2512
  export const OrContent: React.FC<OrContentProps>;
2434
- export interface AtTextProps {
2435
- /**
2436
- * Content type
2437
- */
2438
- type?: 'secondary' | 'success' | 'warning' | 'danger';
2439
- /**
2440
- * Whether the text is strong or not
2441
- */
2442
- strong?: boolean;
2443
- /**
2444
- * Whether the text is italic or not
2445
- */
2446
- italic?: boolean;
2447
- /**
2448
- * Whether the text is underline or not
2449
- */
2450
- underline?: boolean;
2451
- /**
2452
- * Whether the text is mark or not
2453
- */
2454
- mark?: boolean;
2455
- /**
2456
- * If editable. Can control edit state when is object
2457
- */
2458
- editable?: boolean | BlockProps['editable'];
2459
- /**
2460
- * Whether to be copyable, customize it via setting an object
2461
- */
2462
- copyable?: boolean | BlockProps['copyable'];
2463
- /**
2464
- * Keyboard style
2465
- */
2466
- keyboard?: boolean;
2467
- /**
2468
- * Code style
2469
- */
2470
- code?: boolean;
2471
- /**
2472
- * children
2473
- */
2474
- children?: React.ReactNode;
2475
- /**
2476
- * Color of the text
2477
- */
2478
- color?: keyof typeof colorMap;
2479
- /**
2480
- * Element width
2481
- */
2482
- $width?: number | string;
2483
- /**
2484
- * Element max width
2485
- */
2486
- $maxWidth?: number | string;
2487
- /**
2488
- * font size
2489
- */
2490
- $fontSize?: number;
2491
- /**
2492
- * textAlign
2493
- */
2494
- $textAlign?: "center" | "left" | "right" | "justify" | "initial" | "inherit" | "unset";
2495
- /**
2496
- * opacity
2497
- */
2498
- $opacity?: number;
2499
- /**
2500
- * ellipsis
2501
- */
2502
- ellipsis?: _TextProps1['ellipsis'];
2503
- /**
2504
- * line height
2505
- */
2506
- $lineHeight?: number;
2507
- }
2508
- export const AtText: React.FC<AtTextProps>;
2509
2513
  export type Size = 'large' | 'middle' | 'small';
2510
2514
  declare const sizes: {
2511
2515
  [key in Size]: {
@@ -2860,85 +2864,416 @@ export interface OrDescriptionsProps extends DescriptionsProps {
2860
2864
  extra?: DescriptionsProps['extra'];
2861
2865
  }
2862
2866
  export const OrDescriptions: React.FC<OrDescriptionsProps>;
2863
- interface OrDownloadProps {
2864
- /**
2865
- * The function to call when the download button is clicked
2866
- */
2867
- downloadOnClick?: () => any;
2868
- /**
2869
- * The text to display on the download button
2870
- */
2871
- downloadText: string;
2872
- }
2873
- export interface OrDownloadUploadProps {
2874
- /**
2875
- * Key identifier
2876
- */
2877
- inputKey: string;
2878
- /**
2879
- * The function to call when the value of the file changes
2880
- */
2881
- getValueFromEvent?: (e: any) => any;
2867
+ export interface OrStepProp {
2882
2868
  /**
2883
- * The rules for the file
2869
+ * To set the current step, counting from 0. You can overwrite this state by using status of Step
2884
2870
  */
2885
- rules?: MlFromItemProps['rules'];
2871
+ current?: number;
2886
2872
  /**
2887
- * If the file is required
2873
+ * To specify the direction of the step bar, horizontal or vertical
2888
2874
  */
2889
- isRequired?: boolean;
2890
- downloadProps: OrDownloadProps;
2891
- uploadProps: MlUploadProps;
2892
- disabled?: boolean;
2875
+ direction?: 'horizontal' | 'vertical';
2893
2876
  /**
2894
- * The mode of the upload
2877
+ *
2895
2878
  */
2896
- mode?: 'drag' | 'basic';
2897
- }
2898
- export const OrDownloadUpload: React.FC<OrDownloadUploadProps>;
2899
- export interface OrDrawerProps {
2879
+ initial?: number;
2900
2880
  /**
2901
- * The ID for input
2902
- */
2903
- id?: string;
2881
+ * Place title and description with horizontal or vertical direction
2882
+ * */
2883
+ labelPlacement?: 'horizontal' | 'vertical';
2904
2884
  /**
2905
- * Whether Drawer should get focused after open
2885
+ * Progress circle percentage of current step in process status (only works on basic Steps)
2906
2886
  */
2907
- autoFocus?: boolean;
2887
+ percent?: number;
2908
2888
  /**
2909
- * Callback after the animation ends when switching drawers
2889
+ * Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
2910
2890
  */
2911
- afterOpenChange?: (open: boolean) => void;
2891
+ progressDot?: StepsProps['progressDot'];
2912
2892
  /**
2913
- * Style of the drawer content part
2893
+ * Change to vertical direction when screen width smaller than 532px
2914
2894
  */
2915
- bodyStyle?: CSSProperties;
2895
+ responsive?: boolean;
2916
2896
  /**
2917
- * Config Drawer Panel className. Use rootClassName if want to config top dom style
2897
+ * To specify the size of the step bar, default and small are currently supported
2918
2898
  */
2919
- className?: string;
2899
+ size?: 'default' | 'small';
2920
2900
  /**
2921
- * Custom close icon. 5.7.0: close button will be hidden when setting to null or false
2901
+ * To specify the status of current step, can be set to one of the following values: wait process finish error
2922
2902
  */
2923
- closeIcon?: boolean | ReactNode;
2903
+ status?: 'wait' | 'process' | 'finish' | 'error';
2924
2904
  /**
2925
- * Style of the drawer wrapper of content part
2905
+ * Type of steps, can be set to one of the following values: default navigation inline
2926
2906
  */
2927
- contentWrapperStyle?: CSSProperties;
2907
+ type?: 'default' | 'navigation' | 'inline';
2928
2908
  /**
2929
- * Whether to unmount child components on closing drawer or not
2909
+ * Trigger when Step is changed
2930
2910
  */
2931
- destroyOnClose?: boolean;
2911
+ onChange?: (current: number) => void;
2932
2912
  /**
2933
- * Extra actions area at corner
2913
+ * StepItem content
2934
2914
  */
2935
- extra?: ReactNode;
2915
+ items?: StepsProps['items'];
2936
2916
  /**
2937
- * The footer for Drawer
2917
+ * Element margin
2938
2918
  */
2939
- footer?: ReactNode;
2919
+ $margin?: string;
2940
2920
  /**
2941
- * Style of the drawer footer part
2921
+ * Element line height
2922
+ */
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> {
2947
+ /**
2948
+ * Columns of table
2949
+ */
2950
+ columns: OrTableProps<RecordType>['columns'];
2951
+ /**
2952
+ * Data record array to be displayed
2953
+ */
2954
+ data: OrTableProps<RecordType>['dataSource'];
2955
+ /**
2956
+ * Loading status of table
2957
+ */
2958
+ loadingTable?: OrTableProps['loading'];
2959
+ /**
2960
+ * Config of pagination. You can ref table pagination config or full pagination document, hide it by setting it to false
2961
+ */
2962
+ pagination?: OrTableProps['pagination'];
2963
+ /**
2964
+ * Row's unique key, could be a string or function that returns a string
2965
+ */
2966
+ rowKey?: OrTableProps['rowKey'];
2967
+ /**
2968
+ * On change form content
2969
+ */
2970
+ onValuesChange?: OrFormProps['onValuesChange'];
2971
+ /**
2972
+ * Callback when pagination changes
2973
+ */
2974
+ onChangeTable?: OrTableProps['onChange'];
2975
+ /**
2976
+ * Extendable table TM CrudPage
2977
+ */
2978
+ expandable?: OrTableProps['expandable'];
2979
+ /**
2980
+ * On press cancel and close button function
2981
+ */
2982
+ handleCloseCallback?: () => void;
2983
+ /**
2984
+ * State of the drawer
2985
+ */
2986
+ open?: boolean;
2987
+ /**
2988
+ * Page title
2989
+ */
2990
+ title?: string;
2991
+ /**
2992
+ * Page subtitle
2993
+ */
2994
+ subtitle?: string;
2995
+ /**
2996
+ * Page subtitle content
2997
+ */
2998
+ subContent?: string;
2999
+ /**
3000
+ * Page table title
3001
+ */
3002
+ tableTitle?: string;
3003
+ /**
3004
+ * Button value text
3005
+ */
3006
+ buttonAddText?: string;
3007
+ /**
3008
+ * Callback when add button is pressed
3009
+ */
3010
+ addButtonOnClick?: OrModuleTableHeaderProps['buttonOnClick'];
3011
+ /**
3012
+ * Callback when pagination changes
3013
+ */
3014
+ onChangePagination?: MlPaginationProps['onChange'];
3015
+ /**
3016
+ * Total table elements
3017
+ */
3018
+ total?: MlPaginationProps['total'];
3019
+ /**
3020
+ * Way to display total pagination table
3021
+ */
3022
+ showTotal?: MlPaginationProps['showTotal'];
3023
+ /**
3024
+ * Table page size
3025
+ */
3026
+ pageSize?: MlPaginationProps['pageSize'];
3027
+ /**
3028
+ * Current page table
3029
+ */
3030
+ currentPage?: number;
3031
+ /**
3032
+ * Disable buttons drawer
3033
+ */
3034
+ disabledButtons?: boolean;
3035
+ /**
3036
+ * Form Steps info
3037
+ */
3038
+ formSteps?: IFormStep<FormType>[];
3039
+ /**
3040
+ * current step
3041
+ */
3042
+ currentFormStep?: number;
3043
+ /**
3044
+ * Search table elements
3045
+ */
3046
+ searchBoxOnSearch?: OrModuleTableHeaderProps['searchBoxOnSearch'];
3047
+ /**
3048
+ * title of drawer
3049
+ */
3050
+ titleLeftDrawer?: ReactNode;
3051
+ /**
3052
+ * Specify a callback that will be called when a user clicks mask, close button or Cancel button
3053
+ */
3054
+ onCloseLeftDrawer?: (e: React.MouseEvent | React.KeyboardEvent) => void;
3055
+ /**
3056
+ * whether left drawer is open or close
3057
+ */
3058
+ openLeftDrawer?: boolean;
3059
+ /**
3060
+ * Children for Left Drawer
3061
+ */
3062
+ leftDrawerContent?: React.ReactNode;
3063
+ /**
3064
+ * Custom component to render at left side of table header
3065
+ */
3066
+ tableHeaderCustomLeftElements?: React.ReactNode;
3067
+ /**
3068
+ * Drawer Width
3069
+ */
3070
+ leftDrawerWidth?: number;
3071
+ /**
3072
+ * searchBox placeHolder
3073
+ */
3074
+ searchBoxPlaceholder?: string;
3075
+ /**
3076
+ * show search box
3077
+ */
3078
+ showSearchBox?: boolean;
3079
+ /**
3080
+ * Drawer Content
3081
+ */
3082
+ drawerContent?: React.ReactNode;
3083
+ /**
3084
+ * Drawer Title
3085
+ */
3086
+ drawerTitle?: React.ReactNode;
3087
+ /**
3088
+ * Drawer Width
3089
+ */
3090
+ drawerWidth?: number;
3091
+ /**
3092
+ * Text of first button
3093
+ */
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
2942
3277
  */
2943
3278
  footerStyle?: CSSProperties;
2944
3279
  /**
@@ -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
  }
@@ -3483,6 +3759,10 @@ export interface OrFormInLineItem {
3483
3759
  * file list for the file-input component
3484
3760
  */
3485
3761
  fileList?: MlUploadProps['fileList'];
3762
+ /**
3763
+ * onRemove for the file-input component
3764
+ */
3765
+ onRemoveUploadedFile?: MlUploadProps['onRemove'];
3486
3766
  noStyle?: boolean;
3487
3767
  /**
3488
3768
  * The mode of the upload
@@ -3572,6 +3852,28 @@ export interface OrInfoCardProps {
3572
3852
  image?: string;
3573
3853
  }
3574
3854
  export const OrInfoCard: React.FC<OrInfoCardProps>;
3855
+ export interface OrInfoHeaderCardProps extends MlCardProps {
3856
+ /**
3857
+ * Left arrow click event
3858
+ */
3859
+ onClickLeftArrow?: () => void;
3860
+ /**
3861
+ * Breadcrumb items
3862
+ */
3863
+ breadcrumbItems?: _BreadcrumbProps1['items'];
3864
+ /**
3865
+ * Breadcrumb items
3866
+ */
3867
+ leftElement?: React.ReactElement;
3868
+ /**
3869
+ * Breadcrumb items
3870
+ */
3871
+ rightElement?: React.ReactElement;
3872
+ }
3873
+ /**
3874
+ * Primary input UI component for user interaction
3875
+ */
3876
+ export const OrInfoHeaderCard: React.FC<OrInfoHeaderCardProps>;
3575
3877
  export interface OrModuleTableHeaderProps {
3576
3878
  /**
3577
3879
  * Title of the module table header
@@ -3869,215 +4171,6 @@ interface OrModalProps {
3869
4171
  content?: string | React.ReactNode;
3870
4172
  }
3871
4173
  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
4174
  export interface TmCustomTabsPageProps<FormType = any> {
4082
4175
  /**
4083
4176
  * Avatar image
@@ -4173,15 +4266,11 @@ export interface TmCustomTabsPageProps<FormType = any> {
4173
4266
  tabsProps: OrTabsProps;
4174
4267
  }
4175
4268
  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 TmDetailsPageProps<FormType = any> {
4177
- /**
4178
- * The ID for input
4179
- */
4180
- id?: string;
4269
+ export interface TmDescriptionsPageProps {
4181
4270
  /**
4182
- * Title of the description set
4271
+ * The ID for input
4183
4272
  */
4184
- title: string;
4273
+ id?: string;
4185
4274
  /**
4186
4275
  * Whether the table has border or not
4187
4276
  */
@@ -4189,53 +4278,21 @@ export interface TmDetailsPageProps<FormType = any> {
4189
4278
  /**
4190
4279
  * Items to display
4191
4280
  */
4192
- items: OrDescriptionsProps['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;
4281
+ items: Array<OrDetailsPageProps | Array<OrDetailsPageProps>>;
4221
4282
  /**
4222
4283
  * Disable buttons drawer
4223
4284
  */
4224
4285
  disabledButtons?: boolean;
4225
- /**
4226
- * current step
4227
- */
4228
- currentFormStep?: number;
4229
- /**
4230
- * button optional text
4231
- */
4232
- showFormStepper?: boolean;
4233
4286
  /**
4234
4287
  * On change form content
4235
4288
  */
4236
4289
  onValuesChange?: OrFormProps['onValuesChange'];
4290
+ /**
4291
+ * Custom header page template
4292
+ */
4293
+ header?: React.ReactElement;
4237
4294
  }
4238
- export const TmDetailsPage: <FormType extends Store>({ title, bordered, items, extra, formSteps, handleCloseCallback, open, drawerTitle, drawerWidth, disabledButtons, currentFormStep, showFormStepper, onValuesChange, }: TmDetailsPageProps<FormType>) => import("react/jsx-runtime").JSX.Element;
4295
+ export const TmDescriptionsPage: ({ items, header, }: TmDescriptionsPageProps) => import("react/jsx-runtime").JSX.Element;
4239
4296
  export interface TmFormListPageProps<FormType = any> {
4240
4297
  formList?: {
4241
4298
  title?: string;