enwawa-ui 2.0.22 → 2.0.23
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 +85 -64
- package/lib/index.d.ts.map +1 -1
- package/lib/index.es.js +110 -82
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +109 -81
- 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
3
|
import { ButtonProps, SwitchProps } from "antd/lib";
|
|
4
|
-
import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, AlertProps, BreadcrumbProps, InputNumberProps, DropdownProps, MenuProps, ColProps, PaginationProps, RadioChangeEvent, TooltipProps, UploadProps, RowProps, CollapseProps, LayoutProps, SiderProps, SpaceProps, FormProps, ModalFuncProps, FormInstance, TableProps, ModalProps as _ModalProps1,
|
|
4
|
+
import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, AlertProps, BreadcrumbProps, InputNumberProps, DropdownProps, MenuProps, ColProps, PaginationProps, RadioChangeEvent, TooltipProps, UploadProps, RowProps, CollapseProps, LayoutProps, SiderProps, SpaceProps, FormProps, ModalFuncProps, FormInstance, TableProps, StepsProps, ModalProps as _ModalProps1, SelectProps, 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";
|
|
@@ -1351,10 +1351,18 @@ export interface MlInfoListProps {
|
|
|
1351
1351
|
* Component title
|
|
1352
1352
|
*/
|
|
1353
1353
|
title?: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* Component title level
|
|
1356
|
+
*/
|
|
1357
|
+
titleLevel?: 1 | 2 | 3 | 4 | 5;
|
|
1358
|
+
/**
|
|
1359
|
+
* Component description
|
|
1360
|
+
*/
|
|
1361
|
+
description?: string;
|
|
1354
1362
|
/**
|
|
1355
1363
|
* List of label value pairs
|
|
1356
1364
|
*/
|
|
1357
|
-
items
|
|
1365
|
+
items?: {
|
|
1358
1366
|
icon: AtIconProps['name'];
|
|
1359
1367
|
value: string | (() => React.ReactElement);
|
|
1360
1368
|
}[];
|
|
@@ -2911,6 +2919,65 @@ export interface OrSelectTableProps<T = any> extends AtSelectProps {
|
|
|
2911
2919
|
rules?: MlFromItemProps['rules'][];
|
|
2912
2920
|
}
|
|
2913
2921
|
export const OrSelectTable: React.FC<OrSelectTableProps>;
|
|
2922
|
+
export interface OrStepProp {
|
|
2923
|
+
/**
|
|
2924
|
+
* To set the current step, counting from 0. You can overwrite this state by using status of Step
|
|
2925
|
+
*/
|
|
2926
|
+
current?: number;
|
|
2927
|
+
/**
|
|
2928
|
+
* To specify the direction of the step bar, horizontal or vertical
|
|
2929
|
+
*/
|
|
2930
|
+
direction?: 'horizontal' | 'vertical';
|
|
2931
|
+
/**
|
|
2932
|
+
*
|
|
2933
|
+
*/
|
|
2934
|
+
initial?: number;
|
|
2935
|
+
/**
|
|
2936
|
+
* Place title and description with horizontal or vertical direction
|
|
2937
|
+
* */
|
|
2938
|
+
labelPlacement?: 'horizontal' | 'vertical';
|
|
2939
|
+
/**
|
|
2940
|
+
* Progress circle percentage of current step in process status (only works on basic Steps)
|
|
2941
|
+
*/
|
|
2942
|
+
percent?: number;
|
|
2943
|
+
/**
|
|
2944
|
+
* Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
|
|
2945
|
+
*/
|
|
2946
|
+
progressDot?: StepsProps['progressDot'];
|
|
2947
|
+
/**
|
|
2948
|
+
* Change to vertical direction when screen width smaller than 532px
|
|
2949
|
+
*/
|
|
2950
|
+
responsive?: boolean;
|
|
2951
|
+
/**
|
|
2952
|
+
* To specify the size of the step bar, default and small are currently supported
|
|
2953
|
+
*/
|
|
2954
|
+
size?: 'default' | 'small';
|
|
2955
|
+
/**
|
|
2956
|
+
* To specify the status of current step, can be set to one of the following values: wait process finish error
|
|
2957
|
+
*/
|
|
2958
|
+
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
2959
|
+
/**
|
|
2960
|
+
* Type of steps, can be set to one of the following values: default navigation inline
|
|
2961
|
+
*/
|
|
2962
|
+
type?: 'default' | 'navigation' | 'inline';
|
|
2963
|
+
/**
|
|
2964
|
+
* Trigger when Step is changed
|
|
2965
|
+
*/
|
|
2966
|
+
onChange?: (current: number) => void;
|
|
2967
|
+
/**
|
|
2968
|
+
* StepItem content
|
|
2969
|
+
*/
|
|
2970
|
+
items?: StepsProps['items'];
|
|
2971
|
+
/**
|
|
2972
|
+
* Element margin
|
|
2973
|
+
*/
|
|
2974
|
+
$margin?: string;
|
|
2975
|
+
/**
|
|
2976
|
+
* Element line height
|
|
2977
|
+
*/
|
|
2978
|
+
$lineHeight?: string;
|
|
2979
|
+
}
|
|
2980
|
+
export const OrStep: React.FC<OrStepProp>;
|
|
2914
2981
|
interface TextProps extends AtTextProps {
|
|
2915
2982
|
text: string;
|
|
2916
2983
|
}
|
|
@@ -2918,7 +2985,7 @@ export interface OrFormInLineItem {
|
|
|
2918
2985
|
/**
|
|
2919
2986
|
* Type of components available for the form
|
|
2920
2987
|
*/
|
|
2921
|
-
component: 'radio' | 'number-input' | 'checkbox' | 'select' | 'select-multiple' | 'text' | 'phone' | 'date-picker' | 'date-range-picker' | 'cvc' | 'name' | 'select-input' | 'info' | 'copy-info' | 'status-info' | 'file-input' | 'collapse' | 'download-upload' | 'summary' | 'qr-code' | 'select-table' | 'google-map' | 'google-autocomplete-search';
|
|
2988
|
+
component: 'radio' | 'number-input' | 'checkbox' | 'select' | 'select-multiple' | 'text' | 'phone' | 'date-picker' | 'date-range-picker' | 'cvc' | 'name' | 'select-input' | 'info' | 'copy-info' | 'status-info' | 'file-input' | 'collapse' | 'download-upload' | 'summary' | 'qr-code' | 'select-table' | 'google-map' | 'google-autocomplete-search' | 'stepper';
|
|
2922
2989
|
/**
|
|
2923
2990
|
* Label of the field
|
|
2924
2991
|
*/
|
|
@@ -2987,7 +3054,7 @@ export interface OrFormInLineItem {
|
|
|
2987
3054
|
/**
|
|
2988
3055
|
* Type of the status info
|
|
2989
3056
|
*/
|
|
2990
|
-
type?: 'success' | 'warning' | 'danger' | 'info';
|
|
3057
|
+
type?: 'success' | 'warning' | 'danger' | 'info' | 'default';
|
|
2991
3058
|
/**
|
|
2992
3059
|
* Tooltip of the label
|
|
2993
3060
|
*/
|
|
@@ -3059,6 +3126,14 @@ export interface OrFormInLineItem {
|
|
|
3059
3126
|
* The mode of the upload
|
|
3060
3127
|
*/
|
|
3061
3128
|
uploadMode?: 'drag' | 'basic';
|
|
3129
|
+
/**
|
|
3130
|
+
* The description of the summary component
|
|
3131
|
+
*/
|
|
3132
|
+
description?: string;
|
|
3133
|
+
/**
|
|
3134
|
+
* Stepper props
|
|
3135
|
+
*/
|
|
3136
|
+
stepperProps?: OrStepProp;
|
|
3062
3137
|
}
|
|
3063
3138
|
export interface OrFormItemsInlineProps {
|
|
3064
3139
|
inputs?: Array<OrFormInLineItem | Array<OrFormInLineItem | OrFormInLineItem[]>>;
|
|
@@ -3376,65 +3451,6 @@ interface OrModalProps {
|
|
|
3376
3451
|
content?: string | React.ReactNode;
|
|
3377
3452
|
}
|
|
3378
3453
|
export const OrModal: React.FC<OrModalProps>;
|
|
3379
|
-
export interface OrStepProp {
|
|
3380
|
-
/**
|
|
3381
|
-
* To set the current step, counting from 0. You can overwrite this state by using status of Step
|
|
3382
|
-
*/
|
|
3383
|
-
current?: number;
|
|
3384
|
-
/**
|
|
3385
|
-
* To specify the direction of the step bar, horizontal or vertical
|
|
3386
|
-
*/
|
|
3387
|
-
direction?: 'horizontal' | 'vertical';
|
|
3388
|
-
/**
|
|
3389
|
-
*
|
|
3390
|
-
*/
|
|
3391
|
-
initial?: number;
|
|
3392
|
-
/**
|
|
3393
|
-
* Place title and description with horizontal or vertical direction
|
|
3394
|
-
* */
|
|
3395
|
-
labelPlacement?: 'horizontal' | 'vertical';
|
|
3396
|
-
/**
|
|
3397
|
-
* Progress circle percentage of current step in process status (only works on basic Steps)
|
|
3398
|
-
*/
|
|
3399
|
-
percent?: number;
|
|
3400
|
-
/**
|
|
3401
|
-
* Steps with progress dot style, customize the progress dot by setting it to a function. labelPlacement will be vertical
|
|
3402
|
-
*/
|
|
3403
|
-
progressDot?: StepsProps['progressDot'];
|
|
3404
|
-
/**
|
|
3405
|
-
* Change to vertical direction when screen width smaller than 532px
|
|
3406
|
-
*/
|
|
3407
|
-
responsive?: boolean;
|
|
3408
|
-
/**
|
|
3409
|
-
* To specify the size of the step bar, default and small are currently supported
|
|
3410
|
-
*/
|
|
3411
|
-
size?: 'default' | 'small';
|
|
3412
|
-
/**
|
|
3413
|
-
* To specify the status of current step, can be set to one of the following values: wait process finish error
|
|
3414
|
-
*/
|
|
3415
|
-
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
3416
|
-
/**
|
|
3417
|
-
* Type of steps, can be set to one of the following values: default navigation inline
|
|
3418
|
-
*/
|
|
3419
|
-
type?: 'default' | 'navigation' | 'inline';
|
|
3420
|
-
/**
|
|
3421
|
-
* Trigger when Step is changed
|
|
3422
|
-
*/
|
|
3423
|
-
onChange?: (current: number) => void;
|
|
3424
|
-
/**
|
|
3425
|
-
* StepItem content
|
|
3426
|
-
*/
|
|
3427
|
-
items?: StepsProps['items'];
|
|
3428
|
-
/**
|
|
3429
|
-
* Element margin
|
|
3430
|
-
*/
|
|
3431
|
-
$margin?: string;
|
|
3432
|
-
/**
|
|
3433
|
-
* Element line height
|
|
3434
|
-
*/
|
|
3435
|
-
$lineHeight?: string;
|
|
3436
|
-
}
|
|
3437
|
-
export const OrStep: React.FC<OrStepProp>;
|
|
3438
3454
|
export interface IFormStep<T> {
|
|
3439
3455
|
title: string;
|
|
3440
3456
|
inputs?: OrFormItemsInlineProps['inputs'];
|
|
@@ -3448,6 +3464,11 @@ export interface IFormStep<T> {
|
|
|
3448
3464
|
cancelBtnIcon?: ReactNode;
|
|
3449
3465
|
isSubmitButtonDanger?: boolean;
|
|
3450
3466
|
hiddeSubmitButton?: boolean;
|
|
3467
|
+
customButtons?: {
|
|
3468
|
+
label: string;
|
|
3469
|
+
onClick: () => void;
|
|
3470
|
+
type: AtButtonProps['type'];
|
|
3471
|
+
}[];
|
|
3451
3472
|
}
|
|
3452
3473
|
export interface TmCrudPageProps<RecordType = AnyObject, FormType = any> {
|
|
3453
3474
|
/**
|
|
@@ -4370,7 +4391,7 @@ export interface AtInputStatusProps {
|
|
|
4370
4391
|
/**
|
|
4371
4392
|
* Status type
|
|
4372
4393
|
*/
|
|
4373
|
-
type?: 'success' | 'warning' | 'danger' | 'info';
|
|
4394
|
+
type?: 'success' | 'warning' | 'danger' | 'info' | 'default';
|
|
4374
4395
|
visible?: boolean;
|
|
4375
4396
|
}
|
|
4376
4397
|
export const AtInputStatus: React.FC<AtInputStatusProps>;
|