szld-libs 0.0.4 → 0.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/@types/components/CreateForm/index.d.ts +10 -3
- package/@types/components/EditTable/index.d.ts +8 -11
- package/@types/components/VirtualTable/index.d.ts +1 -1
- package/@types/components/WorkFlowNode/index.d.ts +4 -1
- package/@types/index.d.ts +1 -0
- package/dist/index.js +5458 -5432
- package/dist/index.umd.cjs +42 -42
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@ import { DefaultOptionType } from "antd/es/cascader";
|
|
|
3
3
|
import { CheckboxGroupProps } from "antd/es/checkbox";
|
|
4
4
|
import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
|
|
5
5
|
import { TextAreaProps } from "antd/es/input";
|
|
6
|
-
import { ReactNode } from "react";
|
|
6
|
+
import React, { ReactNode } from "react";
|
|
7
7
|
import { UploadFileProps } from "../Upload";
|
|
8
|
-
type ValueType = "rangePicker" | "select" | "input" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "btns";
|
|
8
|
+
export type ValueType = "rangePicker" | "select" | "input" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "btns";
|
|
9
9
|
interface ValueBtnProps extends ButtonProps {
|
|
10
10
|
title: string;
|
|
11
11
|
btnType: "submit" | "reset" | "cancel";
|
|
@@ -17,7 +17,7 @@ interface ValueModalProps {
|
|
|
17
17
|
labelKey: string;
|
|
18
18
|
value?: any;
|
|
19
19
|
}
|
|
20
|
-
type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : InputProps;
|
|
20
|
+
export type ValueProps<T> = T extends "checkbox" ? CheckboxGroupProps : T extends "select" ? SelectProps : T extends "inputNumber" ? InputNumberProps : T extends "textarea" ? TextAreaProps : T extends "radio" ? RadioGroupProps : T extends "switch" ? SwitchProps : T extends "rangePicker" ? RangePickerProps : T extends "datePicker" ? DatePickerProps : T extends "timePicker" ? TimePickerProps : T extends "input" ? InputProps : T extends "cascader" ? CascaderProps<DefaultOptionType> : T extends "upload" ? UploadFileProps : T extends "modal" ? ValueModalProps : T extends "btns" ? ValueBtnProps[] : InputProps;
|
|
21
21
|
export interface CreateFormItemProps<T> {
|
|
22
22
|
formItemProps?: FormItemProps;
|
|
23
23
|
valueType?: T;
|
|
@@ -38,4 +38,11 @@ export interface CreateFormProps {
|
|
|
38
38
|
hiddenTitle?: boolean;
|
|
39
39
|
}
|
|
40
40
|
declare const CreateForm: (props: CreateFormProps) => JSX.Element;
|
|
41
|
+
interface FormFieldsProps extends Pick<CreateFormItemProps<ValueType>, "valueType" | "valueProps"> {
|
|
42
|
+
onChange?: (e: any) => void;
|
|
43
|
+
value?: any;
|
|
44
|
+
onBtnClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>, item: ValueBtnProps) => void;
|
|
45
|
+
inputRef?: any;
|
|
46
|
+
}
|
|
47
|
+
export declare const FormFields: (props: FormFieldsProps) => React.FunctionComponentElement<any>;
|
|
41
48
|
export default CreateForm;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { Rule } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
type FormItemType = 'input' | 'select' | 'textarea';
|
|
2
|
+
import { TableProps } from "antd";
|
|
3
|
+
import { Rule } from "antd/es/form";
|
|
4
|
+
import { ColumnType } from "antd/es/table";
|
|
5
|
+
import { ValueProps, ValueType } from "../CreateForm";
|
|
7
6
|
export type ColumnsType<RecordType> = ColumnType<RecordType> & {
|
|
8
7
|
editable?: boolean;
|
|
9
8
|
rules?: Rule[];
|
|
10
|
-
type?:
|
|
11
|
-
|
|
12
|
-
inputProps?: InputProps;
|
|
13
|
-
textareaProps?: TextAreaProps;
|
|
9
|
+
type?: ValueType;
|
|
10
|
+
valueProps?: ValueProps<RecordType>;
|
|
14
11
|
};
|
|
15
|
-
export interface EditTableProps<RecordType> extends Omit<TableProps<RecordType>,
|
|
12
|
+
export interface EditTableProps<RecordType> extends Omit<TableProps<RecordType>, "columns" | "onChange"> {
|
|
16
13
|
columns: ColumnsType<RecordType>[];
|
|
17
|
-
|
|
14
|
+
onChange?: (row: RecordType) => void;
|
|
18
15
|
}
|
|
19
16
|
declare function EditTable<DataType extends object = any>(props: EditTableProps<DataType>): JSX.Element;
|
|
20
17
|
export default EditTable;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ModalFuncProps } from "antd";
|
|
1
2
|
interface WorkFlowNodeProps {
|
|
2
3
|
data: any[];
|
|
3
4
|
current: string;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
+
interface showWorkFlow extends WorkFlowNodeProps, ModalFuncProps {
|
|
7
|
+
}
|
|
8
|
+
declare const showWorkFlow: (props: showWorkFlow) => null;
|
|
6
9
|
export default showWorkFlow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|