@flatbiz/antd 3.0.2 → 3.0.4
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 +26 -5
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +76 -2
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const ButtonOperate: FC<ButtonOperateProps>;
|
|
|
42
42
|
export declare type TAny = any;
|
|
43
43
|
export declare type TPlainObject<T = TAny> = Record<string, T>;
|
|
44
44
|
export declare type TNoopDefine = () => void;
|
|
45
|
+
export declare type DateFormatType = "YYYY-MM" | "YYYY-MM-DD" | "YYYY-MM-DD hh:mm" | "YYYY-MM-DD hh:mm:ss" | "MM-DD" | "YYYY/MM" | "YYYY/MM/DD" | "YYYY/MM/DD hh:mm" | "YYYY/MM/DD hh:mm:ss" | "MM/DD" | "YYYY.MM" | "YYYY.MM.DD" | "YYYY.MM.DD hh:mm" | "YYYY.MM.DD hh:mm:ss" | "MM.DD" | "YYYY\u5E74MM\u6708" | "YYYY\u5E74MM\u6708DD\u65E5" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm" | "YYYY\u5E74MM\u6708DD\u65E5 hh:mm:ss" | "MM\u6708DD\u65E5" | "hh:mm" | "hh:mm:ss" | "YYYYMM" | "YYYYMMDD" | "YYYYMMDD hh:mm" | "YYYYMMDD hh:mm:ss";
|
|
45
46
|
export declare type RequestStatus = "request-init" | "request-progress" | "request-success" | "request-error";
|
|
46
47
|
export declare type RequestStatusRenderProps = {
|
|
47
48
|
status?: RequestStatus;
|
|
@@ -421,7 +422,7 @@ export declare type SelectorServiceConfig = {
|
|
|
421
422
|
*/
|
|
422
423
|
onRequestResultAdapter?: (respData: any) => TPlainObject[];
|
|
423
424
|
};
|
|
424
|
-
export declare type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "onSearch" | "
|
|
425
|
+
export declare type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "onSearch" | "notFoundContent" | "options" | "fieldNames" | "onChange" | "value"> & {
|
|
425
426
|
modelKey: string;
|
|
426
427
|
fieldNames?: {
|
|
427
428
|
label: string;
|
|
@@ -517,7 +518,7 @@ export declare type SelectorWrapperRefApi = {
|
|
|
517
518
|
* 2. operateType=search状态下,外部传递 selectorValueList 回填数据查询接口时,会在接口中默认添加searchId字段(searchId的值为回填的selectorValueList,类型有:string | number | Array<string | number>)
|
|
518
519
|
* ```
|
|
519
520
|
*/
|
|
520
|
-
export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<Omit<SelectProps<any, import("rc-select/lib/Select").DefaultOptionType>, "value" | "
|
|
521
|
+
export declare const SelectorWrapper: import("react").ForwardRefExoticComponent<Omit<SelectProps<any, import("rc-select/lib/Select").DefaultOptionType>, "value" | "options" | "onChange" | "filterOption" | "notFoundContent" | "onSearch" | "fieldNames"> & {
|
|
521
522
|
modelKey: string;
|
|
522
523
|
fieldNames?: {
|
|
523
524
|
label: string;
|
|
@@ -762,6 +763,10 @@ export declare type fieldConfigFunctionParams = {
|
|
|
762
763
|
export declare type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
|
|
763
764
|
dataIndex?: string;
|
|
764
765
|
fieldConfig?: FieldSingleConfig | FormListConfig | ((data: fieldConfigFunctionParams) => FieldSingleConfig | FormListConfig);
|
|
766
|
+
/** 隐藏域字段 */
|
|
767
|
+
hiddenField?: {
|
|
768
|
+
dataIndex: string;
|
|
769
|
+
};
|
|
765
770
|
/**
|
|
766
771
|
* 渲染中间件,如果renderMiddleware返回值为ReactElement格式,则会终止后续逻辑,fieldConfig配置将失效
|
|
767
772
|
* ```
|
|
@@ -797,10 +802,13 @@ export declare type EditableTableProps = {
|
|
|
797
802
|
rules?: FormListProps["rules"];
|
|
798
803
|
};
|
|
799
804
|
export declare const EditableTable: (props: EditableTableProps) => JSX.Element;
|
|
805
|
+
export declare type varStyles = "--fa-color-primary" | "--fa-color-secondary" | "--fa-color-warning" | "--fa-color-danger" | "--fa-color-success" | "--editor-card-bgcolor";
|
|
800
806
|
export declare type EditorWrapperProps = {
|
|
801
807
|
onChange: (data?: string) => void;
|
|
802
808
|
value?: string;
|
|
809
|
+
editorInitParams?: TPlainObject;
|
|
803
810
|
editorProps?: TPlainObject;
|
|
811
|
+
varStyle?: Record<varStyles, CSSProperties["color"]>;
|
|
804
812
|
};
|
|
805
813
|
/**
|
|
806
814
|
* 富文本编辑器,配置参考tinymce
|
|
@@ -1222,6 +1230,7 @@ export declare type SimpleLayoutProps = {
|
|
|
1222
1230
|
/** 优先级大于 style width */
|
|
1223
1231
|
width?: CSSProperties["width"];
|
|
1224
1232
|
children?: ReactNode | ReactNode[];
|
|
1233
|
+
titleExtra?: string | ReactElement;
|
|
1225
1234
|
};
|
|
1226
1235
|
/**
|
|
1227
1236
|
* 简单布局
|
|
@@ -1253,6 +1262,71 @@ export interface SmsCountDownProps {
|
|
|
1253
1262
|
className?: string;
|
|
1254
1263
|
}
|
|
1255
1264
|
export declare const SmsCountDown: FC<SmsCountDownProps>;
|
|
1265
|
+
export declare type TTableColumnTagRenderOptions = Record<string | number, {
|
|
1266
|
+
color: CSSProperties["color"];
|
|
1267
|
+
text: string;
|
|
1268
|
+
}>;
|
|
1269
|
+
export declare const tableCellRender: {
|
|
1270
|
+
/**
|
|
1271
|
+
* 表格列分页计数
|
|
1272
|
+
*/
|
|
1273
|
+
indexCell: (options: {
|
|
1274
|
+
pageSize: number;
|
|
1275
|
+
pageNo: number;
|
|
1276
|
+
}) => (_value: string | number, _record: TPlainObject, index: number) => number;
|
|
1277
|
+
/**
|
|
1278
|
+
* 表格日期格式数据渲染,默认格式:YYYY-MM-DD
|
|
1279
|
+
* ```
|
|
1280
|
+
* dateFormatType: 日期格式
|
|
1281
|
+
* ```
|
|
1282
|
+
*/
|
|
1283
|
+
dateCell: (options?: {
|
|
1284
|
+
dateFormatType: DateFormatType;
|
|
1285
|
+
}) => (value: string | number, _record: TPlainObject, _index: number) => string | number;
|
|
1286
|
+
/**
|
|
1287
|
+
* table操作栏目渲染
|
|
1288
|
+
* ```
|
|
1289
|
+
* 使用方式
|
|
1290
|
+
* tableCellRender.operateCell((item) => ({
|
|
1291
|
+
* operateList: [
|
|
1292
|
+
* {
|
|
1293
|
+
* text: '编辑',
|
|
1294
|
+
* onClick: onItemOperate.bind(null, 'update', item),
|
|
1295
|
+
* permission: SystemAdminPermissionEnum.system_admin_edit,
|
|
1296
|
+
* },
|
|
1297
|
+
* {
|
|
1298
|
+
* text: '删除',
|
|
1299
|
+
* needConfirm: true,
|
|
1300
|
+
* confirmMessage: '确定要删除吗?',
|
|
1301
|
+
* onClick: onItemOperate.bind(null, 'delete', item),
|
|
1302
|
+
* permission: SystemAdminPermissionEnum.system_admin_delete,
|
|
1303
|
+
* },
|
|
1304
|
+
* ],
|
|
1305
|
+
* }))
|
|
1306
|
+
* ```
|
|
1307
|
+
*/
|
|
1308
|
+
operateCell: (options: (item: TAny) => ButtonOperateProps) => (_value: string | number, record: TPlainObject, _index: number) => JSX.Element;
|
|
1309
|
+
/**
|
|
1310
|
+
* table Tag 效果
|
|
1311
|
+
* ```
|
|
1312
|
+
* 使用方式
|
|
1313
|
+
* tableCellRender.tagCell({
|
|
1314
|
+
* '1': { color: '#108ee9', text: '已开启' },
|
|
1315
|
+
* '0': { color: '#ff4d4f', text: '已关闭' },
|
|
1316
|
+
* })
|
|
1317
|
+
* ```
|
|
1318
|
+
* */
|
|
1319
|
+
tagCell: (options: TTableColumnTagRenderOptions) => (value: string | number, _record: TAny, _index: number) => JSX.Element;
|
|
1320
|
+
/**
|
|
1321
|
+
* 实现字段超出隐藏,默认长度20个【字节】
|
|
1322
|
+
* ```
|
|
1323
|
+
* showMaxNumber: 显示最大【字节】长度
|
|
1324
|
+
* ```
|
|
1325
|
+
*/
|
|
1326
|
+
tooltipCell: (options?: {
|
|
1327
|
+
showMaxNumber?: number;
|
|
1328
|
+
}) => (value: string | number, _record: TAny, _index: number) => string | JSX.Element | undefined;
|
|
1329
|
+
};
|
|
1256
1330
|
export declare type TreeSelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
|
|
1257
1331
|
export declare type TreeSelectorServiceConfig = {
|
|
1258
1332
|
params?: TPlainObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
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.4",
|
|
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": "9667b4dd41d502e2bdd5db10e6415dd8ece8813d"
|
|
57
57
|
}
|