@steroidsjs/core 2.2.39 → 2.2.40
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/hooks/useForm.d.ts +1 -0
- package/hooks/useForm.js +1 -0
- package/package.json +1 -1
- package/ui/form/DateField/DateField.js +1 -1
- package/ui/form/DateTimeField/DateTimeField.js +1 -1
- package/ui/form/Field/fieldWrapper.js +1 -1
- package/ui/form/FieldList/FieldList.js +2 -1
- package/ui/form/FieldSet/FieldSet.js +3 -1
- package/ui/form/Form/Form.d.ts +1 -0
- package/ui/form/Form/Form.js +2 -1
package/hooks/useForm.d.ts
CHANGED
package/hooks/useForm.js
CHANGED
|
@@ -9,6 +9,7 @@ function useForm() {
|
|
|
9
9
|
formId: context.formId,
|
|
10
10
|
model: context.model,
|
|
11
11
|
prefix: context.prefix,
|
|
12
|
+
size: context.size,
|
|
12
13
|
layout: context.layout,
|
|
13
14
|
formDispatch: context === null || context === void 0 ? void 0 : context.dispatch,
|
|
14
15
|
formSelector: function (selector) { var _a; return (_a = context === null || context === void 0 ? void 0 : context.provider) === null || _a === void 0 ? void 0 : _a.select(context.formId, selector); }
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@ function DateField(props) {
|
|
|
40
40
|
onClose: onClose,
|
|
41
41
|
isOpened: isOpened,
|
|
42
42
|
inputProps: inputProps,
|
|
43
|
-
calendarProps: calendarProps, size: props.size, icon: props.icon, errors: props.errors, disabled: props.disabled, className: props.className, showRemove: props.showRemove }));
|
|
43
|
+
calendarProps: calendarProps, size: props.size, icon: props.icon, errors: props.errors, label: props.label, disabled: props.disabled, className: props.className, showRemove: props.showRemove }));
|
|
44
44
|
}
|
|
45
45
|
DateField.defaultProps = {
|
|
46
46
|
disabled: false,
|
|
@@ -62,7 +62,7 @@ function DateTimeField(props) {
|
|
|
62
62
|
onClose: onClose,
|
|
63
63
|
inputProps: inputProps,
|
|
64
64
|
calendarProps: calendarProps,
|
|
65
|
-
timePanelViewProps: timePanelViewProps, size: props.size, icon: props.icon, errors: props.errors, className: props.className, showRemove: props.showRemove, isInvalid: props.isInvalid, disabled: props.disabled }));
|
|
65
|
+
timePanelViewProps: timePanelViewProps, size: props.size, icon: props.icon, label: props.label, errors: props.errors, className: props.className, showRemove: props.showRemove, isInvalid: props.isInvalid, disabled: props.disabled }));
|
|
66
66
|
}
|
|
67
67
|
DateTimeField.defaultProps = {
|
|
68
68
|
disabled: false,
|
|
@@ -128,7 +128,7 @@ function fieldWrapper(componentId, Component, optionsConfig) {
|
|
|
128
128
|
// Resolve layout
|
|
129
129
|
var layout = react_1.useMemo(function () { return form_1.mergeLayoutProp(context.layout, props.layout); }, [context.layout, props.layout]);
|
|
130
130
|
if (layout !== null) {
|
|
131
|
-
return components.ui.renderView(FieldLayout_1["default"], __assign(__assign({}, attributesProps), { layout: layout, required: has_1["default"](props, 'required') ? props.required : metaProps.required, label: options.label === false ? null : (has_1["default"](props, 'label') ? props.label : metaProps.label), hint: has_1["default"](props, 'hint') ? props.hint : metaProps.hint, errors: props.errors, children: (React.createElement(Component.DynamicField, __assign({}, props))) }));
|
|
131
|
+
return components.ui.renderView(FieldLayout_1["default"], __assign(__assign({}, attributesProps), { layout: layout, size: props.size || context.size || null, required: has_1["default"](props, 'required') ? props.required : metaProps.required, label: options.label === false ? null : (has_1["default"](props, 'label') ? props.label : metaProps.label), hint: has_1["default"](props, 'hint') ? props.hint : metaProps.hint, errors: props.errors, children: (React.createElement(Component.DynamicField, __assign({}, props))) }));
|
|
132
132
|
}
|
|
133
133
|
return components.ui.renderView(Component.DynamicField, props);
|
|
134
134
|
};
|
|
@@ -85,10 +85,11 @@ function FieldList(props) {
|
|
|
85
85
|
formId: props.formId,
|
|
86
86
|
model: props.model,
|
|
87
87
|
prefix: props.prefix,
|
|
88
|
+
size: props.size,
|
|
88
89
|
layout: props.layout,
|
|
89
90
|
provider: context.provider,
|
|
90
91
|
reducer: context.reducer
|
|
91
|
-
}); }, [context.provider, context.reducer, props.formId, props.layout, props.model, props.prefix]);
|
|
92
|
+
}); }, [context.provider, context.reducer, props.formId, props.layout, props.model, props.prefix, props.size]);
|
|
92
93
|
var commonProps = {
|
|
93
94
|
showAdd: props.showAdd,
|
|
94
95
|
showRemove: props.showRemove,
|
|
@@ -48,10 +48,12 @@ function FieldSet(props) {
|
|
|
48
48
|
prefix: [context.prefix, props.prefix]
|
|
49
49
|
.filter(Boolean)
|
|
50
50
|
.join('.'),
|
|
51
|
+
size: props.size || context.size,
|
|
51
52
|
layout: form_1.mergeLayoutProp(context.layout, props.layout),
|
|
52
53
|
provider: context.provider,
|
|
53
54
|
reducer: context.reducer
|
|
54
|
-
}); }, [context.
|
|
55
|
+
}); }, [context.formId, context.layout, context.model, context.prefix, context.provider, context.reducer,
|
|
56
|
+
context.size, props.formId, props.layout, props.model, props.prefix, props.size]);
|
|
55
57
|
var FieldSetView = props.view || components.ui.getView('form.FieldSetView');
|
|
56
58
|
return (react_1["default"].createElement(Form_1.FormContext.Provider, { value: contextValue },
|
|
57
59
|
react_1["default"].createElement(FieldSetView, __assign({ className: props.className, label: props.label }, props),
|
package/ui/form/Form/Form.d.ts
CHANGED
package/ui/form/Form/Form.js
CHANGED
|
@@ -313,11 +313,12 @@ function Form(props) {
|
|
|
313
313
|
formId: props.formId,
|
|
314
314
|
model: props.model,
|
|
315
315
|
prefix: props.prefix,
|
|
316
|
+
size: props.size,
|
|
316
317
|
layout: props.layout,
|
|
317
318
|
provider: provider,
|
|
318
319
|
reducer: reducer,
|
|
319
320
|
dispatch: dispatch
|
|
320
|
-
}); }, [dispatch, props.formId, props.layout, props.model, props.prefix, provider, reducer]);
|
|
321
|
+
}); }, [dispatch, props.formId, props.layout, props.model, props.prefix, props.size, provider, reducer]);
|
|
321
322
|
// Wait initialization (only for redux)
|
|
322
323
|
if (values === undefined) {
|
|
323
324
|
return null;
|