@noah-libjs/components 0.0.7 → 0.0.9
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 +165 -5
- package/dist/ArrayInput/types.d.ts +2 -1
- package/dist/ArraySingle/DispalyInner.d.ts +4 -0
- package/dist/ArraySingle/Inner.d.ts +4 -0
- package/dist/ArraySingle/index.d.ts +4 -0
- package/dist/ArraySingle/types.d.ts +16 -0
- 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 +184 -24
- package/dist/MyCheckbox/types.d.ts +6 -3
- package/dist/MyDatePicker/Display.d.ts +1 -1
- package/dist/MyIconSelect/MyIcon.d.ts +2 -0
- package/dist/MyIconSelect/MyIconSelect.d.ts +5 -0
- package/dist/MyIconSelect/index.d.ts +6 -0
- package/dist/MyIconSelect/types.d.ts +16 -0
- package/dist/MyIconSelect/utils.d.ts +7 -0
- package/dist/MyInput/index.d.ts +3 -3
- package/dist/MyRangeDate/Inner.d.ts +4 -5
- package/dist/MyRangeDate/index.d.ts +6 -7
- package/dist/MyRangeDate/utils.d.ts +18 -381
- package/dist/MySelect/components.d.ts +165 -5
- package/dist/MySelect/types.d.ts +3 -1
- package/dist/MySwitch/types.d.ts +5 -2
- package/dist/a_chunks/index.js +509 -116
- package/dist/a_chunks/index.module.js +1 -24
- package/dist/a_chunks/root.17.js +12 -6
- package/dist/a_chunks/root.18.js +5 -6
- package/dist/a_chunks/root.19.js +2 -2
- package/dist/a_chunks/root.20.js +2 -2
- package/dist/a_chunks/root.21.js +2 -2
- package/dist/a_chunks/root.22.js +141 -183
- package/dist/a_chunks/root.23.js +15 -109
- package/dist/a_chunks/root.24.js +66 -5
- package/dist/a_chunks/root.25.js +8 -4
- package/dist/a_chunks/root.26.js +68 -0
- package/dist/a_chunks/root.27.js +212 -0
- package/dist/a_chunks/root.28.js +117 -0
- package/dist/a_chunks/root.29.js +5 -0
- package/dist/a_chunks/root.30.js +4 -0
- package/dist/a_chunks/root.8.js +7 -5
- package/dist/a_chunks/utils.js +59 -0
- package/dist/index.js +2 -2
- package/dist/packs.d.ts +168 -1
- package/dist/util-types/fd/InputType.d.ts +1 -1
- package/dist/util-types/fd/index.d.ts +41 -11
- package/dist/utils/getInputStyle.d.ts +3 -2
- package/dist/utils/msmc.d.ts +13 -4
- package/dist/utils/new.d.ts +12 -0
- package/dist/utils/use_array_marshal.d.ts +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["icon_type", "value", "onChange", "form"];
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
import React__default, { useState, useEffect } from 'react';
|
|
8
|
+
function use_icon(props) {
|
|
9
|
+
var _props$icon_type = props.icon_type,
|
|
10
|
+
icon_type = _props$icon_type === void 0 ? '' : _props$icon_type,
|
|
11
|
+
value = props.value,
|
|
12
|
+
onChange = props.onChange,
|
|
13
|
+
form = props.form,
|
|
14
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
15
|
+
var _useState = useState({}),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
all_icons = _useState2[0],
|
|
18
|
+
set_all_icons = _useState2[1];
|
|
19
|
+
var _useState3 = useState([]),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
+
all_keys = _useState4[0],
|
|
22
|
+
set_all_keys = _useState4[1];
|
|
23
|
+
var QuestionOutlined = all_icons['QuestionOutlined'] || function () {
|
|
24
|
+
return /*#__PURE__*/React__default.createElement("span", null, "?");
|
|
25
|
+
};
|
|
26
|
+
function render_Icon(t) {
|
|
27
|
+
var _all_icons$default, _all_icons$default2;
|
|
28
|
+
var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29
|
+
if (!((_all_icons$default = all_icons["default"]) !== null && _all_icons$default !== void 0 && _all_icons$default.render)) return null;
|
|
30
|
+
var R = (_all_icons$default2 = all_icons["default"]) === null || _all_icons$default2 === void 0 ? void 0 : _all_icons$default2.render;
|
|
31
|
+
if (!t) return null;
|
|
32
|
+
if (!all_keys.includes(t)) return /*#__PURE__*/React__default.createElement(R, _objectSpread(_objectSpread({
|
|
33
|
+
title: t,
|
|
34
|
+
component: QuestionOutlined
|
|
35
|
+
}, p), others));
|
|
36
|
+
var C = all_icons[t];
|
|
37
|
+
return /*#__PURE__*/React__default.createElement(R, _objectSpread(_objectSpread({
|
|
38
|
+
title: t,
|
|
39
|
+
component: C
|
|
40
|
+
}, p), others));
|
|
41
|
+
}
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
import('@ant-design/icons').then(function (mod) {
|
|
44
|
+
/*#__PURE__*/React__default.createElement(mod["default"], null);
|
|
45
|
+
set_all_icons(mod);
|
|
46
|
+
var keys = Object.keys(mod).filter(function (_) {
|
|
47
|
+
return ['Outlined'].some(function (limit) {
|
|
48
|
+
return _.includes(limit);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
set_all_keys(keys);
|
|
52
|
+
});
|
|
53
|
+
}, []);
|
|
54
|
+
return {
|
|
55
|
+
all_keys: all_keys,
|
|
56
|
+
render_Icon: render_Icon
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export { use_icon as u };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as ArrayInput,
|
|
1
|
+
export { A as ArrayInput, w as ArraySingle, a1 as AutoComplete_L, a0 as Calendar_L, C as Checkbox_L, a2 as ColorPicker_L, ac as ContainerDimensions, n as DatePicker_L, D as Dropdown_L, a3 as Form_L, K as GlobalModal, J as GlobalModal_, a6 as Modal_L, k as MonthPicker_L, I as MountGlobalModal, F as MyAutoComplete, G as MyButton, v as MyCheckbox, t as MyCheckbox_Display, B as MyColor, M as MyIcon, E as MyIconSelect, e as MyInput, N as MyLazyComponent, L as MyMonaco, y as MyRangeDate, z as MyRangeDateTime, x as MyRangePicker, r as MySelect, H as MySwitch, a7 as Pagination_L, aa as QRCode_L, R as RangePicker_L, a8 as SelectOption_L, S as Select_L, ab as Switch_L, a4 as Table_L, T as TimePicker_L, a9 as TreeSelect_L, a5 as Tree_L, U as UNKNOWN_TIME_SYMBOL, c as check_multiple, $ as displayValue, X as form_validate, l as formatDatePickerProps, Y as fuck_focus, P as getArray, Q as getFormat, g as getInputStyle, a as getMarshal, V as getParamByName, Z as get_check_invert_values, b as get_mode, j as get_status_cls, o as get_unknown_conf, W as handle_form_error, O as isUrl, p as packs, _ as parse_MC_dict_options, i as parse_MC_option, d as parse_MC_value, u as use_options } from './a_chunks/index.js';
|
|
2
2
|
export { Dayjs } from 'dayjs';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '@ant-design/icons';
|
|
5
4
|
import '@noah-libjs/utils';
|
|
6
5
|
import 'antd';
|
|
7
6
|
import 'rc-select';
|
|
8
7
|
import 'rc-tree';
|
|
8
|
+
import '@noah-libjs/request';
|
package/dist/packs.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import { MyButton } from './MyButton';
|
|
1
2
|
export * from './MyInput';
|
|
2
3
|
export * from './MySelect';
|
|
3
4
|
export * from './MyCheckbox';
|
|
4
5
|
export * from './ArrayInput';
|
|
6
|
+
export * from './ArraySingle';
|
|
5
7
|
export * from './MyCheckbox';
|
|
6
8
|
export * from './MyDatePicker';
|
|
9
|
+
export * from './MyRangeDate';
|
|
7
10
|
export * from './MyColor';
|
|
11
|
+
export * from './MyIconSelect';
|
|
12
|
+
export * from './MyAutoComplete';
|
|
13
|
+
export * from './MyButton';
|
|
14
|
+
export * from './MySwitch';
|
|
8
15
|
export declare const packs: {
|
|
16
|
+
Divider: import("react").FC<import("antd").DividerProps>;
|
|
17
|
+
MyIconSelect: import("./util-types").TCommonComponent<import("./MyIconSelect").IMyIconSelectProps, string>;
|
|
9
18
|
MI: import("./util-types").TCommonComponent<import("./MyInput").IMyInputProps, string>;
|
|
10
19
|
input: import("./util-types").TCommonComponent<import("./MyInput").IMyInputProps, string>;
|
|
11
20
|
Input: import("./util-types").TCommonComponent<import("./MyInput").IMyInputProps, string>;
|
|
@@ -19,12 +28,169 @@ export declare const packs: {
|
|
|
19
28
|
single_date_picker: import("./MyDatePicker").TMyDatePicker;
|
|
20
29
|
CusDatePicker: import("./MyDatePicker").TMyDatePicker;
|
|
21
30
|
date: import("./MyDatePicker").TMyDatePicker;
|
|
31
|
+
MyRangePicker: import("react").FunctionComponent<{
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
34
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
35
|
+
isDisplay?: boolean;
|
|
36
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
37
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
40
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
41
|
+
isDisplay?: boolean;
|
|
42
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
43
|
+
};
|
|
44
|
+
RangePicker: import("react").FunctionComponent<{
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
47
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
48
|
+
isDisplay?: boolean;
|
|
49
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
50
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
53
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
54
|
+
isDisplay?: boolean;
|
|
55
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
56
|
+
};
|
|
57
|
+
rangePicker: import("react").FunctionComponent<{
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
60
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
61
|
+
isDisplay?: boolean;
|
|
62
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
63
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
66
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
67
|
+
isDisplay?: boolean;
|
|
68
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
69
|
+
};
|
|
70
|
+
range_picker: import("react").FunctionComponent<{
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
73
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
74
|
+
isDisplay?: boolean;
|
|
75
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
76
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
79
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
80
|
+
isDisplay?: boolean;
|
|
81
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
82
|
+
};
|
|
83
|
+
MyRangeDate: import("react").FunctionComponent<{
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
86
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
87
|
+
isDisplay?: boolean;
|
|
88
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
89
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
92
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
93
|
+
isDisplay?: boolean;
|
|
94
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
95
|
+
};
|
|
96
|
+
RangeDate: import("react").FunctionComponent<{
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
99
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
100
|
+
isDisplay?: boolean;
|
|
101
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
102
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
105
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
106
|
+
isDisplay?: boolean;
|
|
107
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
108
|
+
};
|
|
109
|
+
rangeDate: import("react").FunctionComponent<{
|
|
110
|
+
disabled?: boolean;
|
|
111
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
112
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
113
|
+
isDisplay?: boolean;
|
|
114
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
115
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
116
|
+
disabled?: boolean;
|
|
117
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
118
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
119
|
+
isDisplay?: boolean;
|
|
120
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
121
|
+
};
|
|
122
|
+
range_date: import("react").FunctionComponent<{
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
125
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
126
|
+
isDisplay?: boolean;
|
|
127
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
128
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
131
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
132
|
+
isDisplay?: boolean;
|
|
133
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
134
|
+
};
|
|
135
|
+
MyRangeDateTime: import("react").FunctionComponent<{
|
|
136
|
+
disabled?: boolean;
|
|
137
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
138
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
139
|
+
isDisplay?: boolean;
|
|
140
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
141
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
142
|
+
disabled?: boolean;
|
|
143
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
144
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
145
|
+
isDisplay?: boolean;
|
|
146
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
147
|
+
};
|
|
148
|
+
RangeDateTime: import("react").FunctionComponent<{
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
151
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
152
|
+
isDisplay?: boolean;
|
|
153
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
154
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
155
|
+
disabled?: boolean;
|
|
156
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
157
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
158
|
+
isDisplay?: boolean;
|
|
159
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
160
|
+
};
|
|
161
|
+
rangeDateTime: import("react").FunctionComponent<{
|
|
162
|
+
disabled?: boolean;
|
|
163
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
164
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
165
|
+
isDisplay?: boolean;
|
|
166
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
167
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
168
|
+
disabled?: boolean;
|
|
169
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
170
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
171
|
+
isDisplay?: boolean;
|
|
172
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
173
|
+
};
|
|
174
|
+
range_date_time: import("react").FunctionComponent<{
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
177
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
178
|
+
isDisplay?: boolean;
|
|
179
|
+
} & import("./MyRangeDate").IMyRangePickerProps> & {
|
|
180
|
+
DisplayFC?: import("react").FunctionComponent<{
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
value?: import("./MyRangeDate/utils").MyValue;
|
|
183
|
+
onChange?(v: import("./MyRangeDate/utils").MyValue, v2?: any): void;
|
|
184
|
+
isDisplay?: boolean;
|
|
185
|
+
} & import("./MyRangeDate").IMyRangePickerProps> | undefined;
|
|
186
|
+
};
|
|
22
187
|
MyColor: import("./util-types").TCommonComponent<import("./MyColor/types").IMyColorProps>;
|
|
23
188
|
MySwitch: import("./util-types").TCommonComponent<import("./MySwitch/types").IMySwitchProps, boolean>;
|
|
24
189
|
switch: import("./util-types").TCommonComponent<import("./MySwitch/types").IMySwitchProps, boolean>;
|
|
25
190
|
Switch: import("./util-types").TCommonComponent<import("./MySwitch/types").IMySwitchProps, boolean>;
|
|
191
|
+
MSW: import("./util-types").TCommonComponent<import("./MySwitch/types").IMySwitchProps, boolean>;
|
|
26
192
|
ArrayInput: import("./util-types").TCommonComponent<import("./ArrayInput").IArrayInputProps, string>;
|
|
27
|
-
|
|
193
|
+
ArraySingle: import("./util-types").TCommonComponent<import("./ArraySingle").IArraySingleProps, string>;
|
|
28
194
|
MySelect: import("react").LazyExoticComponent<import("./util-types").TCommonComponent<import("./MySelect").IMySelectProps, string | number>> & {
|
|
29
195
|
DisplayFC: typeof import("./MySelect/Display").DisplayFC;
|
|
30
196
|
};
|
|
@@ -41,6 +207,7 @@ export declare const packs: {
|
|
|
41
207
|
Checkbox: import("./util-types").TCommonComponent<import("./MyCheckbox").IMyCheckboxProps>;
|
|
42
208
|
MC: import("./util-types").TCommonComponent<import("./MyCheckbox").IMyCheckboxProps>;
|
|
43
209
|
checkbox: import("./util-types").TCommonComponent<import("./MyCheckbox").IMyCheckboxProps>;
|
|
210
|
+
MyButton: typeof MyButton;
|
|
44
211
|
MyAutoComplete: import("./util-types").TCommonComponent<import("./MyAutoComplete").MyAutoCompleteProps>;
|
|
45
212
|
MA: import("./util-types").TCommonComponent<import("./MyAutoComplete").MyAutoCompleteProps>;
|
|
46
213
|
AutoComplete: import("./util-types").TCommonComponent<import("./MyAutoComplete").MyAutoCompleteProps>;
|
|
@@ -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" | "
|
|
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" | "ArraySingle" | "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,27 @@
|
|
|
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 {
|
|
15
|
+
inputType?: IMchc_FormDescriptions_InputType;
|
|
12
16
|
language?: 'json' | 'javascript' | 'rust' | 'java';
|
|
13
17
|
showTime?: boolean;
|
|
14
18
|
showEdit?: boolean;
|
|
15
19
|
height?: any;
|
|
20
|
+
status?: InputStatus;
|
|
21
|
+
addonBefore?: string;
|
|
22
|
+
addonAfter?: string;
|
|
23
|
+
suffix?: string;
|
|
24
|
+
prefix?: string;
|
|
16
25
|
dependency?: {
|
|
17
26
|
show?: {
|
|
18
27
|
key: string;
|
|
@@ -30,13 +39,18 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
30
39
|
allowClear?: boolean;
|
|
31
40
|
genRowData?: (oldlist?: any[]) => any;
|
|
32
41
|
type?: 'multiple' | 'single' | 'tags' | 'number';
|
|
33
|
-
|
|
42
|
+
mode?: 'multiple' | 'single';
|
|
43
|
+
listType?: UploadListType;
|
|
44
|
+
linker?: string;
|
|
45
|
+
action?: string;
|
|
34
46
|
tip?: string;
|
|
35
47
|
span?: number;
|
|
36
48
|
min?: number;
|
|
37
49
|
max?: number;
|
|
38
50
|
labelCol?: number;
|
|
39
51
|
wrapperCol?: number;
|
|
52
|
+
popupMatchSelectWidth?: number | boolean;
|
|
53
|
+
gen_obj?: () => AnyObject;
|
|
40
54
|
rows?: number;
|
|
41
55
|
defaultValue?: any;
|
|
42
56
|
defaultChecked?: boolean;
|
|
@@ -44,13 +58,18 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
44
58
|
targetLabelCol?: number;
|
|
45
59
|
options?: TOptions | (() => TOptions);
|
|
46
60
|
fetch_options?: T_FETCH_OPTIONS;
|
|
61
|
+
fetch_options_on_open?: boolean;
|
|
47
62
|
optionKey?: string;
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
switch_type?: 'switch' | 'checkbox';
|
|
64
|
+
unchecked_text?: string;
|
|
65
|
+
checked_text?: string;
|
|
66
|
+
checked_value?: any;
|
|
67
|
+
unchecked_value?: any;
|
|
50
68
|
uniqueKey?: string;
|
|
51
69
|
separator?: string;
|
|
52
70
|
sp?: ICommonOption[];
|
|
53
|
-
format?: 'YYYY-MM-DD' | 'YYYY-MM-DD HH:mm:ss' | 'YYYY-MM-DD HH:mm' | 'HH:mm:ss' | 'HH:mm';
|
|
71
|
+
format?: 'YYYY-MM-DD' | 'YYYY-MM-DD HH:mm:ss' | 'YYYY-MM-DD HH:mm' | 'HH:mm:ss' | 'HH:mm' | null;
|
|
72
|
+
picker?: 'week' | 'month' | 'year' | 'quarter';
|
|
54
73
|
time_only?: boolean;
|
|
55
74
|
placeholder?: string;
|
|
56
75
|
disabled?: boolean;
|
|
@@ -58,14 +77,17 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
58
77
|
pressure_key1?: string;
|
|
59
78
|
pressure_key2?: string;
|
|
60
79
|
style?: CSSProperties;
|
|
61
|
-
marshal?:
|
|
80
|
+
marshal?: 0 | 1 | 2 | 3;
|
|
62
81
|
TemplateTextarea_type?: {
|
|
63
|
-
|
|
82
|
+
url?: string;
|
|
83
|
+
method?: 'post' | 'get';
|
|
84
|
+
type?: number;
|
|
64
85
|
title: string;
|
|
65
86
|
depid?: number;
|
|
66
87
|
}[];
|
|
67
88
|
defaultData?: AnyObject;
|
|
68
|
-
|
|
89
|
+
btn_text?: string;
|
|
90
|
+
on_btn_click?: (e: React.MouseEvent<HTMLElement, MouseEvent>, form?: FormInstance) => any;
|
|
69
91
|
standalone?: boolean;
|
|
70
92
|
node?: ReactNode;
|
|
71
93
|
component?: FC<{
|
|
@@ -73,10 +95,12 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
73
95
|
onChange?(v: any): void;
|
|
74
96
|
form?: FormInstance;
|
|
75
97
|
}>;
|
|
76
|
-
width?: number;
|
|
98
|
+
width?: number | string;
|
|
77
99
|
startIndex?: number;
|
|
78
100
|
inputWidth?: number;
|
|
79
101
|
size?: SizeType;
|
|
102
|
+
useDefault?: boolean;
|
|
103
|
+
useString?: boolean;
|
|
80
104
|
memorable?: boolean;
|
|
81
105
|
memorieskey?: string;
|
|
82
106
|
memoriesname?: string;
|
|
@@ -97,6 +121,9 @@ export interface IMchc_FormDescriptions_InputProps {
|
|
|
97
121
|
onPatientSelect?(v: any, form?: FormInstance): void;
|
|
98
122
|
onPatientAutoComplete?(v: any, form?: FormInstance): void;
|
|
99
123
|
on_row_value_change?(data: any[], index: number, changed?: AnyObject, form?: FormInstance): void;
|
|
124
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
125
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
126
|
+
component_map?: AnyObject<FC<any>>;
|
|
100
127
|
}
|
|
101
128
|
type IMchc_FormDescriptions_FilterTypeRaw = 'in' | 'equals' | 'contains' | 'greaterOrEqualThan' | 'lessOrEqualThan';
|
|
102
129
|
export type IMchc_FormDescriptions_FilterType = IMchc_FormDescriptions_FilterTypeRaw | `${IMchc_FormDescriptions_FilterTypeRaw},${IMchc_FormDescriptions_FilterTypeRaw}`;
|
|
@@ -133,6 +160,7 @@ export type IMchc_FormDescriptions_Field<RAW = false> = {
|
|
|
133
160
|
sort?: number;
|
|
134
161
|
align?: 'center';
|
|
135
162
|
fixed?: 'left' | 'right';
|
|
163
|
+
unit?: string;
|
|
136
164
|
required?: boolean | (() => boolean);
|
|
137
165
|
ellipsis?: {
|
|
138
166
|
showTitle?: boolean;
|
|
@@ -168,9 +196,11 @@ export type IMchc_FormDescriptions_Field<RAW = false> = {
|
|
|
168
196
|
showDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
169
197
|
requiredDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
170
198
|
disabledDeps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
199
|
+
warning_deps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
200
|
+
error_deps?: AnyObject<any[] | ((v: any) => boolean)> | ((f: FormInstance) => boolean);
|
|
171
201
|
processRemote?(v: any, form?: FormInstance): any;
|
|
172
202
|
processLocal?(v: any, form?: FormInstance): any;
|
|
173
|
-
checkWarn?(v: any, form?: FormInstance): boolean;
|
|
203
|
+
checkWarn?(v: any, form?: FormInstance): boolean | InputStatus;
|
|
174
204
|
fd_lazy?: boolean;
|
|
175
205
|
};
|
|
176
206
|
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
|
-
import { IMchc_FormDescriptions_Field_Nullable, TOptions } from "../util-types";
|
|
4
|
-
|
|
4
|
+
import { IMchc_FormDescriptions_Field_Nullable, IMchc_FormDescriptions_InputProps, TOptions } from "../util-types";
|
|
5
|
+
import { FormInstance } from "antd";
|
|
6
|
+
export type TMarshal = IMchc_FormDescriptions_InputProps['marshal'];
|
|
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,15 @@ 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;
|
|
20
|
+
useDefault?: boolean;
|
|
16
21
|
sp?: any[];
|
|
17
22
|
config?: any;
|
|
18
23
|
startIndex?: any;
|
|
24
|
+
display_linker?: string;
|
|
25
|
+
linker?: string;
|
|
26
|
+
fetch_options_on_open?: boolean;
|
|
19
27
|
}
|
|
20
28
|
export declare function get_check_invert_values(configs: IMchc_FormDescriptions_Field_Nullable[]): {
|
|
21
29
|
[x: string]: any[];
|
|
@@ -30,10 +38,11 @@ export declare function use_options(props: ICompatibleProps): {
|
|
|
30
38
|
data: ICommonOption[];
|
|
31
39
|
setData: React.Dispatch<React.SetStateAction<ICommonOption[]>>;
|
|
32
40
|
display_node: React.JSX.Element;
|
|
41
|
+
process_options: () => void;
|
|
33
42
|
};
|
|
34
43
|
export declare function parse_MC_option(props: ICompatibleProps): ICommonOption[];
|
|
35
44
|
export declare function parse_MC_dict_options(props?: ICompatibleProps): ICommonOption[] | undefined;
|
|
36
|
-
export declare function displayValue(
|
|
45
|
+
export declare function displayValue(_opt: ICommonOption[], value: ICommonOption[], l?: string): string;
|
|
37
46
|
export declare function get_unknown_conf(props: {
|
|
38
47
|
showUnknown?: boolean;
|
|
39
48
|
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 {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function use_array_marshal<T = any>(marshal?: 0 | 1 | 2, _value?: any, _onChange?: (v: any) => void, linker?: string): {
|
|
2
|
+
safe_value: T[];
|
|
3
|
+
set_safe_value: import("react").Dispatch<import("react").SetStateAction<T[]>>;
|
|
4
|
+
onChangeSafeValue: (_v: any[]) => void;
|
|
5
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noah-libjs/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
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.9",
|
|
42
|
+
"@noah-libjs/utils": "0.0.9"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"license": "MIT",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "bb49d078600e65d77b842887c63be3b254faf999"
|
|
49
49
|
}
|