szld-libs 0.0.1

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.
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ interface BackHeaderProps {
3
+ isBack?: boolean;
4
+ title: string | ReactNode;
5
+ subTitle?: string | ReactNode;
6
+ extra?: ReactNode;
7
+ className?: string;
8
+ }
9
+ declare const BackHeader: (props: BackHeaderProps) => JSX.Element;
10
+ export default BackHeader;
@@ -0,0 +1,41 @@
1
+ import { FormProps, FormItemProps, ColProps, RowProps, InputProps, SelectProps, InputNumberProps, RadioGroupProps, SwitchProps, TimePickerProps, ButtonProps, CascaderProps } from "antd";
2
+ import { DefaultOptionType } from "antd/es/cascader";
3
+ import { CheckboxGroupProps } from "antd/es/checkbox";
4
+ import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
5
+ import { TextAreaProps } from "antd/es/input";
6
+ import { ReactNode } from "react";
7
+ import { UploadFileProps } from "../Upload";
8
+ type ValueType = "rangePicker" | "select" | "input" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "btns";
9
+ interface ValueBtnProps extends ButtonProps {
10
+ title: string;
11
+ btnType: "submit" | "reset" | "cancel";
12
+ }
13
+ interface ValueModalProps {
14
+ onClear?: () => void;
15
+ onToggle: (bol: boolean) => void;
16
+ placeholder?: string;
17
+ labelKey: string;
18
+ value?: any;
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;
21
+ export interface CreateFormItemProps<T> {
22
+ formItemProps?: FormItemProps;
23
+ valueType?: T;
24
+ valueProps?: ValueProps<T>;
25
+ colProps?: ColProps;
26
+ dataIndex: string;
27
+ title?: string;
28
+ onChange?: (e: any) => void;
29
+ hidden?: boolean;
30
+ readonly?: boolean;
31
+ value?: string | ReactNode;
32
+ }
33
+ export interface CreateFormProps {
34
+ items: CreateFormItemProps<ValueType>[];
35
+ rowProps?: RowProps;
36
+ formProps?: FormProps;
37
+ readonly?: boolean;
38
+ hiddenTitle?: boolean;
39
+ }
40
+ declare const CreateForm: (props: CreateFormProps) => JSX.Element;
41
+ export default CreateForm;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import * as echarts from 'echarts/core';
3
+ import { BarSeriesOption, LineSeriesOption } from 'echarts/charts';
4
+ import { TitleComponentOption, TooltipComponentOption, GridComponentOption, DatasetComponentOption } from 'echarts/components';
5
+ type ECOption = echarts.ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | TooltipComponentOption | GridComponentOption | DatasetComponentOption>;
6
+ export interface EchartsProps {
7
+ option: ECOption;
8
+ }
9
+ /**
10
+ * @param props : EchartsProps 传入图标配置项
11
+ * 外部包裹一层dom元素定义width和height,内部自动占满
12
+ */
13
+ declare const Echarts: (props: EchartsProps) => JSX.Element;
14
+ export default Echarts;
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { InputProps, SelectProps, TableProps } from 'antd';
3
+ import { Rule } from 'antd/es/form';
4
+ import { TextAreaProps } from 'antd/es/input';
5
+ import { ColumnType } from 'antd/es/table';
6
+ type FormItemType = 'input' | 'select' | 'textarea';
7
+ export type ColumnsType<RecordType> = ColumnType<RecordType> & {
8
+ editable?: boolean;
9
+ rules?: Rule[];
10
+ type?: FormItemType;
11
+ selectProps?: SelectProps;
12
+ inputProps?: InputProps;
13
+ textareaProps?: TextAreaProps;
14
+ };
15
+ export interface EditTableProps<RecordType> extends Omit<TableProps<RecordType>, 'columns'> {
16
+ columns: ColumnsType<RecordType>[];
17
+ handleSave: (row: RecordType) => void;
18
+ }
19
+ declare function EditTable<DataType extends object = any>(props: EditTableProps<DataType>): JSX.Element;
20
+ export default EditTable;
@@ -0,0 +1,4 @@
1
+ declare const Loading: () => {
2
+ close: () => void;
3
+ };
4
+ export default Loading;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { TableProps } from 'antd';
3
+ import { CreateFormProps } from '../CreateForm';
4
+ export interface SearchTableProps<RecordType> {
5
+ searchProps?: CreateFormProps;
6
+ tableProps?: TableProps<RecordType>;
7
+ }
8
+ declare function SearchTable<RecordType extends object = any>(props: SearchTableProps<RecordType>): JSX.Element;
9
+ export default SearchTable;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { UploadProps } from "antd";
3
+ export interface UploadFileProps extends UploadProps {
4
+ maxSize?: number;
5
+ }
6
+ declare const UploadFile: (props: UploadFileProps) => JSX.Element;
7
+ export default UploadFile;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { EditTableProps } from '../EditTable';
3
+ declare function VirtualTable<DataType extends object = any>(props: EditTableProps<DataType>): JSX.Element;
4
+ export default VirtualTable;
@@ -0,0 +1,6 @@
1
+ interface WorkFlowNodeProps {
2
+ data: any[];
3
+ current: string;
4
+ }
5
+ declare const showWorkFlow: (props: WorkFlowNodeProps) => null;
6
+ export default showWorkFlow;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const NoPermissions: () => JSX.Element;
3
+ export default NoPermissions;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const NotFound: () => JSX.Element;
3
+ export default NotFound;
@@ -0,0 +1,10 @@
1
+ import BackHeader from "./components/BackHeader";
2
+ import CreateForm from "./components/CreateForm";
3
+ import SearchTable from "./components/SearchTable";
4
+ import UploadFile from "./components/Upload";
5
+ import showWorkFlow from "./components/WorkFlowNode";
6
+ import * as download from "./utils/download";
7
+ import * as fileType from "./utils/filetype";
8
+ import * as verfyCode from "./utils/verify-code";
9
+ import * as utils from "./utils/index";
10
+ export { BackHeader, CreateForm, SearchTable, UploadFile, showWorkFlow, download, fileType, verfyCode, utils, };
@@ -0,0 +1,3 @@
1
+ declare const downloadUrl: (url: string, filename?: string) => void;
2
+ declare const downloadBlob: (blob: Blob, fileName: string) => void;
3
+ export { downloadUrl, downloadBlob };
@@ -0,0 +1,18 @@
1
+ export declare enum FileType {
2
+ zip = "application/zip",
3
+ png = "image/png",
4
+ jpg = "image/jpg",
5
+ jpeg = "image/jpeg",
6
+ pdf = "application/pdf",
7
+ doc = "application/msword",
8
+ docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9
+ pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
10
+ ppt = "application/vnd.ms-powerpoint",
11
+ xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
12
+ xls = "application/vnd.ms-excel",
13
+ txt = "text/plain",
14
+ csv = "text/csv",
15
+ svg = "image/svg+xml"
16
+ }
17
+ declare const FileTypeMap: Map<string, FileType>;
18
+ export { FileTypeMap };
@@ -0,0 +1,11 @@
1
+ export declare const filterObject: (object: any) => any;
2
+ export declare const getBase64: (file: File) => Promise<string>;
3
+ export declare const getFileType: (name: string | undefined) => string | undefined;
4
+ export declare const setLocalStorage: (key: string, value: any) => void;
5
+ export declare const getLocalStorage: (key: string) => any;
6
+ export declare const removeLocalStorage: (key: string) => void;
7
+ export declare const setSessionStorage: (key: string, value: any) => void;
8
+ export declare const getSessionStorage: (key: string) => any;
9
+ export declare const removeSessionStorage: (key: string) => void;
10
+ export declare const arrayDeduplication: (key: string, arr: any[]) => any[];
11
+ export declare const JSONParse: (value: string) => any;
@@ -0,0 +1,27 @@
1
+ interface optionInter {
2
+ id: string;
3
+ canvasId: string;
4
+ width: number;
5
+ height: number;
6
+ type: string;
7
+ code: string;
8
+ [key: string]: any;
9
+ }
10
+ export declare class getGVerify {
11
+ options: optionInter;
12
+ constructor(options: optionInter);
13
+ GVerify(): void;
14
+ /**初始化方法**/
15
+ _init(): void;
16
+ /**生成验证码**/
17
+ refresh(): void;
18
+ /**验证验证码**/
19
+ validate(code: string): boolean;
20
+ /**生成字母数组**/
21
+ getAllLetter(): string[];
22
+ /**生成一个随机数**/
23
+ randomNum(min: number, max: number): number;
24
+ /**生成一个随机色**/
25
+ randomColor(min: number, max: number): string;
26
+ }
27
+ export {};