@flatbiz/antd 4.0.17 → 4.0.18

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/index.d.ts CHANGED
@@ -125,15 +125,47 @@ export declare const CascaderWrapper: import("react").ForwardRefExoticComponent<
125
125
  onChange?: ((value?: string | number, selectedList?: TPlainObject[]) => void) | undefined;
126
126
  requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
127
127
  } & import("react").RefAttributes<CascaderWrapperRefApi>>;
128
- export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
129
- locale?: "en" | "zh-cn";
130
- };
131
- export declare const ConfigProviderWrapper: (props: ConfigProviderWrapperProps) => JSX.Element;
132
128
  export interface CommonPropsWithChildren<S extends TPlainObject = TPlainObject> {
133
129
  className?: string;
134
130
  style?: CSSProperties & Partial<S>;
135
131
  children?: ReactNode | undefined;
136
132
  }
133
+ export type CheckListItemValue = string | number;
134
+ export type CheckListValue = CheckListItemValue[] | CheckListItemValue | undefined;
135
+ export type CheckListSelectedValue<T extends "multi" | "radio"> = T extends "multi" ? CheckListItemValue[] : CheckListItemValue;
136
+ export type CheckListProps<T extends "multi" | "radio"> = {
137
+ multiple?: boolean;
138
+ onChange?: (value: CheckListSelectedValue<T>, operateValue: CheckListItemValue) => void;
139
+ onPreChange?: (value: CheckListItemValue) => Promise<void>;
140
+ value?: CheckListSelectedValue<T>;
141
+ defaultValue?: CheckListSelectedValue<T>;
142
+ beforeExtra?: ReactNode;
143
+ afterExtra?: ReactNode;
144
+ stopPropagation?: boolean;
145
+ required?: boolean;
146
+ } & CommonPropsWithChildren;
147
+ export declare const CheckList: <T extends "radio" | "multi">(props: CheckListProps<T>) => JSX.Element;
148
+ export type CheckListItemContentProps = {
149
+ checked?: boolean;
150
+ disabled?: boolean;
151
+ onClick?: (event: any) => void;
152
+ className?: string;
153
+ readonly?: boolean;
154
+ style?: CSSProperties;
155
+ };
156
+ export type CheckListItemProps = {
157
+ value: CheckListItemValue;
158
+ disabled?: boolean;
159
+ readonly?: boolean;
160
+ children: (data: CheckListItemContentProps) => ReactElement;
161
+ className?: string;
162
+ style?: CSSProperties;
163
+ };
164
+ export declare const CheckListItem: (props: CheckListItemProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
165
+ export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
166
+ locale?: "en" | "zh-cn";
167
+ };
168
+ export declare const ConfigProviderWrapper: (props: ConfigProviderWrapperProps) => JSX.Element;
137
169
  export type CssHoverProps = {
138
170
  children: ReactElement;
139
171
  } & Pick<CommonPropsWithChildren<{
@@ -1040,6 +1072,16 @@ export type GapProps = {
1040
1072
  * @returns
1041
1073
  */
1042
1074
  export declare const Gap: (props: GapProps) => JSX.Element;
1075
+ export declare const useArrayChange: <T>(dataList: T[], forceUpdate?: boolean) => readonly [
1076
+ T[],
1077
+ {
1078
+ add: (dataItem: T | T[], isUnshift?: boolean) => void;
1079
+ update: (index: number, dataItem: T) => void;
1080
+ delete: (index: number) => T[];
1081
+ resetList: (dataList: T[]) => void;
1082
+ getList: () => T[];
1083
+ }
1084
+ ];
1043
1085
  export declare const useEffectCustom: (fn: EffectCallback, deps: DependencyList) => void;
1044
1086
  export declare const useEffectCustomAsync: (fn: () => Promise<void>, deps: DependencyList) => void;
1045
1087
  export type ShouldUpdateFunc<T> = (prev: T | undefined, next: T) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.0.17",
3
+ "version": "4.0.18",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",