@flatbiz/antd 3.0.4 → 3.0.6
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/cjs/index.css +14 -0
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +66 -6
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export interface ButtonOperateProps {
|
|
|
39
39
|
className?: string;
|
|
40
40
|
}
|
|
41
41
|
export declare const ButtonOperate: FC<ButtonOperateProps>;
|
|
42
|
+
export declare type LabelValueItem<T extends string | number = string | number> = {
|
|
43
|
+
value: T;
|
|
44
|
+
label: string;
|
|
45
|
+
};
|
|
42
46
|
export declare type TAny = any;
|
|
43
47
|
export declare type TPlainObject<T = TAny> = Record<string, T>;
|
|
44
48
|
export declare type TNoopDefine = () => void;
|
|
@@ -102,6 +106,27 @@ export declare const CascaderWrapper: import("react").ForwardRefExoticComponent<
|
|
|
102
106
|
onChange?: ((value: string | number, selectedList: TPlainObject[]) => void) | undefined;
|
|
103
107
|
requestMessageConfig?: RequestStatusRenderProps["messageConfig"];
|
|
104
108
|
} & import("react").RefAttributes<CascaderWrapperRefApi>>;
|
|
109
|
+
export interface CommonPropsWithChildren<S extends TPlainObject = TPlainObject> {
|
|
110
|
+
className?: string;
|
|
111
|
+
style?: CSSProperties & Partial<S>;
|
|
112
|
+
children?: ReactNode | undefined;
|
|
113
|
+
}
|
|
114
|
+
export declare type CssHoverProps = {
|
|
115
|
+
children: ReactElement;
|
|
116
|
+
} & Pick<CommonPropsWithChildren<{
|
|
117
|
+
"--v-css-hover-bgcolor": CSSProperties["backgroundColor"];
|
|
118
|
+
"--v-css-hover-opacity": CSSProperties["opacity"];
|
|
119
|
+
}>, "style" | "children">;
|
|
120
|
+
/**
|
|
121
|
+
* css hover 效果
|
|
122
|
+
* ```
|
|
123
|
+
* 1. 当children为数组时,会为children添加父级(会产生新节点)
|
|
124
|
+
* 2. 当children为单个元素时,会在children元素上添加className、style(不会产生新节点)
|
|
125
|
+
* ```
|
|
126
|
+
* @param props
|
|
127
|
+
* @returns
|
|
128
|
+
*/
|
|
129
|
+
export declare const CssNodeHover: (props: CssHoverProps) => JSX.Element;
|
|
105
130
|
export declare type DatePickerWrapperProps = Omit<PickerDateProps<moment.Moment>, "value" | "onChange"> & {
|
|
106
131
|
value?: string;
|
|
107
132
|
onChange?: (value?: string) => void;
|
|
@@ -175,6 +200,10 @@ export declare type DateRangePickerWrapperFormItemProps = Omit<FormItemProps, "n
|
|
|
175
200
|
};
|
|
176
201
|
/**
|
|
177
202
|
* 包含了Form.Item组件的时间区间选择组件
|
|
203
|
+
* ```
|
|
204
|
+
* 1. 时间区间组件可以定义成两个字段操作,不用再通过数组处理
|
|
205
|
+
* 2. 会在form中产生一个 `__#invalid_date_xxxx_xxxx` 的无效字段,可以直接忽略
|
|
206
|
+
* ```
|
|
178
207
|
*/
|
|
179
208
|
export declare const DateRangePickerWrapperFormItem: (props: DateRangePickerWrapperFormItemProps) => JSX.Element;
|
|
180
209
|
export declare type DialogDrawerProps = Omit<DrawerProps, "onOk" | "onCancel" | "getContainer" | "visible" | "open"> & {
|
|
@@ -309,6 +338,7 @@ export declare type DrawerFormProps = {
|
|
|
309
338
|
} & DrawerProps;
|
|
310
339
|
/**
|
|
311
340
|
* 弹窗机制
|
|
341
|
+
* @deprecated 请使用【dialogDrawer】组件替换
|
|
312
342
|
* ```
|
|
313
343
|
* 1. 默认 destroyOnClose = true
|
|
314
344
|
* 2. 默认 forceRender = false
|
|
@@ -809,6 +839,7 @@ export declare type EditorWrapperProps = {
|
|
|
809
839
|
editorInitParams?: TPlainObject;
|
|
810
840
|
editorProps?: TPlainObject;
|
|
811
841
|
varStyle?: Record<varStyles, CSSProperties["color"]>;
|
|
842
|
+
height?: number | string;
|
|
812
843
|
};
|
|
813
844
|
/**
|
|
814
845
|
* 富文本编辑器,配置参考tinymce
|
|
@@ -858,6 +889,7 @@ export declare type FileUploadProps = {
|
|
|
858
889
|
} & Omit<UploadProps, "onChange" | "fileList" | "onPreview">;
|
|
859
890
|
/**
|
|
860
891
|
* 文件上传,结合Form使用最佳
|
|
892
|
+
* @deprecated 请使用【UploadWrapper】组件替换
|
|
861
893
|
* ```
|
|
862
894
|
* 接口返回结构:
|
|
863
895
|
* formData上传接口必须返回fileKey值
|
|
@@ -1084,7 +1116,7 @@ export declare type ModalFormProps = {
|
|
|
1084
1116
|
* ```
|
|
1085
1117
|
* 1. 默认 destroyOnClose = true
|
|
1086
1118
|
* 2. 默认 forceRender = false
|
|
1087
|
-
* @deprecated
|
|
1119
|
+
* @deprecated 请使用【dialogModal】组件替换
|
|
1088
1120
|
* ```
|
|
1089
1121
|
*/
|
|
1090
1122
|
export declare const ModalWraper: (props: ModalFormProps) => JSX.Element;
|
|
@@ -1264,7 +1296,7 @@ export interface SmsCountDownProps {
|
|
|
1264
1296
|
export declare const SmsCountDown: FC<SmsCountDownProps>;
|
|
1265
1297
|
export declare type TTableColumnTagRenderOptions = Record<string | number, {
|
|
1266
1298
|
color: CSSProperties["color"];
|
|
1267
|
-
|
|
1299
|
+
label: string;
|
|
1268
1300
|
}>;
|
|
1269
1301
|
export declare const tableCellRender: {
|
|
1270
1302
|
/**
|
|
@@ -1282,7 +1314,7 @@ export declare const tableCellRender: {
|
|
|
1282
1314
|
*/
|
|
1283
1315
|
dateCell: (options?: {
|
|
1284
1316
|
dateFormatType: DateFormatType;
|
|
1285
|
-
}) => (value: string | number
|
|
1317
|
+
}) => (value: string | number) => string | number;
|
|
1286
1318
|
/**
|
|
1287
1319
|
* table操作栏目渲染
|
|
1288
1320
|
* ```
|
|
@@ -1305,7 +1337,7 @@ export declare const tableCellRender: {
|
|
|
1305
1337
|
* }))
|
|
1306
1338
|
* ```
|
|
1307
1339
|
*/
|
|
1308
|
-
operateCell: (options: (item:
|
|
1340
|
+
operateCell: (options: (item: TPlainObject) => ButtonOperateProps) => (_value: string | number, record: TPlainObject, _index: number) => JSX.Element;
|
|
1309
1341
|
/**
|
|
1310
1342
|
* table Tag 效果
|
|
1311
1343
|
* ```
|
|
@@ -1316,7 +1348,7 @@ export declare const tableCellRender: {
|
|
|
1316
1348
|
* })
|
|
1317
1349
|
* ```
|
|
1318
1350
|
* */
|
|
1319
|
-
tagCell: (options: TTableColumnTagRenderOptions) => (value: string | number
|
|
1351
|
+
tagCell: (options: TTableColumnTagRenderOptions) => (value: string | number) => string | number | JSX.Element;
|
|
1320
1352
|
/**
|
|
1321
1353
|
* 实现字段超出隐藏,默认长度20个【字节】
|
|
1322
1354
|
* ```
|
|
@@ -1325,7 +1357,35 @@ export declare const tableCellRender: {
|
|
|
1325
1357
|
*/
|
|
1326
1358
|
tooltipCell: (options?: {
|
|
1327
1359
|
showMaxNumber?: number;
|
|
1328
|
-
}) => (value: string | number
|
|
1360
|
+
}) => (value: string | number) => string | JSX.Element | undefined;
|
|
1361
|
+
/**
|
|
1362
|
+
* ```
|
|
1363
|
+
* 使用方式
|
|
1364
|
+
* tableCellRender.selectorListCell({
|
|
1365
|
+
* selectorList:[{ label: '已开启', value: 1 }]
|
|
1366
|
+
* })
|
|
1367
|
+
* ```
|
|
1368
|
+
*/
|
|
1369
|
+
selectorListCell: (options: {
|
|
1370
|
+
selectorList: LabelValueItem[];
|
|
1371
|
+
tagConfig?: Record<string | number, {
|
|
1372
|
+
color: string;
|
|
1373
|
+
}>;
|
|
1374
|
+
}) => (value: string | number) => any;
|
|
1375
|
+
/**
|
|
1376
|
+
*```
|
|
1377
|
+
使用方式
|
|
1378
|
+
* tableCellRender.selectorListCell({
|
|
1379
|
+
* selectorMap: { 1: '已开启', 0: '已关闭' }
|
|
1380
|
+
* })
|
|
1381
|
+
* ```
|
|
1382
|
+
*/
|
|
1383
|
+
selectorMapCell: (options: {
|
|
1384
|
+
selectorMap: Record<string | number, string>;
|
|
1385
|
+
tagConfig?: Record<string | number, {
|
|
1386
|
+
color: string;
|
|
1387
|
+
}>;
|
|
1388
|
+
}) => (value: string | number) => string | JSX.Element;
|
|
1329
1389
|
};
|
|
1330
1390
|
export declare type TreeSelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
|
|
1331
1391
|
export declare type TreeSelectorServiceConfig = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@dimjs/model": "^1.1.8",
|
|
46
46
|
"@dimjs/model-react": "^1.1.8",
|
|
47
47
|
"@dimjs/utils": "^1.2.23",
|
|
48
|
-
"@flatbiz/utils": "^3.0.
|
|
48
|
+
"@flatbiz/utils": "^3.0.6",
|
|
49
49
|
"@wove/react": "^1.2.21",
|
|
50
50
|
"antd": "4.22.2",
|
|
51
51
|
"dequal": "^2.0.3",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"react": "18.2.0",
|
|
54
54
|
"react-dom": "18.2.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "dd633323c4c4449637999ef74a61fe50473ea664"
|
|
57
57
|
}
|