@steroidsjs/core 3.0.0-beta.31 → 3.0.0-beta.32
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/core",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
6
6
|
"repository": {
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"enzyme": "^3.11.0",
|
|
84
84
|
"eslint": "^8.34.0",
|
|
85
85
|
"jest": "^26.6.3",
|
|
86
|
+
"jest-environment-jsdom-fifteen": "^1.0.2",
|
|
86
87
|
"jest-enzyme": "^7.1.2",
|
|
87
88
|
"ts-jest": "^26.5.1",
|
|
88
89
|
"typescript": "^4.9.5"
|
|
@@ -19,12 +19,17 @@ var react_use_1 = require("react-use");
|
|
|
19
19
|
var useComponents_1 = __importDefault(require("../../../hooks/useComponents"));
|
|
20
20
|
var fieldWrapper_1 = __importDefault(require("../../../ui/form/Field/fieldWrapper"));
|
|
21
21
|
var hooks_1 = require("../../../hooks");
|
|
22
|
-
var getCategories = function (items) {
|
|
23
|
-
if (
|
|
24
|
-
|
|
22
|
+
var getCategories = function (items) {
|
|
23
|
+
if (!items) {
|
|
24
|
+
return [];
|
|
25
25
|
}
|
|
26
|
-
return allCategories
|
|
27
|
-
|
|
26
|
+
return items.reduce(function (allCategories, item) {
|
|
27
|
+
if (item.category && !allCategories.includes(item.category)) {
|
|
28
|
+
allCategories.push(item.category);
|
|
29
|
+
}
|
|
30
|
+
return allCategories;
|
|
31
|
+
}, []);
|
|
32
|
+
};
|
|
28
33
|
function AutoCompleteField(props) {
|
|
29
34
|
var components = (0, useComponents_1["default"])();
|
|
30
35
|
// Query state
|
package/ui/form/Form/Form.d.ts
CHANGED
|
@@ -146,9 +146,7 @@ export interface IFormViewProps {
|
|
|
146
146
|
submitLabel?: string;
|
|
147
147
|
fields?: (string | IFieldProps)[];
|
|
148
148
|
onSubmit: any;
|
|
149
|
-
isInvalid?: boolean;
|
|
150
149
|
className?: CssClassName;
|
|
151
|
-
isBordered?: boolean;
|
|
152
150
|
autoFocus?: boolean;
|
|
153
151
|
style?: CustomStyle;
|
|
154
152
|
children?: React.ReactNode;
|
package/ui/form/Form/Form.js
CHANGED
|
@@ -333,7 +333,7 @@ function Form(props) {
|
|
|
333
333
|
}
|
|
334
334
|
// Render context and form
|
|
335
335
|
return (React.createElement(exports.FormContext.Provider, { value: formContextValue }, props.view !== false
|
|
336
|
-
? components.ui.renderView(props.view || 'form.FormView', __assign(__assign({}, props.viewProps), {
|
|
336
|
+
? components.ui.renderView(props.view || 'form.FormView', __assign(__assign({}, props.viewProps), { isSubmitting: isSubmitting, onSubmit: onSubmit, submitLabel: props.submitLabel, fields: props.fields, children: props.children, className: props.className, style: props.style, autoFocus: props.autoFocus }))
|
|
337
337
|
: props.children));
|
|
338
338
|
}
|
|
339
339
|
Form.defaultProps = {
|