@lm_fe/components 0.1.201
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/README.md +47 -0
- package/dist/ContainerDimensions/index.d.ts +10 -0
- package/dist/ContainerDimensions2/index.d.ts +10 -0
- package/dist/GlobalModal/index.d.ts +7 -0
- package/dist/GlobalModal/utils.d.ts +65 -0
- package/dist/LazyAntd/AutoComplete/Inner.d.ts +4 -0
- package/dist/LazyAntd/AutoComplete/index.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +3 -0
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +11 -0
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +12 -0
- package/dist/LazyAntd/DatePicker/Base/props.d.ts +14 -0
- package/dist/LazyAntd/DatePicker/Calendar.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/DatePicker.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/TimePicker.d.ts +4 -0
- package/dist/LazyAntd/DatePicker/index.d.ts +5 -0
- package/dist/LazyAntd/Dropdown/Button.d.ts +2 -0
- package/dist/LazyAntd/Dropdown/Inner.d.ts +3 -0
- package/dist/LazyAntd/Dropdown/index.d.ts +10 -0
- package/dist/LazyAntd/Form/FormItemInner.d.ts +2 -0
- package/dist/LazyAntd/Form/Inner.d.ts +3 -0
- package/dist/LazyAntd/Form/index.d.ts +9 -0
- package/dist/LazyAntd/Modal/Inner.d.ts +4 -0
- package/dist/LazyAntd/Modal/index.d.ts +3 -0
- package/dist/LazyAntd/Pagination/Inner.d.ts +3 -0
- package/dist/LazyAntd/Pagination/index.d.ts +3 -0
- package/dist/LazyAntd/Select/Inner.d.ts +3 -0
- package/dist/LazyAntd/Select/OptionInner.d.ts +2 -0
- package/dist/LazyAntd/Select/index.d.ts +10 -0
- package/dist/LazyAntd/Table/Inner.d.ts +3 -0
- package/dist/LazyAntd/Table/index.d.ts +3 -0
- package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +3 -0
- package/dist/LazyAntd/Tree/Inner.d.ts +3 -0
- package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +4 -0
- package/dist/LazyAntd/Tree/index.d.ts +12 -0
- package/dist/LazyAntd/TreeSelect/Inner.d.ts +3 -0
- package/dist/LazyAntd/TreeSelect/index.d.ts +3 -0
- package/dist/LazyAntd/index.d.ts +25 -0
- package/dist/Monaco/Inner.d.ts +12 -0
- package/dist/Monaco/index.d.ts +1 -0
- package/dist/MyAddress/Inner.d.ts +3 -0
- package/dist/MyAddress/Old/InnerOld.d.ts +3 -0
- package/dist/MyAddress/Old/index.d.ts +3 -0
- package/dist/MyAddress/Old/options.d.ts +25 -0
- package/dist/MyAddress/index.d.ts +6 -0
- package/dist/MyAddress/type.d.ts +16 -0
- package/dist/MyAddress/utils.d.ts +6 -0
- package/dist/MyImageEditor/Inner.d.ts +4 -0
- package/dist/MyImageEditor/index.d.ts +16 -0
- package/dist/MyImageEditor/init_delete_control.d.ts +1 -0
- package/dist/MyImageEditor/utils.d.ts +36 -0
- package/dist/MyInput/index.d.ts +5 -0
- package/dist/MyInput/types.d.ts +9 -0
- package/dist/MyLazyComponent/index.d.ts +6 -0
- package/dist/PDF_Frame_View/Inner.d.ts +3 -0
- package/dist/PDF_Frame_View/index.d.ts +5 -0
- package/dist/PDF_Frame_View/types.d.ts +32 -0
- package/dist/PDF_Frame_View/utils.d.ts +9 -0
- package/dist/QRCode/Inner.d.ts +3 -0
- package/dist/QRCode/index.d.ts +2 -0
- package/dist/QRCode/types.d.ts +68 -0
- package/dist/SimpleForm/components/TabForm/index.d.ts +14 -0
- package/dist/SimpleForm/components/extra/Custom.d.ts +7 -0
- package/dist/SimpleForm/components/extra/MultiInput.d.ts +6 -0
- package/dist/SimpleForm/components/extra/SimpleSelect.d.ts +6 -0
- package/dist/SimpleForm/components/extra/SwitchSelect.d.ts +4 -0
- package/dist/SimpleForm/components/index.d.ts +37 -0
- package/dist/SimpleForm/index.d.ts +38 -0
- package/dist/SimpleForm/types/help.d.ts +3 -0
- package/dist/SimpleForm/types/metaTypes.d.ts +29 -0
- package/dist/a_chunks/.root.js +805 -0
- package/dist/a_chunks/.root.js.map +1 -0
- package/dist/a_chunks/.root10.js +8 -0
- package/dist/a_chunks/.root10.js.map +1 -0
- package/dist/a_chunks/.root11.js +7 -0
- package/dist/a_chunks/.root11.js.map +1 -0
- package/dist/a_chunks/.root12.js +8 -0
- package/dist/a_chunks/.root12.js.map +1 -0
- package/dist/a_chunks/.root13.js +4 -0
- package/dist/a_chunks/.root13.js.map +1 -0
- package/dist/a_chunks/.root14.js +8 -0
- package/dist/a_chunks/.root14.js.map +1 -0
- package/dist/a_chunks/.root15.js +7 -0
- package/dist/a_chunks/.root15.js.map +1 -0
- package/dist/a_chunks/.root16.js +8 -0
- package/dist/a_chunks/.root16.js.map +1 -0
- package/dist/a_chunks/.root17.js +8 -0
- package/dist/a_chunks/.root17.js.map +1 -0
- package/dist/a_chunks/.root18.js +8 -0
- package/dist/a_chunks/.root18.js.map +1 -0
- package/dist/a_chunks/.root19.js +8 -0
- package/dist/a_chunks/.root19.js.map +1 -0
- package/dist/a_chunks/.root2.js +227 -0
- package/dist/a_chunks/.root2.js.map +1 -0
- package/dist/a_chunks/.root20.js +6 -0
- package/dist/a_chunks/.root20.js.map +1 -0
- package/dist/a_chunks/.root21.js +5 -0
- package/dist/a_chunks/.root21.js.map +1 -0
- package/dist/a_chunks/.root3.js +7 -0
- package/dist/a_chunks/.root3.js.map +1 -0
- package/dist/a_chunks/.root4.js +918 -0
- package/dist/a_chunks/.root4.js.map +1 -0
- package/dist/a_chunks/.root5.js +195 -0
- package/dist/a_chunks/.root5.js.map +1 -0
- package/dist/a_chunks/.root6.js +361 -0
- package/dist/a_chunks/.root6.js.map +1 -0
- package/dist/a_chunks/.root7.js +8 -0
- package/dist/a_chunks/.root7.js.map +1 -0
- package/dist/a_chunks/.root8.js +8 -0
- package/dist/a_chunks/.root8.js.map +1 -0
- package/dist/a_chunks/.root9.js +7 -0
- package/dist/a_chunks/.root9.js.map +1 -0
- package/dist/a_chunks/index.js +1238 -0
- package/dist/a_chunks/index.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useMchcDriverStatus.d.ts +3 -0
- package/dist/hooks/useMyEffect.d.ts +4 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/pack_components.d.ts +17 -0
- package/dist/style/index.d.ts +1 -0
- package/dist/utils/getInputStyle.d.ts +11 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/other.d.ts +4 -0
- package/package.json +63 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Request } from '@lm_fe/utils';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { lm_pdfjs_info } from '@lm_fe/static';
|
|
4
|
+
export interface IPdfFrameView_Res_Data {
|
|
5
|
+
pdfdata?: string;
|
|
6
|
+
filepath?: string;
|
|
7
|
+
imagesData?: string[];
|
|
8
|
+
}
|
|
9
|
+
export type PdfFrameView_Version = keyof typeof lm_pdfjs_info.dirs;
|
|
10
|
+
export interface IPdfFrameView_Props {
|
|
11
|
+
PDFAppConfig?: {
|
|
12
|
+
hidenToolbar?: boolean;
|
|
13
|
+
};
|
|
14
|
+
request?: Request;
|
|
15
|
+
requestData?: {
|
|
16
|
+
url: string;
|
|
17
|
+
resource?: string;
|
|
18
|
+
template?: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
note?: string;
|
|
21
|
+
id?: number | string;
|
|
22
|
+
method?: 'GET' | 'POST';
|
|
23
|
+
subid?: number;
|
|
24
|
+
vmName?: string;
|
|
25
|
+
[x: string]: any;
|
|
26
|
+
};
|
|
27
|
+
requestConfig?: AxiosRequestConfig;
|
|
28
|
+
printData?: string;
|
|
29
|
+
version?: PdfFrameView_Version;
|
|
30
|
+
filepath?: string;
|
|
31
|
+
callback?(data?: string): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function handlePrintData(printData: string): Uint8Array<ArrayBuffer>;
|
|
2
|
+
export declare function handleRes(res: any): {
|
|
3
|
+
pdf?: undefined;
|
|
4
|
+
images?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
pdf: string | undefined;
|
|
7
|
+
images: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function get_PdfFrameView_version(): string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type QRProps = {
|
|
2
|
+
type?: 'svg' | 'canvas';
|
|
3
|
+
/**
|
|
4
|
+
* The value to encode into the QR Code. An array of strings can be passed in
|
|
5
|
+
* to represent multiple segments to further optimize the QR Code.
|
|
6
|
+
*/
|
|
7
|
+
value: string | string[];
|
|
8
|
+
/**
|
|
9
|
+
* The size, in pixels, to render the QR Code.
|
|
10
|
+
* @defaultValue 128
|
|
11
|
+
*/
|
|
12
|
+
size?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The Error Correction Level to use.
|
|
15
|
+
* @see https://www.qrcode.com/en/about/error_correction.html
|
|
16
|
+
* @defaultValue L
|
|
17
|
+
*/
|
|
18
|
+
level?: any;
|
|
19
|
+
/**
|
|
20
|
+
* The background color used to render the QR Code.
|
|
21
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
22
|
+
* @defaultValue #FFFFFF
|
|
23
|
+
*/
|
|
24
|
+
bgColor?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The foregtound color used to render the QR Code.
|
|
27
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
28
|
+
* @defaultValue #000000
|
|
29
|
+
*/
|
|
30
|
+
fgColor?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether or not a margin of 4 modules should be rendered as a part of the
|
|
33
|
+
* QR Code.
|
|
34
|
+
* @deprecated Use `marginSize` instead.
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
includeMargin?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The number of _modules_ to use for margin. The QR Code specification
|
|
40
|
+
* requires `4`, however you can specify any number. Values will be turned to
|
|
41
|
+
* integers with `Math.floor`. Overrides `includeMargin` when both are specified.
|
|
42
|
+
* @defaultValue 0
|
|
43
|
+
*/
|
|
44
|
+
marginSize?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The title to assign to the QR Code. Used for accessibility reasons.
|
|
47
|
+
*/
|
|
48
|
+
title?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The minimum version used when encoding the QR Code. Valid values are 1-40
|
|
51
|
+
* with higher values resulting in more complex QR Codes. The optimal
|
|
52
|
+
* (lowest) version is determined for the `value` provided, using `minVersion`
|
|
53
|
+
* as the lower bound.
|
|
54
|
+
* @defaultValue 1
|
|
55
|
+
*/
|
|
56
|
+
minVersion?: number;
|
|
57
|
+
/**
|
|
58
|
+
* If enabled, the Error Correction Level of the result may be higher than
|
|
59
|
+
* the specified Error Correction Level option if it can be done without
|
|
60
|
+
* increasing the version.
|
|
61
|
+
* @defaultValue true
|
|
62
|
+
*/
|
|
63
|
+
boostLevel?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The settings for the embedded image.
|
|
66
|
+
*/
|
|
67
|
+
imageSettings?: any;
|
|
68
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TabsProps } from "antd";
|
|
2
|
+
import { SimpleFormProps } from '../..';
|
|
3
|
+
interface IItem {
|
|
4
|
+
_id: number;
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}
|
|
7
|
+
interface IProps extends Omit<TabsProps, 'onChange'> {
|
|
8
|
+
value?: IItem[];
|
|
9
|
+
title: string;
|
|
10
|
+
onChange?: (v: IItem[]) => void;
|
|
11
|
+
formSchema: SimpleFormProps;
|
|
12
|
+
}
|
|
13
|
+
export default function TabForm({ value, formSchema, onChange, title, style, ...others }: IProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Checkbox, DatePicker, Divider, Input, InputNumber, Radio, Rate, Row, Slider, Switch, TimePicker, SelectProps } from 'antd';
|
|
2
|
+
import SimpleSelect from './extra/SimpleSelect';
|
|
3
|
+
import { MultiInput } from './extra/MultiInput';
|
|
4
|
+
import Custom from './extra/Custom';
|
|
5
|
+
import SwitchSelect from './extra/SwitchSelect';
|
|
6
|
+
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
7
|
+
import { ComponentClass } from 'react';
|
|
8
|
+
import TabForm from './TabForm';
|
|
9
|
+
declare const Select: (<T extends Object = any>(props: SelectProps<T>) => import("react").JSX.Element) & {
|
|
10
|
+
Option: (props: import("rc-select/lib/Option").OptionProps) => import("react").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export interface IC {
|
|
13
|
+
Input: typeof Input;
|
|
14
|
+
Select: typeof Select;
|
|
15
|
+
Radio: typeof Radio;
|
|
16
|
+
InputNumber: typeof InputNumber;
|
|
17
|
+
Checkbox: typeof Checkbox;
|
|
18
|
+
TimePicker: typeof TimePicker;
|
|
19
|
+
DatePicker: typeof DatePicker;
|
|
20
|
+
Switch: typeof Switch;
|
|
21
|
+
Rate: typeof Rate;
|
|
22
|
+
Slider: typeof Slider;
|
|
23
|
+
Text: typeof Text;
|
|
24
|
+
Divider: typeof Divider;
|
|
25
|
+
SimpleSelect: typeof SimpleSelect;
|
|
26
|
+
SwitchSelect: typeof SwitchSelect;
|
|
27
|
+
Custom: typeof Custom;
|
|
28
|
+
TabForm: typeof TabForm;
|
|
29
|
+
MultiInput: typeof MultiInput;
|
|
30
|
+
RangePicker: ComponentClass<RangePickerProps, any>;
|
|
31
|
+
Color: typeof Input;
|
|
32
|
+
TextArea: typeof Input.TextArea;
|
|
33
|
+
CheckboxGroup: typeof Checkbox.Group;
|
|
34
|
+
Grid: typeof Row;
|
|
35
|
+
}
|
|
36
|
+
export declare const ComponentMapping: IC;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FormInstance, FormProps } from 'antd';
|
|
2
|
+
import { AllTypes } from './types/metaTypes';
|
|
3
|
+
import { Rule } from 'antd/lib/form';
|
|
4
|
+
type TLayoutType = 6 | 8 | 12 | 16 | 24;
|
|
5
|
+
type TFormItemMix = AllTypes & {
|
|
6
|
+
layoutType?: TLayoutType;
|
|
7
|
+
};
|
|
8
|
+
export interface SimpleFormProps {
|
|
9
|
+
onValuesChange?: FormProps['onValuesChange'];
|
|
10
|
+
blocks?: {
|
|
11
|
+
title?: string;
|
|
12
|
+
rows: IRowSchema[];
|
|
13
|
+
}[];
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
form?: FormInstance;
|
|
16
|
+
formProps?: FormProps;
|
|
17
|
+
formItems?: AllTypes[];
|
|
18
|
+
}
|
|
19
|
+
interface IRowSchema {
|
|
20
|
+
itemsInRow: TFormItemMix[];
|
|
21
|
+
layoutType?: TLayoutType;
|
|
22
|
+
label?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const SimpleFormInner: import("react").ForwardRefExoticComponent<SimpleFormProps & import("react").RefAttributes<FormInstance<any>>>;
|
|
26
|
+
type InternalFormType = typeof SimpleFormInner;
|
|
27
|
+
interface SimpleFormType extends InternalFormType {
|
|
28
|
+
getPresetRules: (name: keyof typeof basicRules, required?: boolean) => Rule[];
|
|
29
|
+
requiredRules: Rule[];
|
|
30
|
+
}
|
|
31
|
+
export declare const SimpleForm: SimpleFormType;
|
|
32
|
+
declare const basicRules: {
|
|
33
|
+
telephone: {
|
|
34
|
+
validator: (_: any, value: any) => Promise<void>;
|
|
35
|
+
message: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Form } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ComponentMapping } from "../components";
|
|
4
|
+
import { GetProps } from "./help";
|
|
5
|
+
type OptionsWithType<T extends keyof typeof ComponentMapping, V extends any> = {
|
|
6
|
+
type?: T;
|
|
7
|
+
customNode?: React.ReactNode;
|
|
8
|
+
isLayout?: boolean;
|
|
9
|
+
innerOptions?: GetProps<typeof ComponentMapping[T]>[0];
|
|
10
|
+
outerOptions?: Omit<GetProps<typeof Form.Item>[0], 'name'> & {
|
|
11
|
+
name: keyof V;
|
|
12
|
+
};
|
|
13
|
+
chosen?: boolean;
|
|
14
|
+
remote?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
showLabel?: boolean;
|
|
17
|
+
remoteOptions?: any[];
|
|
18
|
+
width?: number;
|
|
19
|
+
remoteFunc?: string;
|
|
20
|
+
onChangeFunc?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
icon?: string;
|
|
23
|
+
key?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
customClass?: string;
|
|
27
|
+
};
|
|
28
|
+
export type AllTypes<V = any> = OptionsWithType<'Input', V> | OptionsWithType<'Select', V> | OptionsWithType<'Radio', V> | OptionsWithType<'TextArea', V> | OptionsWithType<'InputNumber', V> | OptionsWithType<'Checkbox', V> | OptionsWithType<'TimePicker', V> | OptionsWithType<'DatePicker', V> | OptionsWithType<'Switch', V> | OptionsWithType<'Rate', V> | OptionsWithType<'Color', V> | OptionsWithType<'CheckboxGroup', V> | OptionsWithType<'Text', V> | OptionsWithType<'Divider', V> | OptionsWithType<'Grid', V> | OptionsWithType<'SwitchSelect', V> | OptionsWithType<'SimpleSelect', V> | OptionsWithType<'Custom', V> | OptionsWithType<'TabForm', V> | OptionsWithType<'MultiInput', V> | OptionsWithType<'RangePicker', V> | null;
|
|
29
|
+
export {};
|