@steroidsjs/core 3.0.0 → 3.0.2
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/docs-autogen-result.json +144 -47
- package/en.json +8 -2
- package/hooks/useApplication.d.ts +1 -1
- package/package.json +1 -1
- package/ui/content/DropDown/DropDown.js +1 -3
- package/ui/content/Kanban/Kanban.d.ts +7 -1
- package/ui/content/Kanban/Kanban.js +2 -1
- package/ui/content/Kanban/hooks/useKanban.d.ts +6 -0
- package/ui/content/Kanban/hooks/useKanban.js +2 -1
- package/ui/form/AutoCompleteField/AutoCompleteField.d.ts +1 -2
- package/ui/form/AutoCompleteField/AutoCompleteField.js +24 -11
- package/ui/form/Button/Button.d.ts +1 -1
- package/ui/form/Button/Button.js +29 -5
- package/ui/form/CheckboxField/CheckboxField.d.ts +1 -1
- package/ui/form/CheckboxField/CheckboxField.js +13 -4
- package/ui/form/CheckboxListField/CheckboxListField.d.ts +2 -1
- package/ui/form/CheckboxListField/CheckboxListField.js +13 -4
- package/ui/form/CheckboxTreeField/CheckboxTreeField.d.ts +1 -1
- package/ui/form/CheckboxTreeField/CheckboxTreeField.js +9 -1
- package/ui/form/DateField/DateField.d.ts +4 -3
- package/ui/form/DateField/DateField.js +4 -1
- package/ui/form/DateRangeField/DateRangeField.js +18 -13
- package/ui/form/DateTimeField/DateTimeField.d.ts +1 -1
- package/ui/form/DateTimeField/DateTimeField.js +19 -1
- package/ui/form/DateTimeRangeField/DateTimeRangeField.js +20 -1
- package/ui/form/DropDownField/DropDownField.js +34 -2
- package/ui/form/EmailField/EmailField.js +53 -3
- package/ui/form/Field/Field.js +3 -3
- package/ui/form/FieldLayout/FieldLayout.js +12 -12
- package/ui/form/FieldList/FieldList.d.ts +1 -1
- package/ui/form/FieldList/FieldList.js +7 -6
- package/ui/form/FieldSet/FieldSet.js +6 -1
- package/ui/form/FileField/FileField.js +13 -3
- package/ui/form/Form/Form.d.ts +1 -1
- package/ui/form/Form/Form.js +12 -14
- package/ui/form/HtmlField/HtmlField.d.ts +20 -1
- package/ui/form/HtmlField/HtmlField.js +11 -12
- package/ui/form/ImageField/ImageField.js +12 -8
- package/ui/form/InputField/InputField.js +24 -3
- package/ui/form/MaskField/MaskField.js +1 -13
- package/ui/form/NavField/NavField.js +12 -2
- package/ui/form/NumberField/NumberField.js +16 -3
- package/ui/form/PasswordField/PasswordField.js +15 -2
- package/ui/form/RadioField/RadioField.d.ts +1 -1
- package/ui/form/RadioField/RadioField.js +15 -4
- package/ui/form/RadioListField/RadioListField.d.ts +2 -1
- package/ui/form/RadioListField/RadioListField.js +14 -4
- package/ui/form/RateField/RateField.js +11 -1
- package/ui/form/ReCaptchaField/ReCaptchaField.js +6 -12
- package/ui/form/SliderField/SliderField.d.ts +1 -1
- package/ui/form/SliderField/SliderField.js +5 -3
- package/ui/form/SwitcherField/SwitcherField.d.ts +1 -1
- package/ui/form/SwitcherField/SwitcherField.js +14 -4
- package/ui/form/TextField/TextField.js +2 -1
- package/ui/form/TimeField/TimeField.js +3 -1
- package/ui/form/TimeRangeField/TimeRangeField.js +4 -1
- package/ui/layout/Notifications/Notifications.d.ts +1 -1
- package/ui/layout/Notifications/Notifications.js +7 -3
- package/ui/layout/ProgressBar/ProgressBar.d.ts +1 -1
- package/ui/layout/ProgressBar/ProgressBar.js +24 -24
- package/ui/layout/Sidebar/Sidebar.js +16 -12
- package/ui/list/ControlsColumn/ControlsColumn.js +7 -1
- package/ui/list/Grid/Grid.d.ts +1 -1
- package/ui/list/Grid/Grid.js +33 -8
- package/ui/list/LayoutNames/LayoutNames.d.ts +1 -1
- package/ui/list/LayoutNames/LayoutNames.js +2 -3
- package/ui/list/List/List.js +19 -4
- package/ui/list/Pagination/Pagination.d.ts +1 -1
- package/ui/list/Pagination/Pagination.js +22 -6
- package/ui/list/PaginationSize/PaginationSize.d.ts +1 -1
- package/ui/list/PaginationSize/PaginationSize.js +10 -4
- package/ui/modal/Modal/Modal.d.ts +2 -2
- package/ui/modal/Modal/Modal.js +16 -3
- package/ui/modal/ModalPortal/ModalPortal.js +2 -3
- package/ui/nav/Breadcrumbs/Breadcrumbs.js +10 -12
- package/ui/nav/ButtonGroup/ButtonGroup.js +19 -38
- package/ui/nav/Controls/Controls.js +6 -1
- package/ui/nav/Nav/Nav.d.ts +9 -1
- package/ui/nav/Nav/Nav.js +16 -7
- package/ui/nav/Router/Router.d.ts +2 -2
- package/ui/nav/Router/Router.js +17 -16
- package/ui/nav/Router/helpers.d.ts +1 -1
- package/ui/nav/Router/helpers.js +19 -16
- package/ui/nav/Tree/Tree.d.ts +3 -3
- package/ui/nav/Tree/Tree.js +11 -13
package/ui/nav/Nav/Nav.js
CHANGED
|
@@ -37,12 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
exports.__esModule = true;
|
|
40
|
-
var
|
|
40
|
+
var react_1 = __importStar(require("react"));
|
|
41
41
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
42
42
|
var has_1 = __importDefault(require("lodash-es/has"));
|
|
43
43
|
var isFunction_1 = __importDefault(require("lodash-es/isFunction"));
|
|
44
44
|
var isObject_1 = __importDefault(require("lodash-es/isObject"));
|
|
45
|
-
var react_1 = require("react");
|
|
46
45
|
var isEmpty_1 = __importDefault(require("lodash-es/isEmpty"));
|
|
47
46
|
var hooks_1 = require("../../../hooks");
|
|
48
47
|
var router_1 = require("../../../reducers/router");
|
|
@@ -67,7 +66,7 @@ function Nav(props) {
|
|
|
67
66
|
setActiveTab(props.activeTab);
|
|
68
67
|
}
|
|
69
68
|
}, [props.activeTab]);
|
|
70
|
-
var renderContent = function () {
|
|
69
|
+
var renderContent = (0, react_1.useCallback)(function () {
|
|
71
70
|
var items = Array.isArray(props.items) ? props.items : [];
|
|
72
71
|
var activeItem = items.find(function (item, index) { return activeTab === ((0, has_1["default"])(item, 'id') ? item.id : index); });
|
|
73
72
|
if (!activeItem || !activeItem.content) {
|
|
@@ -75,10 +74,10 @@ function Nav(props) {
|
|
|
75
74
|
}
|
|
76
75
|
if ((0, isFunction_1["default"])(activeItem.content) || (0, isObject_1["default"])(activeItem.content)) {
|
|
77
76
|
var ContentComponent = activeItem.content;
|
|
78
|
-
return (
|
|
77
|
+
return (react_1["default"].createElement(ContentComponent, __assign({}, activeItem, activeItem.contentProps)));
|
|
79
78
|
}
|
|
80
79
|
return activeItem.content;
|
|
81
|
-
};
|
|
80
|
+
}, [activeTab, props.items]);
|
|
82
81
|
var onClick = (0, react_1.useCallback)(function (item, index) {
|
|
83
82
|
var newActiveTab = (0, has_1["default"])(item, 'id') ? item.id : index;
|
|
84
83
|
setActiveTab(newActiveTab);
|
|
@@ -86,7 +85,7 @@ function Nav(props) {
|
|
|
86
85
|
props.onChange.call(null, newActiveTab);
|
|
87
86
|
}
|
|
88
87
|
}, [props.onChange]);
|
|
89
|
-
var formatItems =
|
|
88
|
+
var formatItems = (0, react_1.useCallback)(function (items) {
|
|
90
89
|
if (items === void 0) { items = props.items; }
|
|
91
90
|
if (Array.isArray(items)) {
|
|
92
91
|
return items.map(function (item, index) {
|
|
@@ -111,7 +110,17 @@ function Nav(props) {
|
|
|
111
110
|
.filter(function (item) { return item.visible !== false; });
|
|
112
111
|
}, [activeRouteIds, activeTab, props.items, routerParams, routes]);
|
|
113
112
|
var items = (0, react_1.useMemo)(function () { return formatItems(); }, [formatItems]);
|
|
114
|
-
|
|
113
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
114
|
+
items: items,
|
|
115
|
+
onClick: onClick,
|
|
116
|
+
disabled: props.disabled,
|
|
117
|
+
size: props.size,
|
|
118
|
+
icon: props.icon,
|
|
119
|
+
className: props.className,
|
|
120
|
+
navClassName: props.navClassName,
|
|
121
|
+
children: renderContent()
|
|
122
|
+
}); }, [items, onClick, props.className, props.disabled, props.icon, props.navClassName, props.size, renderContent]);
|
|
123
|
+
return components.ui.renderView(props.view || defaultViewMap[props.layout], viewProps);
|
|
115
124
|
}
|
|
116
125
|
Nav.defaultProps = {
|
|
117
126
|
layout: 'button',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IFetchConfig } from '../../../hooks/useFetch';
|
|
3
3
|
import { IListProps } from '../../list/List/List';
|
|
4
4
|
export declare const ROUTER_ROLE_LOGIN = "login";
|
|
@@ -128,7 +128,7 @@ export interface IRouterProps {
|
|
|
128
128
|
* Дерево роутов
|
|
129
129
|
* @example {id: 'root', path: '/', component: IndexPage, items: [...]}
|
|
130
130
|
*/
|
|
131
|
-
routes: IRouteItem[] | {
|
|
131
|
+
routes: IRouteItem[] | IRouteItem | {
|
|
132
132
|
[key: string]: IRouteItem;
|
|
133
133
|
};
|
|
134
134
|
/**
|
package/ui/nav/Router/Router.js
CHANGED
|
@@ -38,13 +38,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
exports.__esModule = true;
|
|
40
40
|
exports.ROUTER_ROLE_404 = exports.ROUTER_ROLE_MODAL = exports.ROUTER_ROLE_LOGIN = void 0;
|
|
41
|
-
var
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
42
42
|
var react_router_1 = require("react-router");
|
|
43
43
|
var react_router_dom_1 = require("react-router-dom");
|
|
44
44
|
var connected_react_router_1 = require("connected-react-router");
|
|
45
45
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
46
46
|
var isEqual_1 = __importDefault(require("lodash-es/isEqual"));
|
|
47
|
-
var react_1 = require("react");
|
|
48
47
|
var react_use_1 = require("react-use");
|
|
49
48
|
var modal_1 = require("../../../actions/modal");
|
|
50
49
|
var modal_2 = require("../../../reducers/modal");
|
|
@@ -57,27 +56,29 @@ var helpers_1 = require("./helpers");
|
|
|
57
56
|
exports.ROUTER_ROLE_LOGIN = 'login';
|
|
58
57
|
exports.ROUTER_ROLE_MODAL = 'modal';
|
|
59
58
|
exports.ROUTER_ROLE_404 = '404';
|
|
60
|
-
var renderComponent = function (route, activePath, routeProps) {
|
|
59
|
+
var renderComponent = function (route, activePath, routeProps, alwaysAppendParentRoutePath) {
|
|
61
60
|
var _a, _b;
|
|
62
61
|
var routePath = (0, router_2.buildUrl)(route.path, (_a = routeProps === null || routeProps === void 0 ? void 0 : routeProps.match) === null || _a === void 0 ? void 0 : _a.params);
|
|
63
62
|
if (route.redirectTo && routePath === activePath) {
|
|
64
|
-
var
|
|
65
|
-
|
|
63
|
+
var redirectPath = alwaysAppendParentRoutePath
|
|
64
|
+
? (0, helpers_1.findRedirectPathRecursive)(route, activePath)
|
|
65
|
+
: (0, helpers_1.findRedirectPathRecursive)(route);
|
|
66
|
+
if (redirectPath === null) {
|
|
66
67
|
// eslint-disable-next-line no-console
|
|
67
68
|
console.error('Not found path for redirect in route:', route);
|
|
68
69
|
return null;
|
|
69
70
|
}
|
|
70
71
|
// Check already redirected
|
|
71
|
-
var toPath = (0, router_2.buildUrl)(
|
|
72
|
+
var toPath = (0, router_2.buildUrl)(redirectPath, (_b = routeProps === null || routeProps === void 0 ? void 0 : routeProps.match) === null || _b === void 0 ? void 0 : _b.params);
|
|
72
73
|
if (activePath !== toPath) {
|
|
73
|
-
return (
|
|
74
|
+
return (react_1["default"].createElement(react_router_1.Redirect, __assign({}, routeProps, { to: toPath }, route.componentProps)));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
if (!route.component) {
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
79
80
|
var Component = route.component;
|
|
80
|
-
return (
|
|
81
|
+
return (react_1["default"].createElement(Component, __assign({}, routeProps, route.componentProps)));
|
|
81
82
|
};
|
|
82
83
|
function Router(props) {
|
|
83
84
|
var _a;
|
|
@@ -167,14 +168,14 @@ function Router(props) {
|
|
|
167
168
|
return true;
|
|
168
169
|
}
|
|
169
170
|
var activeRoute = routes.find(function (r) { return r.id === activeRouteId; });
|
|
170
|
-
children = renderComponent(activeRoute, activePath, __assign(__assign({}, routeProps), { children: children })) || children;
|
|
171
|
+
children = renderComponent(activeRoute, activePath, __assign(__assign({}, routeProps), { children: children }), props.alwaysAppendParentRoutePath) || children;
|
|
171
172
|
// Stop, if route is exact
|
|
172
173
|
if (activeRoute.exact) {
|
|
173
174
|
return true;
|
|
174
175
|
}
|
|
175
176
|
return false;
|
|
176
177
|
});
|
|
177
|
-
var result = renderComponent(routeItem, activePath, __assign(__assign({}, routeProps), { children: children }));
|
|
178
|
+
var result = renderComponent(routeItem, activePath, __assign(__assign({}, routeProps), { children: children }), props.alwaysAppendParentRoutePath);
|
|
178
179
|
if (!result) {
|
|
179
180
|
if (children) {
|
|
180
181
|
return children;
|
|
@@ -186,11 +187,11 @@ function Router(props) {
|
|
|
186
187
|
};
|
|
187
188
|
var renderContent = function () {
|
|
188
189
|
var WrapperComponent = props.wrapperView;
|
|
189
|
-
var routeNodes = (
|
|
190
|
-
routes.map(function (routeItem, index) { return (
|
|
190
|
+
var routeNodes = (react_1["default"].createElement(react_router_1.Switch, null,
|
|
191
|
+
routes.map(function (routeItem, index) { return (react_1["default"].createElement(react_router_1.Route, __assign({ key: index, render: function (routeProps) { return renderItem(routeItem, routeProps); } }, routeItem, { component: null }))); }),
|
|
191
192
|
props.children));
|
|
192
193
|
if (WrapperComponent) {
|
|
193
|
-
return (
|
|
194
|
+
return (react_1["default"].createElement(WrapperComponent, __assign({}, props.wrapperProps), routeNodes));
|
|
194
195
|
}
|
|
195
196
|
return routeNodes;
|
|
196
197
|
};
|
|
@@ -198,12 +199,12 @@ function Router(props) {
|
|
|
198
199
|
return null;
|
|
199
200
|
}
|
|
200
201
|
if (process.env.IS_SSR) {
|
|
201
|
-
return (
|
|
202
|
+
return (react_1["default"].createElement(SsrProvider_1.SsrProviderContext.Consumer, null, function (context) { return (react_1["default"].createElement(react_router_1.StaticRouter, { location: components.store.history.location, context: context.staticContext }, renderContent())); }));
|
|
202
203
|
}
|
|
203
204
|
if (window.location.protocol === 'file:') {
|
|
204
|
-
return (
|
|
205
|
+
return (react_1["default"].createElement(react_router_dom_1.HashRouter, null, renderContent()));
|
|
205
206
|
}
|
|
206
|
-
return (
|
|
207
|
+
return (react_1["default"].createElement(connected_react_router_1.ConnectedRouter, { history: components.store.history }, renderContent()));
|
|
207
208
|
}
|
|
208
209
|
Router.defaultProps = {
|
|
209
210
|
autoScrollTop: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IRouteItem } from './Router';
|
|
2
|
-
export declare const findRedirectPathRecursive: (route: IRouteItem) => any;
|
|
2
|
+
export declare const findRedirectPathRecursive: (route: IRouteItem, parentPath?: string) => any;
|
|
3
3
|
export declare const walkRoutesRecursive: (item: IRouteItem | Record<string, any>, defaultItem?: any, parentItem?: any, alwaysAppendParentRoutePath?: boolean) => any;
|
|
4
4
|
export declare const treeToList: (item: IRouteItem | Record<string, any>, isRoot?: boolean, parentItem?: any, alwaysAppendParentRoutePath?: boolean) => Record<string, any>;
|
package/ui/nav/Router/helpers.js
CHANGED
|
@@ -18,23 +18,9 @@ exports.treeToList = exports.walkRoutesRecursive = exports.findRedirectPathRecur
|
|
|
18
18
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
19
19
|
var isArray_1 = __importDefault(require("lodash-es/isArray"));
|
|
20
20
|
var isObject_1 = __importDefault(require("lodash-es/isObject"));
|
|
21
|
+
var isBoolean_1 = __importDefault(require("lodash-es/isBoolean"));
|
|
22
|
+
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
21
23
|
var SLASH = '/';
|
|
22
|
-
var findRedirectPathRecursive = function (route) {
|
|
23
|
-
if (!route) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
if (typeof route.redirectTo === 'boolean') {
|
|
27
|
-
var key = (0, isObject_1["default"])(route.items) && !(0, isArray_1["default"])(route.items) ? Object.keys(route.items)[0] : '0';
|
|
28
|
-
return (0, exports.findRedirectPathRecursive)((0, get_1["default"])(route, ['items', key]));
|
|
29
|
-
}
|
|
30
|
-
if (typeof route.redirectTo === 'string') {
|
|
31
|
-
return route.redirectTo;
|
|
32
|
-
}
|
|
33
|
-
return route.path || route.path === ''
|
|
34
|
-
? route.path
|
|
35
|
-
: null;
|
|
36
|
-
};
|
|
37
|
-
exports.findRedirectPathRecursive = findRedirectPathRecursive;
|
|
38
24
|
var addSlashIfNotPresent = function (path) {
|
|
39
25
|
if (path === void 0) { path = ''; }
|
|
40
26
|
return path.startsWith(SLASH) ? path : (SLASH + path);
|
|
@@ -58,6 +44,23 @@ var appendChildIfNoSlash = function (path, parentPath) {
|
|
|
58
44
|
}
|
|
59
45
|
return path;
|
|
60
46
|
};
|
|
47
|
+
var findRedirectPathRecursive = function (route, parentPath) {
|
|
48
|
+
if (parentPath === void 0) { parentPath = ''; }
|
|
49
|
+
if (!route) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
if ((0, isBoolean_1["default"])(route.redirectTo)) {
|
|
53
|
+
var key = (0, isObject_1["default"])(route.items) && !(0, isArray_1["default"])(route.items) ? Object.keys(route.items)[0] : '0';
|
|
54
|
+
return (0, exports.findRedirectPathRecursive)((0, get_1["default"])(route, ['items', key]), parentPath);
|
|
55
|
+
}
|
|
56
|
+
if ((0, isString_1["default"])(route.redirectTo)) {
|
|
57
|
+
return route.redirectTo;
|
|
58
|
+
}
|
|
59
|
+
return route.path || route.path === ''
|
|
60
|
+
? joinChildAndParentPaths(route.path, parentPath)
|
|
61
|
+
: null;
|
|
62
|
+
};
|
|
63
|
+
exports.findRedirectPathRecursive = findRedirectPathRecursive;
|
|
61
64
|
var walkRoutesRecursive = function (item, defaultItem, parentItem, alwaysAppendParentRoutePath) {
|
|
62
65
|
if (defaultItem === void 0) { defaultItem = {}; }
|
|
63
66
|
if (parentItem === void 0) { parentItem = {}; }
|
package/ui/nav/Tree/Tree.d.ts
CHANGED
|
@@ -42,10 +42,10 @@ export interface ITreeProps extends Omit<ITreeConfig, 'currentPage' | 'itemsOnPa
|
|
|
42
42
|
*/
|
|
43
43
|
levelPadding?: number;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Скрыть иконку c лева от элемента
|
|
46
46
|
* @example true
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
hideIcon?: boolean;
|
|
49
49
|
/**
|
|
50
50
|
* Кастомная иконка, заменяющая иконку раскрытия по умолчанию
|
|
51
51
|
*/
|
|
@@ -67,7 +67,7 @@ declare namespace Tree {
|
|
|
67
67
|
levelPadding: number;
|
|
68
68
|
hasIconExpandOnly: boolean;
|
|
69
69
|
useSameSelectedItemId: boolean;
|
|
70
|
-
|
|
70
|
+
hideIcon: boolean;
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
export default Tree;
|
package/ui/nav/Tree/Tree.js
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
exports.__esModule = true;
|
|
3
|
+
var react_1 = require("react");
|
|
14
4
|
var hooks_1 = require("../../../hooks");
|
|
15
5
|
function Tree(props) {
|
|
16
6
|
var components = (0, hooks_1.useComponents)();
|
|
@@ -25,7 +15,15 @@ function Tree(props) {
|
|
|
25
15
|
alwaysOpened: props.alwaysOpened,
|
|
26
16
|
useSameSelectedItemId: props.useSameSelectedItemId
|
|
27
17
|
}).treeItems;
|
|
28
|
-
|
|
18
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
19
|
+
items: treeItems,
|
|
20
|
+
levelPadding: props.levelPadding,
|
|
21
|
+
className: props.className,
|
|
22
|
+
hideIcon: props.hideIcon,
|
|
23
|
+
customIcon: props.customIcon,
|
|
24
|
+
hasIconExpandOnly: props.hasIconExpandOnly
|
|
25
|
+
}); }, [props.className, props.customIcon, props.hasIconExpandOnly, props.hideIcon, props.levelPadding, treeItems]);
|
|
26
|
+
return components.ui.renderView(props.view || 'nav.TreeView', viewProps);
|
|
29
27
|
}
|
|
30
28
|
exports["default"] = Tree;
|
|
31
29
|
Tree.defaultProps = {
|
|
@@ -36,5 +34,5 @@ Tree.defaultProps = {
|
|
|
36
34
|
levelPadding: 32,
|
|
37
35
|
hasIconExpandOnly: false,
|
|
38
36
|
useSameSelectedItemId: true,
|
|
39
|
-
|
|
37
|
+
hideIcon: false
|
|
40
38
|
};
|