@noah-libjs/components 0.0.7 → 0.0.8
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/dist/ArrayInput/components.d.ts +787 -4
- package/dist/LazyAntd/ColorPicker/index.d.ts +1 -1
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +3 -1
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +6 -2
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +3 -1
- package/dist/LazyAntd/Tree/Inner.d.ts +2 -1
- package/dist/LazyAntd/Tree/index.d.ts +3 -2
- package/dist/MyAutoComplete/types.d.ts +4 -1
- package/dist/MyButton/index.d.ts +10 -0
- package/dist/MyCheckbox/components.d.ts +807 -24
- package/dist/MyCheckbox/types.d.ts +3 -1
- package/dist/MyDatePicker/Display.d.ts +1 -1
- package/dist/MyIconSelect/index.d.ts +7 -0
- package/dist/MyIconSelect/types.d.ts +16 -0
- package/dist/MyInput/index.d.ts +1 -1
- package/dist/MyRangeDate/Inner.d.ts +3 -5
- package/dist/MyRangeDate/index.d.ts +6 -7
- package/dist/MyRangeDate/utils.d.ts +32 -30
- package/dist/MySelect/components.d.ts +787 -4
- package/dist/MySelect/types.d.ts +1 -1
- package/dist/MySwitch/types.d.ts +5 -2
- package/dist/a_chunks/index.js +561 -91
- package/dist/a_chunks/index.module.js +1 -24
- package/dist/a_chunks/root.17.js +2 -2
- package/dist/a_chunks/root.18.js +5 -5
- package/dist/a_chunks/root.19.js +2 -1
- package/dist/a_chunks/root.20.js +2 -1
- package/dist/a_chunks/root.21.js +2 -1
- package/dist/a_chunks/root.22.js +54 -196
- package/dist/a_chunks/root.23.js +198 -95
- package/dist/a_chunks/root.24.js +118 -5
- package/dist/a_chunks/root.25.js +4 -3
- package/dist/a_chunks/root.26.js +4 -0
- package/dist/a_chunks/root.8.js +7 -5
- package/dist/index.js +2 -1
- package/dist/packs.d.ts +788 -0
- package/dist/util-types/fd/InputType.d.ts +1 -1
- package/dist/util-types/fd/index.d.ts +33 -10
- package/dist/utils/getInputStyle.d.ts +3 -2
- package/dist/utils/msmc.d.ts +8 -2
- package/dist/utils/new.d.ts +12 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
export type IMchc_FormDescriptions_InputType = "single_date_picker" | 'PatientAutoComplete' | 'FormTabs' | 'PatientSelect' | 'rangeDate' | "MyButton" | "MyEditTable" | "MyRangeDate" | "MyRangeDateTime" | "MyInput" | "IdNOButton" | "Input" | "MySelect" | "MS" | "MyCheckbox" | "straw" | "ArrayInput" | "search_select" | "TemplateTextarea" | "MyTemplateTextarea" | "MC" | "component" | "node" | "ArrayPanel" | "MyFormList_必须搭配Form使用" | "checkbox_group" | "MyPressure" | "title" | "normal_select" | "normal_checkbox_with_input" | "input" | "id" | "multiple_input_with_label" | "fetus_appendages" | "input_with_label" | "apgar_score_input" | "select_with_input" | "input_number" | "InputNumber" | "address" | "MyAddress" | "MyColor" | "MySwitch" | "Switch" | "switch" | "radio" | "month_picker" | "single_time_picker" | "select_with_options" | "pregnant_radio" | "noenate_record" | "date" | "array-custom" | "table" | "checkbox" | "country_select" | "checkbox_with_input" | "text_area" | "DateTimeInput" | "TextArea" | "MyMonaco" | "radio_group" | "checkbox_with_single_input" | "select_with_option" | "dictionary_select" | "id_number_input" | "input_with_range" | "pure_checkbox" | "checkbox_group_object" | "pregnancy_history_v2" | "has_pregnancy" | "fetal_count" | "custom" | "select" | "addressCascader" | "button" | "text-input" | "picker" | "date-picker" | "DatePicker" | "MyDatePicker" | "address-item" | "stepper-item" | "radio-item" | "checkbox-item" | "multiple-picker" | "group-picker" | "fetus" | "bloodPressureInput" | "MyAutoComplete" | "MA" | "MArr" | "textareaWithTemplate" | "blank" | "highrisk_sign" | "age_select" | "edit_in_table" | "diagnosis" | "template_textarea" | "input_with_range_tip" | "blood_pressure" | "blood_and_thalassemia" | "middle_ultsounds_single" | "select_with_options_or_input" | "fetal_nt_check" | "middle_ultsounds" | "procedure_records" | "surgical_before_operator_select" | "surgical_before_nurse_select" | "procedure_intrauterine_records" | "procedure_cystocentesis_records" | "pressure" | "select_tag_with_options" | "tree_select_v2" | "normalButton" | "textarea-input" | "referral_register" | "ToggleForm" | "referral_organization_select" | "record_state" | "patient_auto_complete" | "image_editor" | "post_partumFetal" | "calculate-score-table" | "inspection_report" | "nursing_fetus" | "HourMinuteInput" | "checkbox_with_inputv2" | "appgar" | "nurse_children" | "radio_input" | "pressure-v2" | "fetal_ultrasound" | "inspection_result_textarea" | "ultrosound_result_textarea" | "diagnosis_list" | "labor_process" | "label" | "textareaWithBtn" | "pregnancyHistoryTable" | "bregma_group" | "multiple_input_group" | "multi_selector" | "result_textarea" | "single_selector" | "check_invert_button" | "async_autoComplete" | "checkbox-with-extra" | "oxytocin_table" | "range_date_picker" | "caesarean_children" | "retained_fetus" | "template_textareav2" | "auto_complete_with_red" | "diagnosis_list_v2" | "normal_nursing_table" | "blood_sugar_nursing_Table" | "past_delivery_nursing_table" | "special_nursing_table" | "nursing_table" | "lmp-info" | "induced_fetus" | "temperature_nursing_Table" | "blank_part" | "vagina_struments_record_form" | "divider" | "template_textareav3";
|
|
1
|
+
export type IMchc_FormDescriptions_InputType = "single_date_picker" | 'PatientAutoComplete' | 'FormTabs' | 'PatientSelect' | 'rangeDate' | "MyButton" | "MyEditTable" | "MyRangeDate" | "MyRangeDateTime" | "MyInput" | "IdNOButton" | "Input" | "MySelect" | "MS" | "MSW" | "MyCheckbox" | "straw" | "ArrayInput" | "search_select" | "TemplateTextarea" | "MyTemplateTextarea" | "MC" | "UploadFile" | "upload_file" | "component" | "node" | "textareaWithResult" | "ArrayPanel" | "MyFormList_必须搭配Form使用" | "checkbox_group" | "MyPressure" | "title" | "normal_select" | "normal_checkbox_with_input" | "input" | "id" | "multiple_input_with_label" | "fetus_appendages" | "input_with_label" | "apgar_score_input" | "select_with_input" | "input_number" | "InputNumber" | "address" | "MyAddress" | "MyColor" | "MySwitch" | "Switch" | "switch" | "radio" | "month_picker" | "single_time_picker" | "select_with_options" | "pregnant_radio" | "noenate_record" | "date" | "array-custom" | "table" | "checkbox" | "country_select" | "checkbox_with_input" | "text_area" | "DateTimeInput" | "TextArea" | "MyMonaco" | "radio_group" | "checkbox_with_single_input" | "select_with_option" | "dictionary_select" | "id_number_input" | "input_with_range" | "pure_checkbox" | "checkbox_group_object" | "pregnancy_history_v2" | "has_pregnancy" | "fetal_count" | "custom" | "select" | "addressCascader" | "button" | "text-input" | "picker" | "date-picker" | "DatePicker" | "MyDatePicker" | "address-item" | "stepper-item" | "radio-item" | "checkbox-item" | "multiple-picker" | "group-picker" | "fetus" | "bloodPressureInput" | "MyAutoComplete" | "MA" | "MI" | "MArr" | "textareaWithTemplate" | "blank" | "highrisk_sign" | "age_select" | "edit_in_table" | "diagnosis" | "template_textarea" | "input_with_range_tip" | "blood_pressure" | "blood_and_thalassemia" | "middle_ultsounds_single" | "select_with_options_or_input" | "fetal_nt_check" | "middle_ultsounds" | "procedure_records" | "surgical_before_operator_select" | "surgical_before_nurse_select" | "procedure_intrauterine_records" | "procedure_cystocentesis_records" | "pressure" | "select_tag_with_options" | "tree_select_v2" | "normalButton" | "textarea-input" | "referral_register" | "ToggleForm" | "referral_organization_select" | "record_state" | "patient_auto_complete" | "image_editor" | "post_partumFetal" | "calculate-score-table" | "inspection_report" | "nursing_fetus" | "HourMinuteInput" | "checkbox_with_inputv2" | "appgar" | "nurse_children" | "radio_input" | "pressure-v2" | "fetal_ultrasound" | "inspection_result_textarea" | "ultrosound_result_textarea" | "diagnosis_list" | "labor_process" | "label" | "textareaWithBtn" | "pregnancyHistoryTable" | "bregma_group" | "multiple_input_group" | "multi_selector" | "result_textarea" | "single_selector" | "check_invert_button" | "async_autoComplete" | "checkbox-with-extra" | "oxytocin_table" | "range_date_picker" | "caesarean_children" | "retained_fetus" | "template_textareav2" | "auto_complete_with_red" | "diagnosis_list_v2" | "normal_nursing_table" | "blood_sugar_nursing_Table" | "past_delivery_nursing_table" | "special_nursing_table" | "nursing_table" | "lmp-info" | "induced_fetus" | "temperature_nursing_Table" | "blank_part" | "vagina_struments_record_form" | "divider" | "template_textareav3";
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { AnyObject, ICommonOption
|
|
1
|
+
import { AnyObject, ICommonOption } from "@noah-libjs/utils";
|
|
2
2
|
import { ButtonProps, FormInstance } from "antd";
|
|
3
3
|
import { SizeType } from "antd/lib/config-provider/SizeContext";
|
|
4
|
-
import { CSSProperties, FC, ReactNode } from "react";
|
|
4
|
+
import React, { CSSProperties, FC, ReactNode } from "react";
|
|
5
5
|
import { IMchc_FormDescriptions_FormItemLayout } from "./FormItemLayout";
|
|
6
6
|
import { IMchc_FormDescriptions_InputType } from "./InputType";
|
|
7
7
|
import { IMchc_FormDescriptions_Rules } from "./Rules";
|
|
8
8
|
import { IMchc_FormDescriptions_SpecialConfig } from "./SpecialConfig";
|
|
9
9
|
import { IMchc_FormDescriptions_TranferRules } from "./TranferRules";
|
|
10
|
+
import { T_FETCH_OPTIONS } from "@noah-libjs/request";
|
|
11
|
+
import { InputStatus } from "antd/es/_util/statusUtils";
|
|
12
|
+
import { UploadListType } from "antd/es/upload/interface";
|
|
10
13
|
export type TOptions = string | ICommonOption[] | string[];
|
|
11
14
|
export interface IMchc_FormDescriptions_InputProps {
|
|
12
15
|
language?: 'json' | 'javascript' | 'rust' | 'java';
|
|
13
16
|
showTime?: boolean;
|
|
14
17
|
showEdit?: boolean;
|
|
15
18
|
height?: any;
|
|
19
|
+
status?: InputStatus;
|
|
20
|
+
addonBefore?: string;
|
|
21
|
+
addonAfter?: string;
|
|
16
22
|
dependency?: {
|
|
17
23
|
show?: {
|
|
18
24
|
key: string;
|
|
@@ -30,6 +36,10 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
30
36
|
allowClear?: boolean;
|
|
31
37
|
genRowData?: (oldlist?: any[]) => any;
|
|
32
38
|
type?: 'multiple' | 'single' | 'tags' | 'number';
|
|
39
|
+
mode?: 'multiple' | 'single';
|
|
40
|
+
listType?: UploadListType;
|
|
41
|
+
linker?: string;
|
|
42
|
+
action?: string;
|
|
33
43
|
unit?: string;
|
|
34
44
|
tip?: string;
|
|
35
45
|
span?: number;
|
|
@@ -37,6 +47,8 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
37
47
|
max?: number;
|
|
38
48
|
labelCol?: number;
|
|
39
49
|
wrapperCol?: number;
|
|
50
|
+
popupMatchSelectWidth?: number | boolean;
|
|
51
|
+
gen_obj?: () => AnyObject;
|
|
40
52
|
rows?: number;
|
|
41
53
|
defaultValue?: any;
|
|
42
54
|
defaultChecked?: boolean;
|
|
@@ -45,12 +57,16 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
45
57
|
options?: TOptions | (() => TOptions);
|
|
46
58
|
fetch_options?: T_FETCH_OPTIONS;
|
|
47
59
|
optionKey?: string;
|
|
48
|
-
|
|
49
|
-
|
|
60
|
+
switch_type?: 'switch' | 'checkbox';
|
|
61
|
+
unchecked_text?: string;
|
|
62
|
+
checked_text?: string;
|
|
63
|
+
checked_value?: any;
|
|
64
|
+
unchecked_value?: any;
|
|
50
65
|
uniqueKey?: string;
|
|
51
66
|
separator?: string;
|
|
52
67
|
sp?: ICommonOption[];
|
|
53
|
-
format?: 'YYYY-MM-DD' | 'YYYY-MM-DD HH:mm:ss' | 'YYYY-MM-DD HH:mm' | 'HH:mm:ss' | 'HH:mm';
|
|
68
|
+
format?: 'YYYY-MM-DD' | 'YYYY-MM-DD HH:mm:ss' | 'YYYY-MM-DD HH:mm' | 'HH:mm:ss' | 'HH:mm' | null;
|
|
69
|
+
picker?: 'week' | 'month' | 'year' | 'quarter';
|
|
54
70
|
time_only?: boolean;
|
|
55
71
|
placeholder?: string;
|
|
56
72
|
disabled?: boolean;
|
|
@@ -58,14 +74,17 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
58
74
|
pressure_key1?: string;
|
|
59
75
|
pressure_key2?: string;
|
|
60
76
|
style?: CSSProperties;
|
|
61
|
-
marshal?:
|
|
77
|
+
marshal?: 0 | 1 | 2;
|
|
62
78
|
TemplateTextarea_type?: {
|
|
63
|
-
|
|
79
|
+
url?: string;
|
|
80
|
+
method?: 'post' | 'get';
|
|
81
|
+
type?: number;
|
|
64
82
|
title: string;
|
|
65
83
|
depid?: number;
|
|
66
84
|
}[];
|
|
67
85
|
defaultData?: AnyObject;
|
|
68
|
-
|
|
86
|
+
btn_text?: string;
|
|
87
|
+
on_btn_click?: (e: React.MouseEvent<HTMLElement, MouseEvent>, form?: FormInstance) => any;
|
|
69
88
|
standalone?: boolean;
|
|
70
89
|
node?: ReactNode;
|
|
71
90
|
component?: FC<{
|
|
@@ -73,7 +92,7 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
73
92
|
onChange?(v: any): void;
|
|
74
93
|
form?: FormInstance;
|
|
75
94
|
}>;
|
|
76
|
-
width?: number;
|
|
95
|
+
width?: number | string;
|
|
77
96
|
startIndex?: number;
|
|
78
97
|
inputWidth?: number;
|
|
79
98
|
size?: SizeType;
|
|
@@ -97,6 +116,8 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
97
116
|
onPatientSelect?(v: any, form?: FormInstance): void;
|
|
98
117
|
onPatientAutoComplete?(v: any, form?: FormInstance): void;
|
|
99
118
|
on_row_value_change?(data: any[], index: number, changed?: AnyObject, form?: FormInstance): void;
|
|
119
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
120
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
100
121
|
}
|
|
101
122
|
type IMchc_FormDescriptions_FilterTypeRaw = 'in' | 'equals' | 'contains' | 'greaterOrEqualThan' | 'lessOrEqualThan';
|
|
102
123
|
export type IMchc_FormDescriptions_FilterType = IMchc_FormDescriptions_FilterTypeRaw | `${IMchc_FormDescriptions_FilterTypeRaw},${IMchc_FormDescriptions_FilterTypeRaw}`;
|
|
@@ -168,9 +189,11 @@ export type IMchc_FormDescriptions_Field<RAW = false> = {
|
|
|
168
189
|
showDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
169
190
|
requiredDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
170
191
|
disabledDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
192
|
+
warning_deps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
193
|
+
error_deps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
171
194
|
processRemote?(v: any, form?: FormInstance): any;
|
|
172
195
|
processLocal?(v: any, form?: FormInstance): any;
|
|
173
|
-
checkWarn?(v: any, form?: FormInstance): boolean;
|
|
196
|
+
checkWarn?(v: any, form?: FormInstance): boolean | InputStatus;
|
|
174
197
|
fd_lazy?: boolean;
|
|
175
198
|
};
|
|
176
199
|
export type IMchc_FormDescriptions_Field_Nullable<RAW = false> = IMchc_FormDescriptions_Field<RAW> | null;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { InputStatus } from "antd/es/_util/statusUtils";
|
|
1
2
|
import React from "react";
|
|
2
3
|
interface IBase {
|
|
3
4
|
style?: React.CSSProperties;
|
|
4
5
|
width?: any;
|
|
5
6
|
inputWidth?: any;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
|
|
8
|
-
warn?: boolean;
|
|
8
|
+
status?: InputStatus;
|
|
9
9
|
}
|
|
10
10
|
interface IProps extends IBase {
|
|
11
11
|
}
|
|
12
|
+
export declare function get_status_cls(status?: InputStatus): any;
|
|
12
13
|
export declare function getInputStyle(props?: IProps): React.CSSProperties;
|
|
13
14
|
export {};
|
package/dist/utils/msmc.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T_FETCH_OPTIONS } from "@noah-libjs/request";
|
|
2
|
+
import { ICommonOption } from "@noah-libjs/utils";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { IMchc_FormDescriptions_Field_Nullable, TOptions } from "../util-types";
|
|
5
|
+
import { FormInstance } from "antd";
|
|
4
6
|
export type TMarshal = 0 | 1 | 2;
|
|
5
7
|
export type TMode = 'multiple' | 'tags';
|
|
6
8
|
interface ICompatibleProps {
|
|
9
|
+
form?: FormInstance;
|
|
7
10
|
value?: string | number | ICommonOption[];
|
|
8
11
|
uniqueKey?: string;
|
|
9
12
|
optionKey?: string;
|
|
@@ -12,10 +15,13 @@ interface ICompatibleProps {
|
|
|
12
15
|
type?: TMode;
|
|
13
16
|
options?: TOptions | (() => TOptions);
|
|
14
17
|
fetch_options?: T_FETCH_OPTIONS;
|
|
18
|
+
frugal?: boolean;
|
|
15
19
|
useString?: boolean;
|
|
16
20
|
sp?: any[];
|
|
17
21
|
config?: any;
|
|
18
22
|
startIndex?: any;
|
|
23
|
+
display_linker?: string;
|
|
24
|
+
linker?: string;
|
|
19
25
|
}
|
|
20
26
|
export declare function get_check_invert_values(configs: IMchc_FormDescriptions_Field_Nullable[]): {
|
|
21
27
|
[x: string]: any[];
|
|
@@ -33,7 +39,7 @@ export declare function use_options(props: ICompatibleProps): {
|
|
|
33
39
|
};
|
|
34
40
|
export declare function parse_MC_option(props: ICompatibleProps): ICommonOption[];
|
|
35
41
|
export declare function parse_MC_dict_options(props?: ICompatibleProps): ICommonOption[] | undefined;
|
|
36
|
-
export declare function displayValue(_options: ICommonOption[], value: ICommonOption[],
|
|
42
|
+
export declare function displayValue(_options: ICommonOption[], value: ICommonOption[], l?: string): string;
|
|
37
43
|
export declare function get_unknown_conf(props: {
|
|
38
44
|
showUnknown?: boolean;
|
|
39
45
|
unknown?: boolean;
|
package/dist/utils/new.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import { AnyObject } from "@noah-libjs/utils";
|
|
1
2
|
import { FormInstance } from "antd";
|
|
2
3
|
export declare function handle_form_error(error: any, form?: FormInstance): {
|
|
3
4
|
text: string | null;
|
|
4
5
|
errors: string[];
|
|
5
6
|
name: string[];
|
|
6
7
|
} | null;
|
|
8
|
+
export declare function form_validate<T = AnyObject>(form?: FormInstance | null): Promise<T>;
|
|
9
|
+
type EFocus = React.FocusEvent<HTMLDivElement, Element>;
|
|
10
|
+
export declare function fuck_focus(props: {
|
|
11
|
+
onBlur?(e: EFocus): void;
|
|
12
|
+
}): {
|
|
13
|
+
child_blur: (index?: number) => void;
|
|
14
|
+
child_focus: (index?: number) => void;
|
|
15
|
+
parent_blur: (e: EFocus, index?: number) => void;
|
|
16
|
+
parent_focus: (index?: number) => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noah-libjs/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"rollup-plugin-postcss": "^4.0.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@noah-libjs/request": "0.0.
|
|
42
|
-
"@noah-libjs/utils": "0.0.
|
|
41
|
+
"@noah-libjs/request": "0.0.8",
|
|
42
|
+
"@noah-libjs/utils": "0.0.8"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"license": "MIT",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "a50958bb900a9e145a8a722b69c639cac93d2094"
|
|
49
49
|
}
|