enwawa-ui 2.0.45 → 2.3.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 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, DescriptionsProps, SwitchProps } from "antd/lib";
4
- import { CheckboxProps, CountdownProps, DatePickerProps, ImageProps, AlertProps, ColProps, BreadcrumbProps, InputNumberProps, DropdownProps, MenuProps, PaginationProps, RadioChangeEvent, TooltipProps, UploadProps, RowProps, CollapseProps, LayoutProps, SiderProps, SpaceProps, FormProps, ModalFuncProps, FormInstance, TableProps, StepsProps, ModalProps as _ModalProps1, SelectProps, TagProps } from "antd";
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, 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";
@@ -12,10 +12,10 @@ import { CardType } from "antd/es/card/Card";
12
12
  import { NamePath, Store, StoreValue } from "antd/es/form/interface";
13
13
  import { RuleObject } from "antd/es/form";
14
14
  import { LabelTooltipType } from "antd/es/form/FormItemLabel";
15
+ import { DefaultOptionType, LabeledValue } from "antd/es/select";
15
16
  import { DotPosition } from "antd/es/carousel";
16
17
  import { CheckboxGroupProps } from "antd/es/checkbox/Group";
17
18
  import { ValueType } from "@rc-component/mini-decimal";
18
- import { LabeledValue, DefaultOptionType } from "antd/es/select";
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";
@@ -1011,13 +1011,76 @@ export interface MlAutocompleteSearchProps {
1011
1011
  /**
1012
1012
  * Fetch place details
1013
1013
  */
1014
- fetchPlaceDetails?: (data: any) => void;
1014
+ fetchPlaceDetails?: (id: any) => any;
1015
1015
  /**
1016
1016
  * Default options
1017
1017
  */
1018
1018
  defaultOptions?: AtSelectProps['options'];
1019
+ /**
1020
+ * Callback function that is fired when input changed in order to fetch places
1021
+ */
1022
+ onSearch?: (value: string) => any;
1023
+ /**
1024
+ * Called when an option is selected, the params are option's value (or key) and option instance
1025
+ */
1026
+ onSelectValue?: AtSelectProps['onSelect'];
1019
1027
  }
1020
1028
  export const MlAutocompleteSearch: React.FC<MlAutocompleteSearchProps>;
1029
+ export interface MlAutocompleteSearchTextProps {
1030
+ /**
1031
+ * The ID for input
1032
+ */
1033
+ id?: string;
1034
+ /**
1035
+ * Select props
1036
+ */
1037
+ selectProps?: AutoCompleteProps;
1038
+ /**
1039
+ * Field name
1040
+ */
1041
+ fieldName?: string;
1042
+ /**
1043
+ * Rules
1044
+ */
1045
+ rules?: RuleObject[];
1046
+ /**
1047
+ * Custom options
1048
+ */
1049
+ options?: AutoCompleteProps['options'];
1050
+ /**
1051
+ * Placeholder of select
1052
+ */
1053
+ placeholder?: ReactNode;
1054
+ /**
1055
+ * Whether disabled select
1056
+ */
1057
+ disabled?: boolean;
1058
+ /**
1059
+ * The size of the input box. Note: in the context of a form, the middle size is used
1060
+ */
1061
+ size?: 'large' | 'middle' | 'small';
1062
+ /**
1063
+ * Custom styles properties
1064
+ */
1065
+ style?: React.CSSProperties;
1066
+ /**
1067
+ * Default options
1068
+ */
1069
+ defaultOptions?: AutoCompleteProps['options'];
1070
+ /**
1071
+ * Callback function that is fired when input changed in order to fetch places
1072
+ */
1073
+ onSearch?: (value: string) => any;
1074
+ /**
1075
+ * Callback function that is fired when input changed in order to fetch places
1076
+ */
1077
+ onChange?: (value: any, option: DefaultOptionType | Array<DefaultOptionType>) => any;
1078
+ /**
1079
+ * Called when an option is selected, the params are option's value (or key) and option instance
1080
+ */
1081
+ onSelectValue?: AutoCompleteProps['onSelect'];
1082
+ }
1083
+ export const MlAutocompleteSearchText: React.FC<MlAutocompleteSearchTextProps>;
1021
1084
  export interface MlBreadcrumbProps {
1022
1085
  /**
1023
1086
  * Custom item renderer
@@ -1456,11 +1519,19 @@ export interface MlInputListProps {
1456
1519
  /**
1457
1520
  * The function to fetch the place details
1458
1521
  */
1459
- fetchPlaceDetails?: (data: any, id: string) => void;
1522
+ fetchPlaceDetails?: (id: string) => any;
1460
1523
  /**
1461
1524
  * The minimum number of items
1462
1525
  */
1463
1526
  minItems?: number;
1527
+ /**
1528
+ * Callback function that is fired when input changed
1529
+ */
1530
+ onSearch?: (value: string) => any;
1531
+ /**
1532
+ * Called when an option is selected, the params are option's value (or key) and option instance
1533
+ */
1534
+ onSelect?: SelectProps['onSelect'];
1464
1535
  }
1465
1536
  export const MlInputList: React.FC<MlInputListProps>;
1466
1537
  export interface MlLoadingProps {
@@ -3115,7 +3186,7 @@ export interface OrFormInLineItem {
3115
3186
  /**
3116
3187
  * Type of components available for the form
3117
3188
  */
3118
- 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' | 'input-list' | 'button' | 'image' | 'time-range-picker';
3189
+ 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' | 'input-list' | 'button' | 'image' | 'time-range-picker' | 'autocomplete-search';
3119
3190
  /**
3120
3191
  * Label of the field
3121
3192
  */
@@ -3298,7 +3369,7 @@ export interface OrFormInLineItem {
3298
3369
  /**
3299
3370
  * The function to fetch the place details
3300
3371
  */
3301
- fetchPlaceDetails?: (data: any, id: string) => void;
3372
+ fetchPlaceDetails?: (id: string) => any;
3302
3373
  /**
3303
3374
  * The minimum number of items
3304
3375
  */
@@ -3311,6 +3382,10 @@ export interface OrFormInLineItem {
3311
3382
  * The props for the time range picker
3312
3383
  */
3313
3384
  timeRangePickerProps?: AtTimeRangePickerProps;
3385
+ /**
3386
+ * Allow auto clear for a select field
3387
+ */
3388
+ autoClearSearchValue?: boolean | undefined;
3314
3389
  }
3315
3390
  export interface OrFormItemsInlineProps {
3316
3391
  inputs?: Array<OrFormInLineItem | Array<OrFormInLineItem | OrFormInLineItem[]>>;