@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.
Files changed (127) hide show
  1. package/README.md +47 -0
  2. package/dist/ContainerDimensions/index.d.ts +10 -0
  3. package/dist/ContainerDimensions2/index.d.ts +10 -0
  4. package/dist/GlobalModal/index.d.ts +7 -0
  5. package/dist/GlobalModal/utils.d.ts +65 -0
  6. package/dist/LazyAntd/AutoComplete/Inner.d.ts +4 -0
  7. package/dist/LazyAntd/AutoComplete/index.d.ts +4 -0
  8. package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +3 -0
  9. package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +11 -0
  10. package/dist/LazyAntd/DatePicker/Base/index.d.ts +12 -0
  11. package/dist/LazyAntd/DatePicker/Base/props.d.ts +14 -0
  12. package/dist/LazyAntd/DatePicker/Calendar.d.ts +4 -0
  13. package/dist/LazyAntd/DatePicker/DatePicker.d.ts +4 -0
  14. package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +4 -0
  15. package/dist/LazyAntd/DatePicker/RangePicker.d.ts +4 -0
  16. package/dist/LazyAntd/DatePicker/TimePicker.d.ts +4 -0
  17. package/dist/LazyAntd/DatePicker/index.d.ts +5 -0
  18. package/dist/LazyAntd/Dropdown/Button.d.ts +2 -0
  19. package/dist/LazyAntd/Dropdown/Inner.d.ts +3 -0
  20. package/dist/LazyAntd/Dropdown/index.d.ts +10 -0
  21. package/dist/LazyAntd/Form/FormItemInner.d.ts +2 -0
  22. package/dist/LazyAntd/Form/Inner.d.ts +3 -0
  23. package/dist/LazyAntd/Form/index.d.ts +9 -0
  24. package/dist/LazyAntd/Modal/Inner.d.ts +4 -0
  25. package/dist/LazyAntd/Modal/index.d.ts +3 -0
  26. package/dist/LazyAntd/Pagination/Inner.d.ts +3 -0
  27. package/dist/LazyAntd/Pagination/index.d.ts +3 -0
  28. package/dist/LazyAntd/Select/Inner.d.ts +3 -0
  29. package/dist/LazyAntd/Select/OptionInner.d.ts +2 -0
  30. package/dist/LazyAntd/Select/index.d.ts +10 -0
  31. package/dist/LazyAntd/Table/Inner.d.ts +3 -0
  32. package/dist/LazyAntd/Table/index.d.ts +3 -0
  33. package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +3 -0
  34. package/dist/LazyAntd/Tree/Inner.d.ts +3 -0
  35. package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +4 -0
  36. package/dist/LazyAntd/Tree/index.d.ts +12 -0
  37. package/dist/LazyAntd/TreeSelect/Inner.d.ts +3 -0
  38. package/dist/LazyAntd/TreeSelect/index.d.ts +3 -0
  39. package/dist/LazyAntd/index.d.ts +25 -0
  40. package/dist/Monaco/Inner.d.ts +12 -0
  41. package/dist/Monaco/index.d.ts +1 -0
  42. package/dist/MyAddress/Inner.d.ts +3 -0
  43. package/dist/MyAddress/Old/InnerOld.d.ts +3 -0
  44. package/dist/MyAddress/Old/index.d.ts +3 -0
  45. package/dist/MyAddress/Old/options.d.ts +25 -0
  46. package/dist/MyAddress/index.d.ts +6 -0
  47. package/dist/MyAddress/type.d.ts +16 -0
  48. package/dist/MyAddress/utils.d.ts +6 -0
  49. package/dist/MyImageEditor/Inner.d.ts +4 -0
  50. package/dist/MyImageEditor/index.d.ts +16 -0
  51. package/dist/MyImageEditor/init_delete_control.d.ts +1 -0
  52. package/dist/MyImageEditor/utils.d.ts +36 -0
  53. package/dist/MyInput/index.d.ts +5 -0
  54. package/dist/MyInput/types.d.ts +9 -0
  55. package/dist/MyLazyComponent/index.d.ts +6 -0
  56. package/dist/PDF_Frame_View/Inner.d.ts +3 -0
  57. package/dist/PDF_Frame_View/index.d.ts +5 -0
  58. package/dist/PDF_Frame_View/types.d.ts +32 -0
  59. package/dist/PDF_Frame_View/utils.d.ts +9 -0
  60. package/dist/QRCode/Inner.d.ts +3 -0
  61. package/dist/QRCode/index.d.ts +2 -0
  62. package/dist/QRCode/types.d.ts +68 -0
  63. package/dist/SimpleForm/components/TabForm/index.d.ts +14 -0
  64. package/dist/SimpleForm/components/extra/Custom.d.ts +7 -0
  65. package/dist/SimpleForm/components/extra/MultiInput.d.ts +6 -0
  66. package/dist/SimpleForm/components/extra/SimpleSelect.d.ts +6 -0
  67. package/dist/SimpleForm/components/extra/SwitchSelect.d.ts +4 -0
  68. package/dist/SimpleForm/components/index.d.ts +37 -0
  69. package/dist/SimpleForm/index.d.ts +38 -0
  70. package/dist/SimpleForm/types/help.d.ts +3 -0
  71. package/dist/SimpleForm/types/metaTypes.d.ts +29 -0
  72. package/dist/a_chunks/.root.js +805 -0
  73. package/dist/a_chunks/.root.js.map +1 -0
  74. package/dist/a_chunks/.root10.js +8 -0
  75. package/dist/a_chunks/.root10.js.map +1 -0
  76. package/dist/a_chunks/.root11.js +7 -0
  77. package/dist/a_chunks/.root11.js.map +1 -0
  78. package/dist/a_chunks/.root12.js +8 -0
  79. package/dist/a_chunks/.root12.js.map +1 -0
  80. package/dist/a_chunks/.root13.js +4 -0
  81. package/dist/a_chunks/.root13.js.map +1 -0
  82. package/dist/a_chunks/.root14.js +8 -0
  83. package/dist/a_chunks/.root14.js.map +1 -0
  84. package/dist/a_chunks/.root15.js +7 -0
  85. package/dist/a_chunks/.root15.js.map +1 -0
  86. package/dist/a_chunks/.root16.js +8 -0
  87. package/dist/a_chunks/.root16.js.map +1 -0
  88. package/dist/a_chunks/.root17.js +8 -0
  89. package/dist/a_chunks/.root17.js.map +1 -0
  90. package/dist/a_chunks/.root18.js +8 -0
  91. package/dist/a_chunks/.root18.js.map +1 -0
  92. package/dist/a_chunks/.root19.js +8 -0
  93. package/dist/a_chunks/.root19.js.map +1 -0
  94. package/dist/a_chunks/.root2.js +227 -0
  95. package/dist/a_chunks/.root2.js.map +1 -0
  96. package/dist/a_chunks/.root20.js +6 -0
  97. package/dist/a_chunks/.root20.js.map +1 -0
  98. package/dist/a_chunks/.root21.js +5 -0
  99. package/dist/a_chunks/.root21.js.map +1 -0
  100. package/dist/a_chunks/.root3.js +7 -0
  101. package/dist/a_chunks/.root3.js.map +1 -0
  102. package/dist/a_chunks/.root4.js +918 -0
  103. package/dist/a_chunks/.root4.js.map +1 -0
  104. package/dist/a_chunks/.root5.js +195 -0
  105. package/dist/a_chunks/.root5.js.map +1 -0
  106. package/dist/a_chunks/.root6.js +361 -0
  107. package/dist/a_chunks/.root6.js.map +1 -0
  108. package/dist/a_chunks/.root7.js +8 -0
  109. package/dist/a_chunks/.root7.js.map +1 -0
  110. package/dist/a_chunks/.root8.js +8 -0
  111. package/dist/a_chunks/.root8.js.map +1 -0
  112. package/dist/a_chunks/.root9.js +7 -0
  113. package/dist/a_chunks/.root9.js.map +1 -0
  114. package/dist/a_chunks/index.js +1238 -0
  115. package/dist/a_chunks/index.js.map +1 -0
  116. package/dist/hooks/index.d.ts +2 -0
  117. package/dist/hooks/useMchcDriverStatus.d.ts +3 -0
  118. package/dist/hooks/useMyEffect.d.ts +4 -0
  119. package/dist/index.d.ts +11 -0
  120. package/dist/index.js +45 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/pack_components.d.ts +17 -0
  123. package/dist/style/index.d.ts +1 -0
  124. package/dist/utils/getInputStyle.d.ts +11 -0
  125. package/dist/utils/index.d.ts +2 -0
  126. package/dist/utils/other.d.ts +4 -0
  127. 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,3 @@
1
+ import React from 'react';
2
+ import { QRProps } from './types';
3
+ export default function QRCode(props: QRProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const QRCode: import("react").LazyExoticComponent<typeof import("./Inner").default>;
2
+ export { QRCode };
@@ -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,7 @@
1
+ import { InputProps } from "antd";
2
+ import { FC } from "react";
3
+ export { InputProps };
4
+ export default function Custom<T>(props: InputProps & {
5
+ CustomedComponent: FC<T>;
6
+ [x: string]: any;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SelectProps } from "antd";
2
+ import React from "react";
3
+ export declare function MultiInput(props: Omit<SelectProps<any>, 'value'> & {
4
+ optionsArr: string[];
5
+ value: string;
6
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SelectProps } from "antd";
2
+ import React from "react";
3
+ export default function SimpleSelect(props: SelectProps<any> & {
4
+ optionsArr: string[];
5
+ type?: 'Select' | 'Radio';
6
+ }): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { SelectProps } from "antd";
2
+ import React from "react";
3
+ export { SelectProps };
4
+ export default function SwitchSelect(props: SelectProps<any>): React.JSX.Element;
@@ -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,3 @@
1
+ type omg = ((...args: any) => any) | (abstract new (...args: any) => any);
2
+ export type GetProps<T extends omg> = T extends (abstract new (...args: any) => any) ? ConstructorParameters<T> : (T extends ((...args: any) => any) ? Parameters<T> : any);
3
+ 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 {};