@plasmicpkgs/antd5 0.0.82 → 0.0.84
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/.tsbuildinfo +1 -1
- package/dist/antd.esm.js +212 -100
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +212 -100
- package/dist/index.js.map +1 -1
- package/dist/react-utils.d.ts +2 -1
- package/dist/registerForm.d.ts +12 -3
- package/dist/utils.d.ts +2 -0
- package/package.json +3 -3
- package/skinny/react-utils.d.ts +2 -1
- package/skinny/registerButton.cjs.js +1 -1
- package/skinny/registerButton.esm.js +1 -1
- package/skinny/registerCheckbox.cjs.js +1 -1
- package/skinny/registerCheckbox.esm.js +1 -1
- package/skinny/registerConfigProvider.cjs.js +1 -1
- package/skinny/registerConfigProvider.esm.js +1 -1
- package/skinny/registerDatePicker.cjs.js +1 -1
- package/skinny/registerDatePicker.esm.js +1 -1
- package/skinny/registerDropdown.cjs.js +1 -1
- package/skinny/registerDropdown.esm.js +1 -1
- package/skinny/registerForm.cjs.js +184 -186
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.d.ts +12 -3
- package/skinny/registerForm.esm.js +182 -184
- package/skinny/registerForm.esm.js.map +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerMenu.cjs.js +1 -1
- package/skinny/registerMenu.esm.js +1 -1
- package/skinny/registerModal.cjs.js +1 -1
- package/skinny/registerModal.esm.js +1 -1
- package/skinny/registerRadio.cjs.js +1 -1
- package/skinny/registerRadio.esm.js +1 -1
- package/skinny/registerSelect-2c9dfc05.cjs.js +477 -0
- package/skinny/registerSelect-2c9dfc05.cjs.js.map +1 -0
- package/skinny/registerSelect-3ef48596.esm.js +462 -0
- package/skinny/registerSelect-3ef48596.esm.js.map +1 -0
- package/skinny/registerSelect.cjs.js +12 -366
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +5 -359
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSwitch.cjs.js +1 -1
- package/skinny/registerSwitch.esm.js +1 -1
- package/skinny/registerTable.cjs.js +1 -1
- package/skinny/registerTable.esm.js +1 -1
- package/skinny/registerUpload.cjs.js +1 -1
- package/skinny/registerUpload.esm.js +1 -1
- package/skinny/{utils-b2751954.esm.js → utils-02582d7f.esm.js} +15 -2
- package/skinny/{utils-403deb7b.cjs.js.map → utils-02582d7f.esm.js.map} +1 -1
- package/skinny/{utils-403deb7b.cjs.js → utils-838eeae8.cjs.js} +16 -1
- package/skinny/{utils-b2751954.esm.js.map → utils-838eeae8.cjs.js.map} +1 -1
- package/skinny/utils.d.ts +2 -0
|
@@ -2,98 +2,17 @@ import { usePlasmicCanvasContext, DataProvider, repeatedElement } from '@plasmic
|
|
|
2
2
|
import { Form, Input, InputNumber, Checkbox, Select, DatePicker, Radio } from 'antd';
|
|
3
3
|
import equal from 'fast-deep-equal';
|
|
4
4
|
import React, { isValidElement, cloneElement } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import { r as reactNodeToString, m as mergeProps, s as selectComponentName } from './registerSelect-3ef48596.esm.js';
|
|
6
6
|
import { buttonComponentName } from './registerButton.esm.js';
|
|
7
7
|
import { checkboxComponentName } from './registerCheckbox.esm.js';
|
|
8
8
|
import { inputComponentName, textAreaComponentName, inputNumberComponentName, passwordComponentName } from './registerInput.esm.js';
|
|
9
9
|
import { radioGroupComponentName } from './registerRadio.esm.js';
|
|
10
|
-
import { selectComponentName } from './registerSelect.esm.js';
|
|
11
10
|
import { switchComponentName } from './registerSwitch.esm.js';
|
|
12
|
-
import { u as usePrevious, r as registerComponentHelper } from './utils-
|
|
11
|
+
import { s as setFieldsToUndefined, u as usePrevious, e as ensureArray, r as registerComponentHelper } from './utils-02582d7f.esm.js';
|
|
12
|
+
import 'classnames';
|
|
13
13
|
import '@plasmicapp/host/registerComponent';
|
|
14
14
|
import '@plasmicapp/host/registerGlobalContext';
|
|
15
15
|
|
|
16
|
-
var __defProp$1 = Object.defineProperty;
|
|
17
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
18
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
19
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
20
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21
|
-
var __spreadValues$1 = (a, b) => {
|
|
22
|
-
for (var prop in b || (b = {}))
|
|
23
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
24
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
25
|
-
if (__getOwnPropSymbols$1)
|
|
26
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
27
|
-
if (__propIsEnum$1.call(b, prop))
|
|
28
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
29
|
-
}
|
|
30
|
-
return a;
|
|
31
|
-
};
|
|
32
|
-
const isBrowser = typeof window !== "undefined";
|
|
33
|
-
const NONE = Symbol("NONE");
|
|
34
|
-
isBrowser ? React.useLayoutEffect : React.useEffect;
|
|
35
|
-
function mergeProps(props, ...restProps) {
|
|
36
|
-
if (restProps.every((rest) => Object.keys(rest).length === 0)) {
|
|
37
|
-
return props;
|
|
38
|
-
}
|
|
39
|
-
const result = __spreadValues$1({}, props);
|
|
40
|
-
for (const rest of restProps) {
|
|
41
|
-
for (const key of Object.keys(rest)) {
|
|
42
|
-
result[key] = mergePropVals(key, result[key], rest[key]);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
|
-
function updateRef(ref, value) {
|
|
48
|
-
if (!ref) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (typeof ref === "function") {
|
|
52
|
-
ref(value);
|
|
53
|
-
} else {
|
|
54
|
-
if (!Object.isFrozen(ref)) {
|
|
55
|
-
ref.current = value;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function mergeRefs(...refs) {
|
|
60
|
-
return (value) => {
|
|
61
|
-
for (const ref of refs) {
|
|
62
|
-
updateRef(ref, value);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function mergePropVals(name, val1, val2) {
|
|
67
|
-
if (val1 === NONE || val2 === NONE) {
|
|
68
|
-
return null;
|
|
69
|
-
} else if (val1 == null) {
|
|
70
|
-
return val2;
|
|
71
|
-
} else if (val2 == null) {
|
|
72
|
-
return val1;
|
|
73
|
-
} else if (name === "className") {
|
|
74
|
-
return classNames(val1, val2);
|
|
75
|
-
} else if (name === "style") {
|
|
76
|
-
return __spreadValues$1(__spreadValues$1({}, val1), val2);
|
|
77
|
-
} else if (name === "ref") {
|
|
78
|
-
return mergeRefs(val1, val2);
|
|
79
|
-
} else if (typeof val1 !== typeof val2) {
|
|
80
|
-
return val2;
|
|
81
|
-
} else if (name.startsWith("on") && typeof val1 === "function") {
|
|
82
|
-
return (...args) => {
|
|
83
|
-
let res;
|
|
84
|
-
if (typeof val1 === "function") {
|
|
85
|
-
res = val1(...args);
|
|
86
|
-
}
|
|
87
|
-
if (typeof val2 === "function") {
|
|
88
|
-
res = val2(...args);
|
|
89
|
-
}
|
|
90
|
-
return res;
|
|
91
|
-
};
|
|
92
|
-
} else {
|
|
93
|
-
return val2;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
16
|
var __defProp = Object.defineProperty;
|
|
98
17
|
var __defProps = Object.defineProperties;
|
|
99
18
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -125,24 +44,6 @@ var __objRest = (source, exclude) => {
|
|
|
125
44
|
}
|
|
126
45
|
return target;
|
|
127
46
|
};
|
|
128
|
-
const reactNodeToString = function(reactNode) {
|
|
129
|
-
let string = "";
|
|
130
|
-
if (typeof reactNode === "string") {
|
|
131
|
-
string = reactNode;
|
|
132
|
-
} else if (typeof reactNode === "number") {
|
|
133
|
-
string = reactNode.toString();
|
|
134
|
-
} else if (reactNode instanceof Array) {
|
|
135
|
-
reactNode.forEach(function(child) {
|
|
136
|
-
string += reactNodeToString(child);
|
|
137
|
-
});
|
|
138
|
-
} else if (isValidElement(reactNode)) {
|
|
139
|
-
string += reactNodeToString(reactNode.props.children);
|
|
140
|
-
}
|
|
141
|
-
return string;
|
|
142
|
-
};
|
|
143
|
-
function ensureArray(x) {
|
|
144
|
-
return Array.isArray(x) ? x : [x];
|
|
145
|
-
}
|
|
146
47
|
const FormItem = Form.Item;
|
|
147
48
|
const FormList = Form.List;
|
|
148
49
|
var InputType = /* @__PURE__ */ ((InputType2) => {
|
|
@@ -162,93 +63,132 @@ var InputType = /* @__PURE__ */ ((InputType2) => {
|
|
|
162
63
|
const PathContext = React.createContext({ relativePath: [], fullPath: [] });
|
|
163
64
|
const InternalFormInstanceContext = React.createContext(void 0);
|
|
164
65
|
const FormLayoutContext = React.createContext(void 0);
|
|
165
|
-
const Internal = (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Radio.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
const fireOnValuesChange = React.useCallback(() => {
|
|
192
|
-
const values2 = form.getFieldsValue(true);
|
|
193
|
-
if (!equal(values2, lastValue.current)) {
|
|
194
|
-
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(values2);
|
|
195
|
-
lastValue.current = values2;
|
|
66
|
+
const Internal = React.forwardRef(
|
|
67
|
+
(props, ref) => {
|
|
68
|
+
var _b, _c, _d, _e, _f;
|
|
69
|
+
const [form] = Form.useForm();
|
|
70
|
+
const values = form.getFieldsValue(true);
|
|
71
|
+
const lastValue = React.useRef(values);
|
|
72
|
+
const _a = props, { extendedOnValuesChange, setRemountKey } = _a, rest = __objRest(_a, ["extendedOnValuesChange", "setRemountKey"]);
|
|
73
|
+
let childrenNode;
|
|
74
|
+
if (props.mode !== "simplified") {
|
|
75
|
+
childrenNode = typeof props.children === "function" ? props.children(values, form) : props.children;
|
|
76
|
+
} else {
|
|
77
|
+
childrenNode = /* @__PURE__ */ React.createElement(React.Fragment, null, ((_b = props.formItems) != null ? _b : []).map((formItem) => /* @__PURE__ */ React.createElement(
|
|
78
|
+
FormItemWrapper,
|
|
79
|
+
__spreadProps(__spreadValues({}, formItem), {
|
|
80
|
+
noLabel: formItem.inputType === "Checkbox" /* Checkbox */ || formItem.noLabel,
|
|
81
|
+
style: { width: "100%" }
|
|
82
|
+
}),
|
|
83
|
+
formItem.inputType === "Text" /* Text */ ? /* @__PURE__ */ React.createElement(Input, null) : formItem.inputType === "Password" /* Password */ ? /* @__PURE__ */ React.createElement(Input.Password, null) : formItem.inputType === "Text Area" /* TextArea */ ? /* @__PURE__ */ React.createElement(Input.TextArea, null) : formItem.inputType === "Number" /* Number */ ? /* @__PURE__ */ React.createElement(InputNumber, null) : formItem.inputType === "Checkbox" /* Checkbox */ ? /* @__PURE__ */ React.createElement(Checkbox, null, formItem.label) : formItem.inputType === "Select" /* Select */ ? /* @__PURE__ */ React.createElement(Select, { options: formItem.options }) : formItem.inputType === "DatePicker" /* DatePicker */ ? /* @__PURE__ */ React.createElement(DatePicker, null) : formItem.inputType === "Radio Group" /* RadioGroup */ ? /* @__PURE__ */ React.createElement(
|
|
84
|
+
Radio.Group,
|
|
85
|
+
{
|
|
86
|
+
options: formItem.options,
|
|
87
|
+
optionType: formItem.optionType,
|
|
88
|
+
style: { padding: "8px" }
|
|
89
|
+
}
|
|
90
|
+
) : null
|
|
91
|
+
)), props.submitSlot);
|
|
196
92
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
() => {
|
|
203
|
-
var _a2;
|
|
204
|
-
return {
|
|
205
|
-
layout: props.layout,
|
|
206
|
-
labelSpan: (_a2 = props.labelCol) == null ? void 0 : _a2.span
|
|
207
|
-
};
|
|
208
|
-
},
|
|
209
|
-
[props.layout, (_c = props.labelCol) == null ? void 0 : _c.span]
|
|
210
|
-
);
|
|
211
|
-
return /* @__PURE__ */ React.createElement(
|
|
212
|
-
InternalFormInstanceContext.Provider,
|
|
213
|
-
{
|
|
214
|
-
value: {
|
|
215
|
-
layout: formLayout,
|
|
216
|
-
fireOnValuesChange,
|
|
217
|
-
forceRemount: () => setRemountKey((k) => k + 1)
|
|
93
|
+
const fireOnValuesChange = React.useCallback(() => {
|
|
94
|
+
const values2 = form.getFieldsValue(true);
|
|
95
|
+
if (!equal(values2, lastValue.current)) {
|
|
96
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(values2);
|
|
97
|
+
lastValue.current = values2;
|
|
218
98
|
}
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
99
|
+
}, [form, lastValue]);
|
|
100
|
+
React.useEffect(() => {
|
|
101
|
+
fireOnValuesChange();
|
|
102
|
+
}, []);
|
|
103
|
+
const formLayout = React.useMemo(
|
|
104
|
+
() => {
|
|
105
|
+
var _a2;
|
|
106
|
+
return {
|
|
107
|
+
layout: props.layout,
|
|
108
|
+
labelSpan: (_a2 = props.labelCol) == null ? void 0 : _a2.span
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
[props.layout, (_c = props.labelCol) == null ? void 0 : _c.span]
|
|
112
|
+
);
|
|
113
|
+
(_d = props.setControlContextData) == null ? void 0 : _d.call(props, { formInstance: form });
|
|
114
|
+
React.useImperativeHandle(ref, () => ({
|
|
115
|
+
formInstance: form,
|
|
116
|
+
setFieldsValue: (newValues) => {
|
|
117
|
+
form.setFieldsValue(newValues);
|
|
118
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(form.getFieldsValue(true));
|
|
119
|
+
},
|
|
120
|
+
setFieldValue: (namePath, value) => {
|
|
121
|
+
form.setFieldValue(namePath, value);
|
|
122
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(form.getFieldsValue(true));
|
|
123
|
+
},
|
|
124
|
+
resetFields: () => {
|
|
125
|
+
form.resetFields();
|
|
126
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(form.getFieldsValue(true));
|
|
127
|
+
},
|
|
128
|
+
clearFields: () => {
|
|
129
|
+
const values2 = form.getFieldsValue(true);
|
|
130
|
+
setFieldsToUndefined(values2);
|
|
131
|
+
form.setFieldsValue(values2);
|
|
132
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(form.getFieldsValue(true));
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
return /* @__PURE__ */ React.createElement(
|
|
136
|
+
InternalFormInstanceContext.Provider,
|
|
137
|
+
{
|
|
138
|
+
value: {
|
|
139
|
+
layout: formLayout,
|
|
140
|
+
fireOnValuesChange,
|
|
141
|
+
forceRemount: () => setRemountKey((k) => k + 1)
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
/* @__PURE__ */ React.createElement(FormLayoutContext.Provider, { value: formLayout }, /* @__PURE__ */ React.createElement(
|
|
145
|
+
Form,
|
|
146
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
147
|
+
key: props.initialValues ? JSON.stringify(props.initialValues) : void 0,
|
|
148
|
+
onValuesChange: (...args) => {
|
|
149
|
+
var _a2;
|
|
150
|
+
(_a2 = props.onValuesChange) == null ? void 0 : _a2.call(props, ...args);
|
|
151
|
+
extendedOnValuesChange == null ? void 0 : extendedOnValuesChange(args[1]);
|
|
152
|
+
},
|
|
153
|
+
form,
|
|
154
|
+
labelCol: ((_e = props.labelCol) == null ? void 0 : _e.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.labelCol,
|
|
155
|
+
wrapperCol: ((_f = props.wrapperCol) == null ? void 0 : _f.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.wrapperCol
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ React.createElement("style", null, `
|
|
234
158
|
.ant-form-item-explain + div, .ant-form-item-margin-offset {
|
|
235
159
|
display: none;
|
|
236
160
|
}
|
|
237
161
|
`),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
162
|
+
childrenNode
|
|
163
|
+
))
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
const FormWrapper = React.forwardRef(
|
|
168
|
+
(props, ref) => {
|
|
169
|
+
const [remountKey, setRemountKey] = React.useState(0);
|
|
170
|
+
const previousInitialValues = usePrevious(props.initialValues);
|
|
171
|
+
const wrapperRef = React.useRef(null);
|
|
172
|
+
React.useEffect(() => {
|
|
173
|
+
if (previousInitialValues !== props.initialValues && JSON.stringify(previousInitialValues) !== JSON.stringify(props.initialValues)) {
|
|
174
|
+
setRemountKey((k) => k + 1);
|
|
175
|
+
}
|
|
176
|
+
}, [previousInitialValues, props.initialValues]);
|
|
177
|
+
React.useImperativeHandle(
|
|
178
|
+
ref,
|
|
179
|
+
() => wrapperRef.current ? __spreadValues({}, wrapperRef.current) : {}
|
|
180
|
+
);
|
|
181
|
+
return /* @__PURE__ */ React.createElement(
|
|
182
|
+
Internal,
|
|
183
|
+
__spreadProps(__spreadValues({
|
|
184
|
+
key: remountKey
|
|
185
|
+
}, props), {
|
|
186
|
+
setRemountKey,
|
|
187
|
+
ref: wrapperRef
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
);
|
|
252
192
|
const COMMON_ACTIONS = [
|
|
253
193
|
{
|
|
254
194
|
type: "button-action",
|
|
@@ -319,6 +259,16 @@ const colProp = (displayName, defaultValue, description) => ({
|
|
|
319
259
|
description,
|
|
320
260
|
defaultValue
|
|
321
261
|
});
|
|
262
|
+
const formHelpers = {
|
|
263
|
+
states: {
|
|
264
|
+
value: {
|
|
265
|
+
onMutate: (value, $ref) => {
|
|
266
|
+
var _a;
|
|
267
|
+
(_a = $ref == null ? void 0 : $ref.formInstance) == null ? void 0 : _a.setFieldsValue(value);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
322
272
|
const formComponentName = "plasmic-antd5-form";
|
|
323
273
|
function registerForm(loader) {
|
|
324
274
|
registerComponentHelper(loader, FormWrapper, {
|
|
@@ -576,6 +526,54 @@ function registerForm(loader) {
|
|
|
576
526
|
onChangeProp: "extendedOnValuesChange"
|
|
577
527
|
}
|
|
578
528
|
},
|
|
529
|
+
componentHelpers: {
|
|
530
|
+
helpers: formHelpers,
|
|
531
|
+
importName: "formHelpers",
|
|
532
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerForm"
|
|
533
|
+
},
|
|
534
|
+
refActions: {
|
|
535
|
+
setFieldsValue: {
|
|
536
|
+
displayName: "Set multiple fields",
|
|
537
|
+
argTypes: [
|
|
538
|
+
{
|
|
539
|
+
name: "newValues",
|
|
540
|
+
displayName: "New Values",
|
|
541
|
+
type: "exprEditor"
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
setFieldValue: {
|
|
546
|
+
displayName: "Set field",
|
|
547
|
+
argTypes: [
|
|
548
|
+
{
|
|
549
|
+
name: "namePath",
|
|
550
|
+
displayName: "Name Path",
|
|
551
|
+
type: {
|
|
552
|
+
type: "dataSelector",
|
|
553
|
+
data: (_, ctx) => {
|
|
554
|
+
if (!(ctx == null ? void 0 : ctx.formInstance)) {
|
|
555
|
+
return {};
|
|
556
|
+
}
|
|
557
|
+
return ctx.formInstance.getFieldsValue(true);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "value",
|
|
563
|
+
displayName: "New Value",
|
|
564
|
+
type: "exprEditor"
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
resetFields: {
|
|
569
|
+
displayName: "Reset fields to initial value",
|
|
570
|
+
argTypes: []
|
|
571
|
+
},
|
|
572
|
+
clearFields: {
|
|
573
|
+
displayName: "Clear fields",
|
|
574
|
+
argTypes: []
|
|
575
|
+
}
|
|
576
|
+
},
|
|
579
577
|
importPath: "@plasmicpkgs/antd5/skinny/registerForm",
|
|
580
578
|
importName: "FormWrapper"
|
|
581
579
|
});
|
|
@@ -1182,5 +1180,5 @@ function registerFormList(loader) {
|
|
|
1182
1180
|
});
|
|
1183
1181
|
}
|
|
1184
1182
|
|
|
1185
|
-
export { FormGroup, FormItemWrapper, FormListWrapper, FormWrapper, InputType, formComponentName, formGroupComponentName, formItemComponentName, formListComponentName, registerForm, registerFormGroup, registerFormItem, registerFormList, useFormInstanceMaybe };
|
|
1183
|
+
export { FormGroup, FormItemWrapper, FormListWrapper, FormWrapper, InputType, formComponentName, formGroupComponentName, formHelpers, formItemComponentName, formListComponentName, registerForm, registerFormGroup, registerFormItem, registerFormList, useFormInstanceMaybe };
|
|
1186
1184
|
//# sourceMappingURL=registerForm.esm.js.map
|