@para-ui/core 5.0.2 → 5.0.3-beta.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/FieldForm/component.json +22 -1
- package/FormItemGroup/component.json +72 -0
- package/Menu/component.json +9 -2
- package/es/Checkbox/index.js +26 -24
- package/es/CheckboxGroup/index.css +1 -1
- package/es/CheckboxGroup/style/index.css +1 -1
- package/es/ExpressionInput/Popup.js +11 -4
- package/es/FieldForm/ErrorList.js +9 -8
- package/es/FieldForm/FieldFormItem/ItemHolder.d.ts +2 -0
- package/es/FieldForm/FieldFormItem/ItemHolder.js +78 -68
- package/es/FieldForm/FieldFormItem/index.d.ts +3 -0
- package/es/FieldForm/FieldFormItem/index.js +131 -120
- package/es/FieldForm/Form.d.ts +3 -1
- package/es/FieldForm/Form.js +54 -50
- package/es/FieldForm/compactControlMarker.d.ts +18 -0
- package/es/FieldForm/compactControlMarker.js +5 -0
- package/es/FieldForm/component.json +22 -1
- package/es/FieldForm/context.d.ts +3 -1
- package/es/FieldForm/context.js +6 -5
- package/es/FieldForm/index.css +1 -1
- package/es/FieldForm/index.d.ts +2 -0
- package/es/FieldForm/index.js +13 -9
- package/es/FieldForm/interface.d.ts +9 -0
- package/es/FieldForm/style/index.css +1 -1
- package/es/FieldForm/util.d.ts +14 -0
- package/es/FieldForm/util.js +41 -17
- package/es/FormItemGroup/component.json +72 -0
- package/es/FormItemGroup/index.css +1 -0
- package/es/FormItemGroup/index.d.ts +14 -0
- package/es/FormItemGroup/index.js +27 -0
- package/es/FormItemGroup/style/css.js +1 -0
- package/es/FormItemGroup/style/index.css +1 -0
- package/es/FormItemGroup/style/index.js +1 -0
- package/es/HelperText/index.js +15 -13
- package/es/Menu/component.json +9 -2
- package/es/Menu/index.css +1 -1
- package/es/Menu/interface.d.ts +2 -0
- package/es/Menu/style/index.css +1 -1
- package/es/Menu/verticalMenuList.js +378 -361
- package/es/RadioGroup/index.css +1 -1
- package/es/RadioGroup/style/index.css +1 -1
- package/es/RangeInput/index.js +60 -60
- package/es/Switch/index.js +30 -28
- package/es/Tag/TagGroup.js +29 -32
- package/es/Tag/index.js +5 -5
- package/es/index.d.ts +2 -0
- package/es/index.js +175 -169
- package/lib/Checkbox/index.js +1 -1
- package/lib/CheckboxGroup/index.css +1 -1
- package/lib/CheckboxGroup/style/index.css +1 -1
- package/lib/ExpressionInput/Popup.js +1 -1
- package/lib/FieldForm/ErrorList.js +1 -1
- package/lib/FieldForm/FieldFormItem/ItemHolder.d.ts +2 -0
- package/lib/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/lib/FieldForm/FieldFormItem/index.d.ts +3 -0
- package/lib/FieldForm/FieldFormItem/index.js +1 -1
- package/lib/FieldForm/Form.d.ts +3 -1
- package/lib/FieldForm/Form.js +1 -1
- package/lib/FieldForm/compactControlMarker.d.ts +18 -0
- package/lib/FieldForm/compactControlMarker.js +2 -0
- package/lib/FieldForm/component.json +22 -1
- package/lib/FieldForm/context.d.ts +3 -1
- package/lib/FieldForm/context.js +1 -1
- package/lib/FieldForm/index.css +1 -1
- package/lib/FieldForm/index.d.ts +2 -0
- package/lib/FieldForm/index.js +1 -1
- package/lib/FieldForm/interface.d.ts +9 -0
- package/lib/FieldForm/style/index.css +1 -1
- package/lib/FieldForm/util.d.ts +14 -0
- package/lib/FieldForm/util.js +1 -1
- package/lib/FormItemGroup/component.json +72 -0
- package/lib/FormItemGroup/index.css +1 -0
- package/lib/FormItemGroup/index.d.ts +14 -0
- package/lib/FormItemGroup/index.js +2 -0
- package/lib/FormItemGroup/style/css.js +1 -0
- package/lib/FormItemGroup/style/index.css +1 -0
- package/lib/FormItemGroup/style/index.js +1 -0
- package/lib/HelperText/index.js +1 -1
- package/lib/Menu/component.json +9 -2
- package/lib/Menu/index.css +1 -1
- package/lib/Menu/interface.d.ts +2 -0
- package/lib/Menu/style/index.css +1 -1
- package/lib/Menu/verticalMenuList.js +1 -1
- package/lib/RadioGroup/index.css +1 -1
- package/lib/RadioGroup/style/index.css +1 -1
- package/lib/RangeInput/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tag/TagGroup.js +1 -1
- package/lib/Tag/index.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -1
- package/package.json +14 -1
package/es/index.js
CHANGED
|
@@ -4,23 +4,23 @@ import { default as l, checkArgvData as u, formatDataToObject as s, formatObject
|
|
|
4
4
|
import { AutoBox as n } from "./AutoBox/index.js";
|
|
5
5
|
import { AutoButton as C } from "./AutoButton/index.js";
|
|
6
6
|
import { default as T } from "./AutoTips/index.js";
|
|
7
|
-
import { Badge as
|
|
8
|
-
import { Breadcrumbs as
|
|
7
|
+
import { Badge as B } from "./Badge/index.js";
|
|
8
|
+
import { Breadcrumbs as S } from "./Breadcrumbs/index.js";
|
|
9
9
|
import { Button as k } from "./Button/index.js";
|
|
10
|
-
import { ButtonGroup as
|
|
11
|
-
import { Card as
|
|
12
|
-
import { Carousel as
|
|
10
|
+
import { ButtonGroup as R } from "./ButtonGroup/index.js";
|
|
11
|
+
import { Card as D } from "./Card/index.js";
|
|
12
|
+
import { Carousel as y } from "./Carousel/index.js";
|
|
13
13
|
import { default as G } from "./Cascader/Cascader.js";
|
|
14
14
|
import './Tree/style/index.css';import './ColorPicker/index.css';import './Cascader/index.css';/* empty css */
|
|
15
|
-
import { Checkbox as
|
|
16
|
-
import { CheckboxGroup as
|
|
17
|
-
import { default as E, CompletionItemKind as
|
|
18
|
-
import { Collapse as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
15
|
+
import { Checkbox as O } from "./Checkbox/index.js";
|
|
16
|
+
import { CheckboxGroup as v } from "./CheckboxGroup/index.js";
|
|
17
|
+
import { default as E, CompletionItemKind as H } from "./CodeEditor/index.js";
|
|
18
|
+
import { Collapse as Y } from "./Collapse/index.js";
|
|
19
|
+
import { default as Q } from "./CollapseBox/index.js";
|
|
20
|
+
import { default as K } from "./CollapseLayout/index.js";
|
|
21
|
+
import { default as q } from "./ColorPicker/swatchesPicker/index.js";
|
|
22
|
+
import { default as J } from "./ColorPicker/compactPicker/index.js";
|
|
23
|
+
import { default as X } from "./ColorPicker/chromePicker/index.js";
|
|
24
24
|
import { default as $ } from "./ColorPicker/sketchPicker/index.js";
|
|
25
25
|
/* empty css */
|
|
26
26
|
import { ComboSelect as ro } from "./ComboSelect/index.js";
|
|
@@ -32,79 +32,82 @@ import { default as so } from "./DatePicker/index.js";
|
|
|
32
32
|
import { default as no } from "./Descriptions/index.js";
|
|
33
33
|
import { Desktop as Co } from "./Desktop/index.js";
|
|
34
34
|
import { DragVerify as To } from "./DragVerify/index.js";
|
|
35
|
-
import { Drawer as
|
|
36
|
-
import { Dropdown as
|
|
35
|
+
import { Drawer as Bo } from "./Drawer/index.js";
|
|
36
|
+
import { Dropdown as So } from "./Dropdown/index.js";
|
|
37
37
|
import { default as ko } from "./DynamicMultiBox/index.js";
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
38
|
+
import { default as Ro } from "./Empty/index.js";
|
|
39
|
+
import { default as Do } from "./ExpressionInput/index.js";
|
|
40
|
+
import { default as yo } from "./FieldForm/index.js";
|
|
41
41
|
import { default as Go } from "./Form/index.js";
|
|
42
|
-
import { default as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import { default as cr } from "./
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
42
|
+
import { default as Oo } from "./FormItem/index.js";
|
|
43
|
+
import { default as vo } from "./FormItemGroup/index.js";
|
|
44
|
+
import { useModal as Eo, FunctionModalProvider as Ho, useClose as No } from "./FunctionModal/modalContext.js";
|
|
45
|
+
import { default as _o } from "./GlobalContext/index.js";
|
|
46
|
+
import { default as Uo } from "./Help/index.js";
|
|
47
|
+
import { default as Vo } from "./HelperText/index.js";
|
|
48
|
+
import { default as zo } from "./Image/index.js";
|
|
49
|
+
import { InputCode as Wo } from "./InputCode/index.js";
|
|
50
|
+
import { InputLang as Zo } from "./InputLang/index.js";
|
|
51
|
+
import { InputNumber as or } from "./InputNumber/index.js";
|
|
52
|
+
import { default as er } from "./Label/index.js";
|
|
53
|
+
import { Loading as ar } from "./Loading/index.js";
|
|
54
|
+
import { Menu as pr } from "./Menu/index.js";
|
|
55
|
+
import { default as xr, MessageBar as lr } from "./Message/index.js";
|
|
56
|
+
import { Modal as sr } from "./Modal/index.js";
|
|
57
|
+
import { MultiBox as ir } from "./MultiBox/index.js";
|
|
58
|
+
import { default as cr } from "./Notification/index.js";
|
|
59
|
+
import { default as gr } from "./OperateBtn/index.js";
|
|
60
|
+
import { PageHeader as Pr } from "./PageHeader/index.js";
|
|
61
|
+
import { Pagination as Mr } from "./Pagination/index.js";
|
|
62
|
+
import { ParauiProvider as br } from "./ParauiProvider/index.js";
|
|
63
|
+
import { default as Ar } from "./PasswordRules/index.js";
|
|
64
|
+
import { PopConfirm as hr } from "./PopConfirm/index.js";
|
|
65
|
+
import { PopMenu as Ir } from "./PopMenu/index.js";
|
|
66
|
+
import { Popover as Fr } from "./Popover/index.js";
|
|
67
|
+
import { Progress as Lr } from "./Progress/index.js";
|
|
68
|
+
import { Prompt as jr } from "./Prompt/index.js";
|
|
68
69
|
import { default as wr } from "./Querying/index.js";
|
|
69
|
-
import { QuickReply as
|
|
70
|
-
import { Radio as
|
|
70
|
+
import { QuickReply as Hr } from "./QuickReply/index.js";
|
|
71
|
+
import { Radio as Yr } from "./Radio/index.js";
|
|
71
72
|
import { RadioGroup as Qr } from "./RadioGroup/index.js";
|
|
72
|
-
import { RangeInput as
|
|
73
|
-
import { Result as
|
|
74
|
-
import { default as
|
|
75
|
-
import { Search as
|
|
76
|
-
import { default as
|
|
77
|
-
import { SelectInput as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { SingleBox as
|
|
81
|
-
import { Slider as
|
|
82
|
-
import { SortBox as
|
|
83
|
-
import { Status as
|
|
84
|
-
import { Stepper as
|
|
85
|
-
import { Switch as
|
|
86
|
-
import { default as
|
|
87
|
-
import { Tabs as
|
|
88
|
-
import { Tag as
|
|
89
|
-
import { default as
|
|
90
|
-
import { TextField as
|
|
91
|
-
import { default as
|
|
92
|
-
import { Timeline as
|
|
93
|
-
import { Title as
|
|
73
|
+
import { RangeInput as Kr } from "./RangeInput/index.js";
|
|
74
|
+
import { Result as qr } from "./Result/index.js";
|
|
75
|
+
import { default as Jr } from "./ScrollBar/index.js";
|
|
76
|
+
import { Search as Xr } from "./Search/index.js";
|
|
77
|
+
import { default as $r } from "./Select/index.js";
|
|
78
|
+
import { SelectInput as re } from "./SelectInput/index.js";
|
|
79
|
+
import { default as te, handFieldConfig as ae } from "./Selector/index.js";
|
|
80
|
+
import { default as pe } from "./SelectorPicker/index.js";
|
|
81
|
+
import { SingleBox as xe } from "./SingleBox/index.js";
|
|
82
|
+
import { Slider as ue } from "./Slider/index.js";
|
|
83
|
+
import { SortBox as de } from "./SortBox/index.js";
|
|
84
|
+
import { Status as ne } from "./Status/index.js";
|
|
85
|
+
import { Stepper as Ce } from "./Stepper/index.js";
|
|
86
|
+
import { Switch as Te } from "./Switch/index.js";
|
|
87
|
+
import { default as Be } from "./Table/index.js";
|
|
88
|
+
import { Tabs as Se } from "./Tabs/index.js";
|
|
89
|
+
import { Tag as ke } from "./Tag/index.js";
|
|
90
|
+
import { default as Re } from "./TextEditor/index.js";
|
|
91
|
+
import { TextField as De } from "./TextField/index.js";
|
|
92
|
+
import { default as ye } from "./TimePicker/index.js";
|
|
93
|
+
import { Timeline as Ge } from "./Timeline/index.js";
|
|
94
|
+
import { Title as Oe } from "./Title/index.js";
|
|
94
95
|
import { ToggleButton as ve } from "./ToggleButton/index.js";
|
|
95
|
-
import { Tooltip as
|
|
96
|
-
import { SSortablejs as
|
|
96
|
+
import { Tooltip as Ee } from "./Tooltip/index.js";
|
|
97
|
+
import { SSortablejs as Ne, Transfer as Ye } from "./Transfer/index.js";
|
|
97
98
|
import { default as Qe } from "./Tree/Tree.js";
|
|
98
99
|
/* empty css */
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
101
|
-
import { default as
|
|
102
|
-
import { default as
|
|
103
|
-
import { QuickReplyCode as
|
|
104
|
-
import { default as
|
|
105
|
-
import { default as
|
|
106
|
-
import { Confirm as
|
|
107
|
-
import {
|
|
100
|
+
import { default as Ke } from "./Upload/index.js";
|
|
101
|
+
import { default as qe, getDateYYYYMMddHHMM as ze, isObject as Je, pixelReplacement as We } from "./Utils/index.js";
|
|
102
|
+
import { default as Ze } from "./locale/index2.js";
|
|
103
|
+
import { default as ot } from "./AutoTips/autoTipsMultiline/index.js";
|
|
104
|
+
import { QuickReplyCode as et } from "./QuickReply/QuickReplyCode/index.js";
|
|
105
|
+
import { default as at } from "./Tag/TagGroup.js";
|
|
106
|
+
import { default as pt } from "./ToggleButton/ToggleButtonGroup.js";
|
|
107
|
+
import { Confirm as xt } from "./Modal/Confirm/index.js";
|
|
108
|
+
import { PARA_UI_COMPACT_CONTROL_MARKER as ut } from "./FieldForm/compactControlMarker.js";
|
|
109
|
+
import { changeConfirmLocale as dt, getConfirmLocale as it } from "./GlobalContext/confirmLocale.js";
|
|
110
|
+
import { joinNamePath as ct } from "./FieldForm/util.js";
|
|
108
111
|
export {
|
|
109
112
|
f as AlignBox,
|
|
110
113
|
m as Anchor,
|
|
@@ -112,26 +115,26 @@ export {
|
|
|
112
115
|
n as AutoBox,
|
|
113
116
|
C as AutoButton,
|
|
114
117
|
T as AutoTips,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
ot as AutoTipsMultiline,
|
|
119
|
+
B as Badge,
|
|
120
|
+
S as Breadcrumbs,
|
|
118
121
|
k as Button,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
R as ButtonGroup,
|
|
123
|
+
D as Card,
|
|
124
|
+
y as Carousel,
|
|
122
125
|
G as Cascader,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
O as Checkbox,
|
|
127
|
+
v as CheckboxGroup,
|
|
128
|
+
X as ChromePicker,
|
|
126
129
|
E as CodeEditor,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
Y as Collapse,
|
|
131
|
+
Q as CollapseBox,
|
|
132
|
+
K as CollapseLayout,
|
|
130
133
|
$ as ColorPicker,
|
|
131
134
|
ro as ComboSelect,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
J as CompactPicker,
|
|
136
|
+
H as CompletionItemKind,
|
|
137
|
+
xt as Confirm,
|
|
135
138
|
to as Container,
|
|
136
139
|
fo as ContentBox,
|
|
137
140
|
mo as CopyText,
|
|
@@ -140,88 +143,91 @@ export {
|
|
|
140
143
|
no as Descriptions,
|
|
141
144
|
Co as Desktop,
|
|
142
145
|
To as DragVerify,
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
Bo as Drawer,
|
|
147
|
+
So as Dropdown,
|
|
145
148
|
ko as DynamicMultiBox,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
Ro as Empty,
|
|
150
|
+
Do as ExpressionInput,
|
|
151
|
+
yo as FieldForm,
|
|
149
152
|
Go as Form,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
or as
|
|
161
|
-
er as
|
|
162
|
-
ar as
|
|
163
|
-
pr as
|
|
164
|
-
|
|
165
|
-
lr as
|
|
166
|
-
sr as
|
|
167
|
-
ir as
|
|
168
|
-
cr as
|
|
169
|
-
gr as
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
153
|
+
Oo as FormItem,
|
|
154
|
+
vo as FormItemGroup,
|
|
155
|
+
Eo as FunctionModal,
|
|
156
|
+
Ho as FunctionModalProvider,
|
|
157
|
+
_o as GlobalContext,
|
|
158
|
+
Uo as Help,
|
|
159
|
+
Vo as HelperText,
|
|
160
|
+
zo as Image,
|
|
161
|
+
Wo as InputCode,
|
|
162
|
+
Zo as InputLang,
|
|
163
|
+
or as InputNumber,
|
|
164
|
+
er as Label,
|
|
165
|
+
ar as Loading,
|
|
166
|
+
pr as Menu,
|
|
167
|
+
xr as Message,
|
|
168
|
+
lr as MessageBar,
|
|
169
|
+
sr as Modal,
|
|
170
|
+
ir as MultiBox,
|
|
171
|
+
cr as Notification,
|
|
172
|
+
gr as OperateBtn,
|
|
173
|
+
ut as PARA_UI_COMPACT_CONTROL_MARKER,
|
|
174
|
+
Pr as PageHeader,
|
|
175
|
+
Mr as Pagination,
|
|
176
|
+
br as ParauiProvider,
|
|
177
|
+
Ar as PasswordRules,
|
|
178
|
+
hr as PopConfirm,
|
|
179
|
+
Ir as PopMenu,
|
|
180
|
+
Fr as Popover,
|
|
181
|
+
Lr as Progress,
|
|
182
|
+
jr as Prompt,
|
|
178
183
|
wr as Querying,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
Hr as QuickReply,
|
|
185
|
+
et as QuickReplyCode,
|
|
186
|
+
Yr as Radio,
|
|
182
187
|
Qr as RadioGroup,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
188
|
+
Kr as RangeInput,
|
|
189
|
+
qr as Result,
|
|
190
|
+
Ne as SSortablejs,
|
|
191
|
+
Jr as ScrollBar,
|
|
192
|
+
Xr as Search,
|
|
193
|
+
$r as Select,
|
|
194
|
+
re as SelectInput,
|
|
195
|
+
te as Selector,
|
|
196
|
+
pe as SelectorPicker,
|
|
197
|
+
xe as SingleBox,
|
|
198
|
+
ue as Slider,
|
|
199
|
+
de as SortBox,
|
|
200
|
+
ne as Status,
|
|
201
|
+
Ce as Stepper,
|
|
202
|
+
q as SwatchesPicker,
|
|
203
|
+
Te as Switch,
|
|
204
|
+
Be as Table,
|
|
205
|
+
Se as Tabs,
|
|
206
|
+
ke as Tag,
|
|
207
|
+
at as TagGroup,
|
|
208
|
+
Re as TextEditor,
|
|
209
|
+
De as TextField,
|
|
210
|
+
ye as TimePicker,
|
|
211
|
+
Ge as Timeline,
|
|
212
|
+
Oe as Title,
|
|
208
213
|
ve as ToggleButton,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
214
|
+
pt as ToggleButtonGroup,
|
|
215
|
+
Ee as Tooltip,
|
|
216
|
+
Ye as Transfer,
|
|
212
217
|
Qe as Tree,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
218
|
+
Ke as Upload,
|
|
219
|
+
qe as Utils,
|
|
220
|
+
dt as changeConfirmLocale,
|
|
216
221
|
u as checkArgvData,
|
|
217
222
|
s as formatDataToObject,
|
|
218
223
|
d as formatObjectToData,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
it as getConfirmLocale,
|
|
225
|
+
ze as getDateYYYYMMddHHMM,
|
|
226
|
+
ae as handFieldConfig,
|
|
227
|
+
Je as isObject,
|
|
228
|
+
ct as joinNamePath,
|
|
229
|
+
Ze as locale,
|
|
230
|
+
We as pixelReplacement,
|
|
231
|
+
No as useClose
|
|
226
232
|
};
|
|
227
233
|
//# sourceMappingURL=index.js.map
|
package/lib/Checkbox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const l=require("../_virtual/jsx-runtime.js"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const l=require("../_virtual/jsx-runtime.js"),o=require("react"),E=require("../Label/index.js"),n=require("../GlobalContext/constant.js"),T=require("../Tooltip/index.js"),g=require("../FieldForm/compactControlMarker.js");;/* empty css */const d=s=>{const{className:u="",label:i,labelTooltip:t,size:x="large",disabled:h=!1,disabledTooltip:f,indeterminate:b=!1,width:k,onChange:r,style:p}=s,[c,a]=o.useState(!1);o.useEffect(()=>{s.defaultChecked!==void 0&&a(s.defaultChecked)},[]),o.useEffect(()=>{s.checked!==void 0&&a(s.checked)},[s.checked]);const $=e=>{if(e.preventDefault(),h)return;if(b){s.checked===void 0&&a(!0),r&&r(e,!0);return}s.checked===void 0&&a(!c);const m=e.target;m.checked=!c,m.value=String(!c),r&&r(e,!c)},j=()=>{let e=`${n.$prefixCls}-checkbox`;return u&&(e+=` ${u}`),x&&(e+=` ${n.$prefixCls}-checkbox-${x}`),h&&(e+=` ${n.$prefixCls}-checkbox-disabled`),b?e+=` ${n.$prefixCls}-checkbox-indeterminate`:c&&(e+=` ${n.$prefixCls}-checkbox-checked`),t&&t.tooltipType&&(e+=` ${n.$prefixCls}-checkbox-${t.tooltipType}`),e},R=()=>{let e="checkbox-label";return t&&t.className&&(e+=` ${t.className}`),e},N=()=>{let e=" checkbox-help";return t&&t.helpClassName&&(e+=` ${t.helpClassName}`),e},v=()=>{const e={...p};return k&&(e.width=k),e},C=()=>l.jsxRuntimeExports.jsxs("label",{className:j(),onClick:$,style:v(),children:[l.jsxRuntimeExports.jsxs("span",{className:"checkbox-box",children:[l.jsxRuntimeExports.jsx("input",{type:"checkbox",value:String(c),...s.inputProps}),l.jsxRuntimeExports.jsx("span",{className:"checkbox-box-inner"})]}),i!==void 0&&i!==""&&i!==null?l.jsxRuntimeExports.jsx(E.default,{label:i,...t,helpClassName:N(),className:R()}):null]});return f?l.jsxRuntimeExports.jsx(T.Tooltip,{disabled:!0,...f,children:C()}):C()};d[g.PARA_UI_COMPACT_CONTROL_MARKER]=!0;exports.Checkbox=d;exports.default=d;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.paraui-v4-checkbox-group{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400
|
|
1
|
+
@charset "UTF-8";.paraui-v4-checkbox-group{width:100%;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-v4-checkbox-group>.checkbox-group-label{margin-bottom:6px}.paraui-v4-checkbox-group>.checkbox-group-content{line-height:0}.paraui-v4-checkbox-group>.checkbox-group-content .checkbox-item-box{margin-bottom:4px}.paraui-v4-checkbox-group>.checkbox-group-content>.checkbox-group-content-item{margin-bottom:6px}.paraui-v4-checkbox-group>.checkbox-group-content>.checkbox-group-content-item:last-child{margin-bottom:0}.paraui-v4-checkbox-group:not(.paraui-v4-checkbox-group-column)>.checkbox-group-content{margin-bottom:-4px}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content{display:flex;flex-direction:column}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content>span{margin-bottom:10px}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content>span:last-child{margin-bottom:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.paraui-v4-checkbox-group{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400
|
|
1
|
+
.paraui-v4-checkbox-group{width:100%;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400}.paraui-v4-checkbox-group>.checkbox-group-label{margin-bottom:6px}.paraui-v4-checkbox-group>.checkbox-group-content{line-height:0}.paraui-v4-checkbox-group>.checkbox-group-content .checkbox-item-box{margin-bottom:4px}.paraui-v4-checkbox-group>.checkbox-group-content>.checkbox-group-content-item{margin-bottom:6px}.paraui-v4-checkbox-group>.checkbox-group-content>.checkbox-group-content-item:last-child{margin-bottom:0}.paraui-v4-checkbox-group:not(.paraui-v4-checkbox-group-column)>.checkbox-group-content{margin-bottom:-4px}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content{display:flex;flex-direction:column}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content>span{margin-bottom:10px}.paraui-v4-checkbox-group.paraui-v4-checkbox-group-column>.checkbox-group-content>span:last-child{margin-bottom:0}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../_virtual/jsx-runtime.js"),O=require("react"),P=require("../para-ui-core/node_modules/@para-ui/icons/Lock/index.js"),o=require("../GlobalContext/constant.js");function I(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const x=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(c,l,x.get?x:{enumerable:!0,get:()=>n[l]})}}return c.default=n,Object.freeze(c)}const a=I(O),i=30,j=240,$=4,R=a.forwardRef((n,c)=>{const{instanceClass:l,visible:x,rect:d,header:E,candidates:s,highlight:m,virtualizeThreshold:T,onSelect:b,onHighlightChange:C}=n,[y,g]=a.useState(0),f=a.useRef(null);if(a.useEffect(()=>{g(0),f.current&&(f.current.scrollTop=0)},[s]),a.useEffect(()=>{const e=f.current;if(!e)return;const p=m*i,u=e.scrollTop,v=u+e.clientHeight;p<u?e.scrollTop=p:p+i>v&&(e.scrollTop=p+i-e.clientHeight)},[m]),!x||s.length===0)return null;const r=s.length>T,h=r?Math.max(0,Math.floor(y/i)-$):0,w=r?Math.ceil(j/i)+$*2:s.length,N=r?Math.min(s.length,h+w):s.length,M=s.slice(h,N),S=h*i;return t.jsxRuntimeExports.jsxs("div",{ref:c,className:`${o.$prefixCls}-expression-input-popup ${l}`,style:{position:"fixed",top:d.top,left:d.left,width:d.width},children:[t.jsxRuntimeExports.jsx("div",{className:`${o.$prefixCls}-expression-input-popup-header`,children:E}),t.jsxRuntimeExports.jsx("div",{ref:f,className:`${o.$prefixCls}-expression-input-popup-list`,style:{maxHeight:j,overflowY:"auto"},onScroll:e=>{r&&g(e.currentTarget.scrollTop)},children:t.jsxRuntimeExports.jsx("div",{style:{height:r?s.length*i:void 0,position:"relative"},children:t.jsxRuntimeExports.jsx("div",{style:{position:r?"absolute":void 0,top:r?S:void 0,left:0,right:0},children:M.map((e,p)=>{const u=h+p,v=u===m;return t.jsxRuntimeExports.jsxs("div",{"data-testid":`expr-candidate-row-${e.value}`,className:`${o.$prefixCls}-expression-input-popup-item${v?` ${o.$prefixCls}-expression-input-popup-item-active`:""}`,style:{height:i},onMouseEnter:()=>C(u),onMouseDown:H=>{H.preventDefault(),b(e)},children:[t.jsxRuntimeExports.jsx("span",{className:`${o.$prefixCls}-expression-input-popup-item-value`,children:e.label??e.value}),e.desc&&t.jsxRuntimeExports.jsx("span",{className:`${o.$prefixCls}-expression-input-popup-item-desc`,children:e.desc}),e.sensitive&&t.jsxRuntimeExports.jsx(P.Lock,{"data-testid":`expr-candidate-lock-${e.value}`,className:`${o.$prefixCls}-expression-input-popup-item-lock`})]},e.value)})})})})]})});R.displayName="Popup";exports.Popup=R;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../_virtual/jsx-runtime.js"),O=require("react"),P=require("../para-ui-core/node_modules/@para-ui/icons/Lock/index.js"),o=require("../GlobalContext/constant.js");function I(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const x=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(c,l,x.get?x:{enumerable:!0,get:()=>n[l]})}}return c.default=n,Object.freeze(c)}const a=I(O),i=30,j=240,$=4,R=a.forwardRef((n,c)=>{const{instanceClass:l,visible:x,rect:d,header:E,candidates:s,highlight:m,virtualizeThreshold:T,onSelect:b,onHighlightChange:C}=n,[y,g]=a.useState(0),f=a.useRef(null);if(a.useEffect(()=>{g(0),f.current&&(f.current.scrollTop=0)},[s]),a.useEffect(()=>{const e=f.current;if(!e)return;const p=m*i,u=e.scrollTop,v=u+e.clientHeight;p<u?e.scrollTop=p:p+i>v&&(e.scrollTop=p+i-e.clientHeight)},[m]),!x||s.length===0)return null;const r=s.length>T,h=r?Math.max(0,Math.floor(y/i)-$):0,w=r?Math.ceil(j/i)+$*2:s.length,N=r?Math.min(s.length,h+w):s.length,M=s.slice(h,N),S=h*i;return t.jsxRuntimeExports.jsxs("div",{ref:c,className:`${o.$prefixCls}-expression-input-popup ${l}`,style:{position:"fixed",top:d.top,left:d.left,width:d.width},children:[t.jsxRuntimeExports.jsx("div",{className:`${o.$prefixCls}-expression-input-popup-header`,children:E}),t.jsxRuntimeExports.jsx("div",{ref:f,className:`${o.$prefixCls}-expression-input-popup-list`,style:{maxHeight:j,overflowY:"auto"},onScroll:e=>{r&&g(e.currentTarget.scrollTop)},children:t.jsxRuntimeExports.jsx("div",{style:{height:r?s.length*i:void 0,position:"relative"},children:t.jsxRuntimeExports.jsx("div",{style:{position:r?"absolute":void 0,top:r?S:void 0,left:0,right:0},children:M.map((e,p)=>{const u=h+p,v=u===m;return t.jsxRuntimeExports.jsxs("div",{"data-testid":`expr-candidate-row-${e.value}`,className:`${o.$prefixCls}-expression-input-popup-item${v?` ${o.$prefixCls}-expression-input-popup-item-active`:""}`,style:{height:i},onMouseEnter:()=>C(u),onMouseDown:H=>{H.preventDefault(),b(e)},children:[t.jsxRuntimeExports.jsx("span",{className:`${o.$prefixCls}-expression-input-popup-item-value`,children:e.label??e.value}),e.desc&&t.jsxRuntimeExports.jsx("span",{className:`${o.$prefixCls}-expression-input-popup-item-desc`,title:e.desc,children:e.desc}),e.sensitive&&t.jsxRuntimeExports.jsx(P.Lock,{"data-testid":`expr-candidate-lock-${e.value}`,className:`${o.$prefixCls}-expression-input-popup-item-lock`})]},e.value)})})})})]})});R.displayName="Popup";exports.Popup=R;
|
|
2
2
|
//# sourceMappingURL=Popup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../_virtual/jsx-runtime.js"),l=require("react"),m=require("../HelperText/index.js");function a(r,t,s,n=0){return{key:typeof r=="string"?r:`${t}-${n}`,error:r,errorStatus:s}}const c=({helperText:r,helpStatus:t,errors:s=[],warnings:n=[]})=>{const o=l.useMemo(()=>r!=null?[a(r,"help",t)]:[...s.map((e,u)=>a(e,"error","error",u)),...n.map((e,u)=>a(e,"warning","warning",u))],[r,s,n,t]);return i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:Array.isArray(o)&&o.length?o.map(e=>i.jsxRuntimeExports.jsx("div",{className:`is-${e.errorStatus}`,children:i.jsxRuntimeExports.jsx(m.default,{error:!0,helperText:e.error,hideErrorDom:!1})},e.key)):null})};exports.default=c;
|
|
2
2
|
//# sourceMappingURL=ErrorList.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Meta } from 'rc-field-form/lib/interface';
|
|
3
|
+
import { ItemDecoratorMeta } from '../interface';
|
|
3
4
|
import { ReportMetaChange } from '../context';
|
|
4
5
|
import { FormItemProps } from './index';
|
|
5
6
|
export interface ItemHolderProps extends FormItemProps {
|
|
@@ -7,6 +8,7 @@ export interface ItemHolderProps extends FormItemProps {
|
|
|
7
8
|
errors: ReactNode[];
|
|
8
9
|
warnings: ReactNode[];
|
|
9
10
|
meta: Meta;
|
|
11
|
+
identityMeta: ItemDecoratorMeta;
|
|
10
12
|
onSubItemMetaChange: ReportMetaChange;
|
|
11
13
|
}
|
|
12
14
|
declare function ItemHolder(props: ItemHolderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../_virtual/jsx-runtime.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../_virtual/jsx-runtime.js"),r=require("react"),V=require("../../_virtual/index.js"),W=require("rc-util/lib/Dom/isVisible"),A=require("rc-util/lib/hooks/useLayoutEffect"),S=require("../context.js"),D=require("../FormItemLabel.js"),k=require("../FormItemInput.js"),z=require("./StatusProvider.js");function G(u){const{className:I,style:q,helperText:i,errors:c,warnings:m,status:e,hidden:E,children:v,fieldId:s,required:R,identityMeta:d,onSubItemMetaChange:C,layout:g,hideLabel:M,hideError:L,noSpacing:P,spacing:x,label:$,labelProps:N,labelAlign:_,colon:w,labelWidth:B,labelWrap:F}=u,{prefixCls:o,layout:p,spacing:f,itemDecorator:h}=r.useContext(S.FormContext),l=r.useMemo(()=>g??p,[g,p]),b=r.useMemo(()=>x??f,[x,f]),n=r.useRef(null),j=!!(i!=null||c.length||m.length),H=!!n.current&&W(n.current),[O,y]=r.useState(null);A(()=>{if(j&&n.current){const a=getComputedStyle(n.current);y(parseInt(a.marginBottom,10))}},[j,H]);const T=a=>{a||y(null)};return t.jsxRuntimeExports.jsx(z.default,{...u,prefixCls:o,children:t.jsxRuntimeExports.jsxs("div",{className:V.default(I,`${o}-item`,{[`${o}-item__${s}`]:s,"is-success":e==="success","is-warning":e==="warning","is-error":e==="error","is-validating":e==="validating","is-hidden":E,[`is-${l}`]:l,[`is-spacing-${b}`]:b},h?.getItemClassName?.(d)),style:q,children:[t.jsxRuntimeExports.jsx(D.default,{fieldId:s,label:$,labelWidth:B,labelWrap:F,labelAlign:_,colon:w,labelProps:{required:R,...N},hideLabel:M,layout:l}),t.jsxRuntimeExports.jsx(k.default,{fieldId:s,errors:c,warnings:m,status:e,helperText:i,marginBottom:O,onErrorVisibleChanged:T,hideError:L,noSpacing:P,children:t.jsxRuntimeExports.jsx(S.NoStyleItemContext.Provider,{value:C,children:v})}),h?.renderItemExtra?.(d)]})})}exports.default=G;
|
|
2
2
|
//# sourceMappingURL=ItemHolder.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, CSSProperties } from 'react';
|
|
2
2
|
import { FieldProps } from 'rc-field-form/lib/Field';
|
|
3
3
|
import { Meta } from 'rc-field-form/lib/interface';
|
|
4
|
+
import { ItemDecoratorMeta } from '../interface';
|
|
4
5
|
import { FormInstance, FormItemLayout } from '../Form';
|
|
5
6
|
import { FormItemInputProps } from '../FormItemInput';
|
|
6
7
|
import { FormItemLabelProps } from '../FormItemLabel';
|
|
@@ -35,6 +36,7 @@ export interface FormItemProps<Values = unknown> extends FormItemLabelProps, For
|
|
|
35
36
|
disabled?: boolean;
|
|
36
37
|
size?: 'small' | 'medium' | 'large';
|
|
37
38
|
noSpacing?: boolean;
|
|
39
|
+
spacing?: 'normal' | 'compact';
|
|
38
40
|
}
|
|
39
41
|
export interface ItemHolderProps extends FormItemProps {
|
|
40
42
|
errors: ReactNode[];
|
|
@@ -44,6 +46,7 @@ export interface ItemHolderProps extends FormItemProps {
|
|
|
44
46
|
fieldId?: string;
|
|
45
47
|
isRequired?: boolean;
|
|
46
48
|
onSubItemMetaChange: ReportMetaChange;
|
|
49
|
+
identityMeta: ItemDecoratorMeta;
|
|
47
50
|
}
|
|
48
51
|
declare function InternalFormItem<Values = unknown>(props: FormItemProps<Values>): ReactElement;
|
|
49
52
|
type InternalFormItemType = typeof InternalFormItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("../../_virtual/jsx-runtime.js"),a=require("react"),v=require("rc-field-form"),de=require("rc-util/lib/hooks/useState"),le=require("rc-util/lib/ref"),ue=require("./MemoInput.js"),U=require("../context.js"),ce=require("../hooks/useChildren.js"),me=require("../hooks/useFormItemStatus.js"),ge=require("../hooks/useFrameState.js"),fe=require("../hooks/useItemRef.js"),u=require("../util.js"),pe=require("./ItemHolder.js");function W(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}const he="__SPLIT__",ye={namePath:[],path:""};function Ce(b){const{noStyle:w,shouldUpdate:B,dependencies:F,messageVariables:T,trigger:N="onChange",validateTrigger:_,children:G,required:x,hidden:J,rules:Q,name:m,label:A,disabled:q,helperText:E,hasFeedback:z,validateStatus:M,size:S,spacing:I}=b,{name:X,disabled:P,size:R}=a.useContext(U.FormContext),t=ce.default(G),Z=a.useMemo(()=>I===void 0&&u.isCompactControlChild(t)?"compact":void 0,[I,t]),V=typeof t=="function",L=a.useContext(U.NoStyleItemContext),{validateTrigger:ee}=a.useContext(v.FieldContext),K=_!==void 0?_:ee,j=m!=null,re=a.useContext(v.ListContext),O=a.useRef(),[k,te]=ge.default({}),[d,ne]=de(()=>W()),se=e=>{const i=re?.getKey(e.name);if(ne(e.destroy?W():e,!0),w&&E!==!1&&L){let n=e.name;if(e.destroy)n=O.current||n;else if(i!==void 0){const[o,r]=i;n=[o,...r],O.current=n}L(e,n)}},ie=(e,i)=>{te(n=>{const o={...n},s=[...e.name.slice(0,-1),...i].join(he);return e.destroy?delete o[s]:o[s]=e,o})},[y,D]=a.useMemo(()=>{const e=[...d.errors],i=[...d.warnings];return Object.values(k).forEach(n=>{e.push(...n.errors||[]),i.push(...n.warnings||[])}),[e,i]},[k,d.errors,d.warnings]),g=a.useMemo(()=>u.getStatus(d.errors,d.warnings,d,"",!!z,M),[d,z,M]),Y=(e,i,n,o,r=ye)=>w&&!J?h.jsxRuntimeExports.jsx(h.jsxRuntimeExports.Fragment,{children:a.Children.map(e,s=>u.isReactComponent(s)?a.cloneElement(s,{...o,name:m,disabled:q??P,error:g==="error"||g==="warning",size:S??R,...s.props}):s)}):h.jsxRuntimeExports.jsx(pe.default,{...b,fieldId:i,required:x??n,errors:y,warnings:D,status:g,meta:d,identityMeta:r,onSubItemMetaChange:ie,spacing:I??Z,children:a.Children.map(e,s=>u.isReactComponent(s)?a.cloneElement(s,{...o,name:m,disabled:q??P,error:g==="error"||g==="warning",size:S??R,...s.props}):s)});if(!j&&!V&&!F)return Y(t);let p={};typeof A=="string"?p.label=A:m&&(p.label=String(m)),T&&(p={...p,...T});const oe=fe.default(),ae=({control:e,fieldId:i,isRequired:n,mergedName:o})=>{if(!a.isValidElement(t))return null;const r={...t.props,...e,disabled:q??P,error:g==="error"||g==="warning",size:t.props?.size??S??R};if(r.fieldId||(r["data-field-id"]=i),E||y.length>0||D.length>0){const l=[];(E||y.length>0)&&l.push(`${i}_help`),r["aria-describedby"]=l.join(" ")}y.length>0&&(r["aria-invalid"]="true"),n&&(r["aria-required"]="true"),le.supportRef(t)&&(r.ref=oe(o,t)),new Set([...u.toArray(N),...u.toArray(K)]).forEach(l=>{r[l]=(...c)=>{e[l]?.(...c),t.props[l]?.(...c)}});const C=[r["aria-required"],r["aria-invalid"],r["aria-describedby"]];return h.jsxRuntimeExports.jsx(ue.default,{control:e,update:t,childProps:C,children:a.cloneElement(t,r)})};return h.jsxRuntimeExports.jsx(v.Field,{...b,messageVariables:p,trigger:N,validateTrigger:K,onMetaChange:se,children:(e,i,n)=>{const o=u.toArray(m).length&&i?i.name:[],r={namePath:o,path:u.joinNamePath(o)},s=u.getFieldId(o,X),C=x!==void 0?x:!!Q?.some(f=>{if(f&&typeof f=="object"&&f.required&&!f.warningOnly)return!0;if(typeof f=="function"){const H=f(n);return H?.required&&!H?.warningOnly}return!1}),l={...e};let c=null;return Array.isArray(t)&&j?c=t:a.isValidElement(t)?c=ae({control:l,fieldId:s,isRequired:C,mergedName:o}):V&&(B||F)&&!j?c=t(n):c=t,Y(c,s,C,l,r)}})}const $=Ce;$.useStatus=me.default;exports.default=$;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/FieldForm/Form.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PropsWithChildren, RefAttributes, ReactElement, FC, ReactNode } from 'r
|
|
|
2
2
|
import { useWatch } from 'rc-field-form';
|
|
3
3
|
import { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
|
|
4
4
|
import { FormRef } from 'rc-field-form/lib/interface';
|
|
5
|
-
import { FormLabelAlign } from './interface';
|
|
5
|
+
import { FormLabelAlign, ItemDecorator } from './interface';
|
|
6
6
|
import { FormInstance, default as useForm } from './hooks/useForm';
|
|
7
7
|
import { FeedbackIcons } from './FieldFormItem';
|
|
8
8
|
export type RequiredMark = boolean | 'optional' | ((labelNode: ReactNode, info: {
|
|
@@ -22,6 +22,8 @@ export interface FormProps<Values = unknown> extends Omit<RcFormProps<Values>, '
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
requiredMark?: RequiredMark;
|
|
24
24
|
size?: 'small' | 'medium' | 'large';
|
|
25
|
+
spacing?: 'normal' | 'compact';
|
|
26
|
+
itemDecorator?: ItemDecorator;
|
|
25
27
|
}
|
|
26
28
|
declare const FieldForm: (<Values = unknown>(props: PropsWithChildren<FormProps<Values>> & RefAttributes<FormRef<Values>>) => ReactElement) & Pick<FC, "displayName">;
|
|
27
29
|
export { useForm, useWatch, type FormInstance };
|
package/lib/FieldForm/Form.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../_virtual/jsx-runtime.js"),e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../_virtual/jsx-runtime.js"),e=require("react"),z=require("../_virtual/index.js"),W=require("rc-field-form"),O=require("../GlobalContext/constant.js"),q=require("./hooks/useForm.js"),R=require("./context.js"),V=require("./lang/index.js"),D=require("../GlobalContext/index.js"),u=`${O.$prefixCls}-field-form`,G=(g,E)=>{const{className:M,disabled:c,form:j,colon:m,labelAlign:d,labelWidth:n,labelWrap:y,layout:f="vertical",onFinishFailed:_,name:r,style:C,size:x,spacing:b="normal",itemDecorator:h,...L}=g,[o,I]=e.useState(0),{language:F}=e.useContext(D.default),P=e.useMemo(()=>V.defaultValidateMessages[F||"zh"],[F]),[s]=q.default(j),{__INTERNAL__:p}=s;p.name=r;const l=e.useRef(null);e.useImperativeHandle(E,()=>({...s,nativeElement:l.current?.nativeElement}));const S=t=>{_?.(t)},$=t=>{if(!t)return;const T=t.querySelectorAll(`.${u}-item`);let a=0;T?.forEach(A=>{const v=A.querySelector("label");if(v){const w=v.offsetWidth;a=Math.max(a,w)}}),I(a)};e.useEffect(()=>{const t=setTimeout(()=>{$(l.current?.nativeElement)},0);return()=>clearTimeout(t)},[]);const N=e.useMemo(()=>({name:r,labelAlign:d,labelWrap:n?y:!1,labelWidth:n||o,labelMaxWidth:o,layout:f,colon:m,itemRef:p.itemRef,form:s,prefixCls:u,disabled:c,size:x,spacing:b,itemDecorator:h}),[r,d,f,m,s,c,o,n,x,b,h]);return i.jsxRuntimeExports.jsx(R.FormProvider,{validateMessages:P,children:i.jsxRuntimeExports.jsx(R.FormContext.Provider,{value:N,children:i.jsxRuntimeExports.jsx(W,{id:r,...L,name:r,onFinishFailed:S,form:s,ref:l,className:z.default(M,u),style:{...C}})})})},H=e.forwardRef(G);Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>W.useWatch});exports.useForm=q.default;exports.default=H;
|
|
2
2
|
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Switch/Checkbox 类矮控件的 compact 间距自动识别标记约定。
|
|
3
|
+
*
|
|
4
|
+
* `FieldForm.Item` 在未显式指定 `spacing` 时,会检查唯一直接子节点是否为矮控件,
|
|
5
|
+
* 自动落 compact 档(见 `util.ts` 的 `isCompactControlChild`)。原生 `Switch`/`Checkbox`
|
|
6
|
+
* 靠类型引用直接比对即可命中;但消费方常见做法是自己再包一层组件(如加 label 布局),
|
|
7
|
+
* 包完之后子节点的类型引用就不再等于 `@para-ui/core` 原生组件,直接比对会失效。
|
|
8
|
+
*
|
|
9
|
+
* 为此原生 `Switch`/`Checkbox` 会在自身函数上挂这个标记,消费方若对它们做二次封装,
|
|
10
|
+
* 只需把标记原样透传到自己的包装组件上(`WrapperComponent[PARA_UI_COMPACT_CONTROL_MARKER] = true`),
|
|
11
|
+
* 包装组件即可继续被识别为矮控件——不需要 `@para-ui/core` 反过来认识具体消费方的包装组件。
|
|
12
|
+
*
|
|
13
|
+
* 独立成文件是为了避免循环依赖:这个标记同时被 `Switch`/`Checkbox`(声明"我是矮控件")
|
|
14
|
+
* 和 `FieldForm/util.ts`(读取标记做判断,同时也直接引用 Switch/Checkbox 做引用相等比对)
|
|
15
|
+
* 引用,若把标记定义放进 `FieldForm/util.ts` 会形成 `Switch → FieldForm/util.ts → Switch`
|
|
16
|
+
* 的循环引用。
|
|
17
|
+
*/
|
|
18
|
+
export declare const PARA_UI_COMPACT_CONTROL_MARKER = "__paraUiCompactControl__";
|