@aloudata/aloudata-design 0.2.0-beta.3 → 0.2.0-beta.4
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/es/Dropdown/index.d.ts +1 -0
- package/es/Input/components/Group/index.d.ts +3 -1
- package/es/Input/components/Password/index.d.ts +1 -0
- package/es/Input/index.d.ts +1 -1
- package/es/Menu/Divider.d.ts +1 -0
- package/es/Menu/MenuItem.d.ts +7 -0
- package/es/Menu/index.d.ts +1 -0
- package/es/Table/index.js +2 -2
- package/es/Table/interface.d.ts +5 -5
- package/es/Tabs/index.d.ts +1 -0
- package/es/index.d.ts +10 -1
- package/lib/Dropdown/index.d.ts +1 -0
- package/lib/Input/components/Group/index.d.ts +3 -1
- package/lib/Input/components/Password/index.d.ts +1 -0
- package/lib/Input/index.d.ts +1 -1
- package/lib/Menu/Divider.d.ts +1 -0
- package/lib/Menu/MenuItem.d.ts +7 -0
- package/lib/Menu/index.d.ts +1 -0
- package/lib/Table/index.js +1 -1
- package/lib/Table/interface.d.ts +5 -5
- package/lib/Tabs/index.d.ts +1 -0
- package/lib/index.d.ts +10 -1
- package/package.json +1 -1
- package/es/Button/demo/Icon/index.d.ts +0 -3
- package/es/Button/demo/Icon/index.js +0 -67
- package/es/Button/demo/Icon/index.less +0 -6
- package/es/Button/demo/basic/index.d.ts +0 -4
- package/es/Button/demo/basic/index.js +0 -57
- package/es/Button/demo/basic/index.less +0 -6
- package/es/Button/demo/disable/index.d.ts +0 -3
- package/es/Button/demo/disable/index.js +0 -23
- package/es/Button/demo/disable/index.less +0 -0
- package/es/Button/demo/href/index.d.ts +0 -2
- package/es/Button/demo/href/index.js +0 -17
- package/es/Button/demo/loading/index.d.ts +0 -3
- package/es/Button/demo/loading/index.js +0 -37
- package/es/Button/demo/loading/index.less +0 -6
- package/es/Dropdown/demo/basic/index.d.ts +0 -4
- package/es/Dropdown/demo/basic/index.js +0 -18
- package/es/Dropdown/demo/button/index.d.ts +0 -3
- package/es/Dropdown/demo/button/index.js +0 -159
- package/es/Dropdown/demo/button/index.less +0 -9
- package/es/Dropdown/demo/placement/index.d.ts +0 -2
- package/es/Dropdown/demo/placement/index.js +0 -40
- package/es/Dropdown/demo/subMenu/index.d.ts +0 -2
- package/es/Dropdown/demo/subMenu/index.js +0 -42
- package/es/Dropdown/demo/trigger/index.d.ts +0 -2
- package/es/Dropdown/demo/trigger/index.js +0 -17
- package/es/Input/demo/allowClear/index.d.ts +0 -3
- package/es/Input/demo/allowClear/index.js +0 -11
- package/es/Input/demo/allowClear/index.less +0 -0
- package/es/Input/demo/basic/index.d.ts +0 -4
- package/es/Input/demo/basic/index.js +0 -65
- package/es/Input/demo/basic/index.less +0 -14
- package/es/Input/demo/gourp/index.d.ts +0 -2
- package/es/Input/demo/gourp/index.js +0 -67
- package/es/Input/demo/password/index.d.ts +0 -3
- package/es/Input/demo/password/index.js +0 -21
- package/es/Input/demo/password/index.less +0 -0
- package/es/Input/demo/prefix/index.d.ts +0 -3
- package/es/Input/demo/prefix/index.js +0 -17
- package/es/Input/demo/prefix/index.less +0 -0
- package/es/Input/demo/showCount/index.d.ts +0 -3
- package/es/Input/demo/showCount/index.js +0 -17
- package/es/Input/demo/showCount/index.less +0 -0
- package/es/Input/demo/textArea/autoSize.d.ts +0 -2
- package/es/Input/demo/textArea/autoSize.js +0 -50
- package/es/Navigator/demo/basic/index.d.ts +0 -4
- package/es/Navigator/demo/basic/index.js +0 -45
- package/es/Navigator/demo/basic/index.less +0 -3
- package/es/Navigator/demo/example/index.d.ts +0 -4
- package/es/Navigator/demo/example/index.js +0 -153
- package/es/Navigator/demo/example/index.less +0 -10
- package/es/Navigator/demo/logo.png +0 -0
- package/es/Navigator/demo/menuWithFooter/index.d.ts +0 -4
- package/es/Navigator/demo/menuWithFooter/index.js +0 -73
- package/es/Navigator/demo/menuWithFooter/index.less +0 -3
- package/es/Navigator/demo/subMenu/index.d.ts +0 -4
- package/es/Navigator/demo/subMenu/index.js +0 -71
- package/es/Navigator/demo/subMenu/index.less +0 -3
- package/es/Select/demo/disabled/index.d.ts +0 -2
- package/es/Select/demo/disabled/index.js +0 -50
- package/es/Select/demo/multiple/index.d.ts +0 -2
- package/es/Select/demo/multiple/index.js +0 -140
- package/es/Select/demo/options/index.d.ts +0 -2
- package/es/Select/demo/options/index.js +0 -55
- package/es/Select/demo/single/index.d.ts +0 -3
- package/es/Select/demo/single/index.js +0 -89
- package/es/Select/demo/single/index.less +0 -5
- package/es/Table/demo/basic/createData.d.ts +0 -10
- package/es/Table/demo/basic/createData.js +0 -18
- package/es/Table/demo/basic/index.d.ts +0 -2
- package/es/Table/demo/basic/index.js +0 -64
- package/es/Table/demo/editCell/index.d.ts +0 -2
- package/es/Table/demo/editCell/index.js +0 -39
- package/es/Table/demo/renderHeaderRight/index.d.ts +0 -2
- package/es/Table/demo/renderHeaderRight/index.js +0 -37
- package/es/Table/demo/resizeColumn/index.d.ts +0 -2
- package/es/Table/demo/resizeColumn/index.js +0 -32
- package/es/Table/demo/rowSelect/index.d.ts +0 -2
- package/es/Table/demo/rowSelect/index.js +0 -35
- package/es/Table/demo/sort/index.d.ts +0 -2
- package/es/Table/demo/sort/index.js +0 -43
- package/es/Table/demo/virtualList/index.d.ts +0 -2
- package/es/Table/demo/virtualList/index.js +0 -88
- package/es/Tabs/demo/adaptHeight/index.d.ts +0 -3
- package/es/Tabs/demo/adaptHeight/index.js +0 -19
- package/es/Tabs/demo/adaptHeight/index.less +0 -3
- package/es/Tabs/demo/basic/index.d.ts +0 -4
- package/es/Tabs/demo/basic/index.js +0 -44
- package/es/Tabs/demo/basic/index.less +0 -5
- package/es/Tabs/demo/horizontalScroll/index.d.ts +0 -3
- package/es/Tabs/demo/horizontalScroll/index.js +0 -30
- package/es/Tabs/demo/horizontalScroll/index.less +0 -3
- package/es/Tooltip/demo/basic/index.d.ts +0 -2
- package/es/Tooltip/demo/basic/index.js +0 -7
- package/es/Tooltip/demo/overflow/index.d.ts +0 -2
- package/es/Tooltip/demo/overflow/index.js +0 -7
- package/es/Tooltip/demo/placement/index.d.ts +0 -6
- package/es/Tooltip/demo/placement/index.js +0 -70
- package/es/Tooltip/demo/placement/index.less +0 -7
- package/es/Tooltip/demo/trigger/index.d.ts +0 -3
- package/es/Tooltip/demo/trigger/index.js +0 -20
- package/es/Tooltip/demo/trigger/index.less +0 -5
- package/lib/Button/demo/Icon/index.d.ts +0 -3
- package/lib/Button/demo/Icon/index.js +0 -82
- package/lib/Button/demo/Icon/index.less +0 -6
- package/lib/Button/demo/basic/index.d.ts +0 -4
- package/lib/Button/demo/basic/index.js +0 -73
- package/lib/Button/demo/basic/index.less +0 -6
- package/lib/Button/demo/disable/index.d.ts +0 -3
- package/lib/Button/demo/disable/index.js +0 -37
- package/lib/Button/demo/disable/index.less +0 -0
- package/lib/Button/demo/href/index.d.ts +0 -2
- package/lib/Button/demo/href/index.js +0 -30
- package/lib/Button/demo/loading/index.d.ts +0 -3
- package/lib/Button/demo/loading/index.js +0 -51
- package/lib/Button/demo/loading/index.less +0 -6
- package/lib/Dropdown/demo/basic/index.d.ts +0 -4
- package/lib/Dropdown/demo/basic/index.js +0 -35
- package/lib/Dropdown/demo/button/index.d.ts +0 -3
- package/lib/Dropdown/demo/button/index.js +0 -182
- package/lib/Dropdown/demo/button/index.less +0 -9
- package/lib/Dropdown/demo/placement/index.d.ts +0 -2
- package/lib/Dropdown/demo/placement/index.js +0 -56
- package/lib/Dropdown/demo/subMenu/index.d.ts +0 -2
- package/lib/Dropdown/demo/subMenu/index.js +0 -59
- package/lib/Dropdown/demo/trigger/index.d.ts +0 -2
- package/lib/Dropdown/demo/trigger/index.js +0 -32
- package/lib/Input/demo/allowClear/index.d.ts +0 -3
- package/lib/Input/demo/allowClear/index.js +0 -25
- package/lib/Input/demo/allowClear/index.less +0 -0
- package/lib/Input/demo/basic/index.d.ts +0 -4
- package/lib/Input/demo/basic/index.js +0 -80
- package/lib/Input/demo/basic/index.less +0 -14
- package/lib/Input/demo/gourp/index.d.ts +0 -2
- package/lib/Input/demo/gourp/index.js +0 -81
- package/lib/Input/demo/password/index.d.ts +0 -3
- package/lib/Input/demo/password/index.js +0 -35
- package/lib/Input/demo/password/index.less +0 -0
- package/lib/Input/demo/prefix/index.d.ts +0 -3
- package/lib/Input/demo/prefix/index.js +0 -32
- package/lib/Input/demo/prefix/index.less +0 -0
- package/lib/Input/demo/showCount/index.d.ts +0 -3
- package/lib/Input/demo/showCount/index.js +0 -31
- package/lib/Input/demo/showCount/index.less +0 -0
- package/lib/Input/demo/textArea/autoSize.d.ts +0 -2
- package/lib/Input/demo/textArea/autoSize.js +0 -63
- package/lib/Navigator/demo/basic/index.d.ts +0 -4
- package/lib/Navigator/demo/basic/index.js +0 -62
- package/lib/Navigator/demo/basic/index.less +0 -3
- package/lib/Navigator/demo/example/index.d.ts +0 -4
- package/lib/Navigator/demo/example/index.js +0 -179
- package/lib/Navigator/demo/example/index.less +0 -10
- package/lib/Navigator/demo/logo.png +0 -0
- package/lib/Navigator/demo/menuWithFooter/index.d.ts +0 -4
- package/lib/Navigator/demo/menuWithFooter/index.js +0 -92
- package/lib/Navigator/demo/menuWithFooter/index.less +0 -3
- package/lib/Navigator/demo/subMenu/index.d.ts +0 -4
- package/lib/Navigator/demo/subMenu/index.js +0 -88
- package/lib/Navigator/demo/subMenu/index.less +0 -3
- package/lib/Select/demo/disabled/index.d.ts +0 -2
- package/lib/Select/demo/disabled/index.js +0 -64
- package/lib/Select/demo/multiple/index.d.ts +0 -2
- package/lib/Select/demo/multiple/index.js +0 -154
- package/lib/Select/demo/options/index.d.ts +0 -2
- package/lib/Select/demo/options/index.js +0 -69
- package/lib/Select/demo/single/index.d.ts +0 -3
- package/lib/Select/demo/single/index.js +0 -103
- package/lib/Select/demo/single/index.less +0 -5
- package/lib/Table/demo/basic/createData.d.ts +0 -10
- package/lib/Table/demo/basic/createData.js +0 -23
- package/lib/Table/demo/basic/index.d.ts +0 -2
- package/lib/Table/demo/basic/index.js +0 -80
- package/lib/Table/demo/editCell/index.d.ts +0 -2
- package/lib/Table/demo/editCell/index.js +0 -54
- package/lib/Table/demo/renderHeaderRight/index.d.ts +0 -2
- package/lib/Table/demo/renderHeaderRight/index.js +0 -52
- package/lib/Table/demo/resizeColumn/index.d.ts +0 -2
- package/lib/Table/demo/resizeColumn/index.js +0 -47
- package/lib/Table/demo/rowSelect/index.d.ts +0 -2
- package/lib/Table/demo/rowSelect/index.js +0 -50
- package/lib/Table/demo/sort/index.d.ts +0 -2
- package/lib/Table/demo/sort/index.js +0 -58
- package/lib/Table/demo/virtualList/index.d.ts +0 -2
- package/lib/Table/demo/virtualList/index.js +0 -103
- package/lib/Tabs/demo/adaptHeight/index.d.ts +0 -3
- package/lib/Tabs/demo/adaptHeight/index.js +0 -34
- package/lib/Tabs/demo/adaptHeight/index.less +0 -3
- package/lib/Tabs/demo/basic/index.d.ts +0 -4
- package/lib/Tabs/demo/basic/index.js +0 -67
- package/lib/Tabs/demo/basic/index.less +0 -5
- package/lib/Tabs/demo/horizontalScroll/index.d.ts +0 -3
- package/lib/Tabs/demo/horizontalScroll/index.js +0 -45
- package/lib/Tabs/demo/horizontalScroll/index.less +0 -3
- package/lib/Tooltip/demo/basic/index.d.ts +0 -2
- package/lib/Tooltip/demo/basic/index.js +0 -20
- package/lib/Tooltip/demo/overflow/index.d.ts +0 -2
- package/lib/Tooltip/demo/overflow/index.js +0 -20
- package/lib/Tooltip/demo/placement/index.d.ts +0 -6
- package/lib/Tooltip/demo/placement/index.js +0 -86
- package/lib/Tooltip/demo/placement/index.less +0 -7
- package/lib/Tooltip/demo/trigger/index.d.ts +0 -3
- package/lib/Tooltip/demo/trigger/index.js +0 -34
- package/lib/Tooltip/demo/trigger/index.less +0 -5
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
|
|
11
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
-
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
-
|
|
15
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
-
|
|
17
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
|
|
19
|
-
import React, { useState, useMemo } from 'react';
|
|
20
|
-
import { Navigator, Button } from '@aloudata/aloudata-design';
|
|
21
|
-
import Icon from '../../../Icon';
|
|
22
|
-
import logoSrc from '../logo.png';
|
|
23
|
-
import { useLocation } from 'umi';
|
|
24
|
-
import _ from 'lodash';
|
|
25
|
-
import '../../style/index.less';
|
|
26
|
-
import './index.less';
|
|
27
|
-
var mockData = [{
|
|
28
|
-
title: '查询',
|
|
29
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
30
|
-
type: 'add'
|
|
31
|
-
}),
|
|
32
|
-
key: 'query',
|
|
33
|
-
path: '/navigator#search'
|
|
34
|
-
}, {
|
|
35
|
-
title: '数据',
|
|
36
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
37
|
-
type: 'add'
|
|
38
|
-
}),
|
|
39
|
-
key: 'data',
|
|
40
|
-
path: '/navigator#data',
|
|
41
|
-
children: [{
|
|
42
|
-
title: '数据空间',
|
|
43
|
-
key: 'dataSpace',
|
|
44
|
-
path: '/navigator#dataSpace'
|
|
45
|
-
}, {
|
|
46
|
-
title: '数据源',
|
|
47
|
-
key: 'datasource',
|
|
48
|
-
path: '/navigator#datasource'
|
|
49
|
-
}]
|
|
50
|
-
}, {
|
|
51
|
-
title: '计算',
|
|
52
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
53
|
-
type: 'add'
|
|
54
|
-
}),
|
|
55
|
-
key: 'calculate',
|
|
56
|
-
path: '/navigator#calculate',
|
|
57
|
-
children: [{
|
|
58
|
-
title: '任务记录',
|
|
59
|
-
key: 'job',
|
|
60
|
-
path: '/navigator#job'
|
|
61
|
-
}, {
|
|
62
|
-
title: '查询引擎',
|
|
63
|
-
key: 'queryEngine',
|
|
64
|
-
path: '/navigator#queryEngine'
|
|
65
|
-
}]
|
|
66
|
-
}, {
|
|
67
|
-
title: '测试',
|
|
68
|
-
key: 'test',
|
|
69
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
70
|
-
type: 'add'
|
|
71
|
-
}),
|
|
72
|
-
path: '/navigator#calculate',
|
|
73
|
-
children: [{
|
|
74
|
-
title: '测试菜单1',
|
|
75
|
-
key: 'hello',
|
|
76
|
-
path: '/navigator#hello'
|
|
77
|
-
}, {
|
|
78
|
-
title: '测试菜单2',
|
|
79
|
-
key: 'hello2',
|
|
80
|
-
path: '/navigator#hello2'
|
|
81
|
-
}]
|
|
82
|
-
}];
|
|
83
|
-
export default (function () {
|
|
84
|
-
// 根据路由信息去匹配菜单信息
|
|
85
|
-
var _useLocation = useLocation(),
|
|
86
|
-
pathname = _useLocation.pathname;
|
|
87
|
-
|
|
88
|
-
var flattenMenuByMenuPath = useMemo(function () {
|
|
89
|
-
return getFlattenMenuByPath(mockData);
|
|
90
|
-
}, []);
|
|
91
|
-
|
|
92
|
-
var menuInfo = _.get(flattenMenuByMenuPath, pathname, {
|
|
93
|
-
path: '',
|
|
94
|
-
key: ''
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
var _useState = useState(menuInfo.key || ''),
|
|
98
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
99
|
-
selectedKey = _useState2[0],
|
|
100
|
-
setSelectedKey = _useState2[1];
|
|
101
|
-
|
|
102
|
-
var onMenuSelect = function onMenuSelect(menuInfo) {
|
|
103
|
-
console.log('menuInfo', menuInfo);
|
|
104
|
-
var path = menuInfo.path; // 进行路由跳转
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var mockBtnClick = function mockBtnClick(key) {
|
|
108
|
-
setSelectedKey(key);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
-
className: 'ald-nav-demo-example'
|
|
113
|
-
}, /*#__PURE__*/React.createElement(Navigator, {
|
|
114
|
-
menuList: mockData,
|
|
115
|
-
selectedKey: selectedKey,
|
|
116
|
-
footer: /*#__PURE__*/React.createElement("div", null, "Footer Wrap"),
|
|
117
|
-
logoSrc: logoSrc,
|
|
118
|
-
onMenuSelect: onMenuSelect
|
|
119
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
className: 'ald-nav-content'
|
|
121
|
-
}, /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u83DC\u5355\uFF1A", selectedKey), /*#__PURE__*/React.createElement(Button, {
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return mockBtnClick('query');
|
|
124
|
-
}
|
|
125
|
-
}, "\u6A21\u62DF\u67E5\u8BE2\u9875\u9762\u5237\u65B0"), /*#__PURE__*/React.createElement(Button, {
|
|
126
|
-
onClick: function onClick() {
|
|
127
|
-
return mockBtnClick('dataSpace');
|
|
128
|
-
}
|
|
129
|
-
}, "\u6A21\u62DF\u6570\u636E\u7A7A\u95F4\u5237\u65B0"), /*#__PURE__*/React.createElement(Button, {
|
|
130
|
-
onClick: function onClick() {
|
|
131
|
-
return mockBtnClick('job');
|
|
132
|
-
}
|
|
133
|
-
}, "\u6A21\u62DF\u4EFB\u52A1\u8BB0\u5F55\u5237\u65B0")));
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
function getFlattenMenuByPath(menuList) {
|
|
137
|
-
var flattenMenuByMenuPath = {};
|
|
138
|
-
menuList.forEach(function (item) {
|
|
139
|
-
if (!item.path) {
|
|
140
|
-
console.error('path is required');
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (item.children) {
|
|
144
|
-
flattenMenuByMenuPath[item.path] = _objectSpread({}, item);
|
|
145
|
-
item.children.forEach(function (childItem) {
|
|
146
|
-
flattenMenuByMenuPath[childItem.path] = _objectSpread({}, childItem);
|
|
147
|
-
});
|
|
148
|
-
} else {
|
|
149
|
-
flattenMenuByMenuPath[item.path] = _objectSpread({}, item);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
return flattenMenuByMenuPath;
|
|
153
|
-
}
|
|
Binary file
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Navigator } from '@aloudata/aloudata-design';
|
|
3
|
-
import logoSrc from '../logo.png';
|
|
4
|
-
import Icon from '../../../Icon';
|
|
5
|
-
import '../../style/index.less';
|
|
6
|
-
import './index.less';
|
|
7
|
-
export default (function () {
|
|
8
|
-
var mockData = [{
|
|
9
|
-
title: '查询',
|
|
10
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
11
|
-
type: 'add'
|
|
12
|
-
}),
|
|
13
|
-
key: 'query',
|
|
14
|
-
path: '/query'
|
|
15
|
-
}, {
|
|
16
|
-
title: '数据',
|
|
17
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
18
|
-
type: 'add'
|
|
19
|
-
}),
|
|
20
|
-
key: 'data',
|
|
21
|
-
path: '/data',
|
|
22
|
-
children: [{
|
|
23
|
-
title: '数据空间',
|
|
24
|
-
key: 'dataSpace',
|
|
25
|
-
path: '/data/dataSpace'
|
|
26
|
-
}, {
|
|
27
|
-
title: '数据源',
|
|
28
|
-
key: 'datasource',
|
|
29
|
-
path: '/data/datasource'
|
|
30
|
-
}]
|
|
31
|
-
}, {
|
|
32
|
-
title: '计算',
|
|
33
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
-
type: 'add'
|
|
35
|
-
}),
|
|
36
|
-
key: 'calculate',
|
|
37
|
-
path: '/calculate',
|
|
38
|
-
children: [{
|
|
39
|
-
title: '任务记录',
|
|
40
|
-
key: 'job',
|
|
41
|
-
path: '/calculate/job'
|
|
42
|
-
}, {
|
|
43
|
-
title: '查询引擎',
|
|
44
|
-
key: 'queryEngine',
|
|
45
|
-
path: '/calculate/'
|
|
46
|
-
}]
|
|
47
|
-
}, {
|
|
48
|
-
title: '测试',
|
|
49
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
-
type: 'add'
|
|
51
|
-
}),
|
|
52
|
-
key: 'test',
|
|
53
|
-
path: '/calculate',
|
|
54
|
-
children: [{
|
|
55
|
-
title: '测试菜单1',
|
|
56
|
-
key: 'hello',
|
|
57
|
-
path: '/calculate/job'
|
|
58
|
-
}, {
|
|
59
|
-
title: '测试菜单2',
|
|
60
|
-
key: 'hello2',
|
|
61
|
-
path: '/calculate/'
|
|
62
|
-
}]
|
|
63
|
-
}];
|
|
64
|
-
var footer = /*#__PURE__*/React.createElement("div", null, "Footer Wrap");
|
|
65
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: 'ald-nav-demo'
|
|
67
|
-
}, /*#__PURE__*/React.createElement(Navigator, {
|
|
68
|
-
menuList: mockData,
|
|
69
|
-
defaultSelectedKey: "dataSpace",
|
|
70
|
-
footer: footer,
|
|
71
|
-
logoSrc: logoSrc
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Navigator } from '@aloudata/aloudata-design';
|
|
3
|
-
import logoSrc from '../logo.png';
|
|
4
|
-
import Icon from '../../../Icon';
|
|
5
|
-
import '../../style/index.less';
|
|
6
|
-
import './index.less';
|
|
7
|
-
export default (function () {
|
|
8
|
-
var mockData = [{
|
|
9
|
-
title: '查询',
|
|
10
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
11
|
-
type: 'add'
|
|
12
|
-
}),
|
|
13
|
-
key: 'query',
|
|
14
|
-
path: '/query'
|
|
15
|
-
}, {
|
|
16
|
-
title: '数据',
|
|
17
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
18
|
-
type: 'add'
|
|
19
|
-
}),
|
|
20
|
-
key: 'data',
|
|
21
|
-
path: '/data',
|
|
22
|
-
children: [{
|
|
23
|
-
title: '数据空间',
|
|
24
|
-
key: 'dataSpace',
|
|
25
|
-
path: '/data/dataSpace'
|
|
26
|
-
}, {
|
|
27
|
-
title: '数据源',
|
|
28
|
-
key: 'datasource',
|
|
29
|
-
path: '/data/datasource'
|
|
30
|
-
}]
|
|
31
|
-
}, {
|
|
32
|
-
title: '计算',
|
|
33
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
-
type: 'add'
|
|
35
|
-
}),
|
|
36
|
-
key: 'calculate',
|
|
37
|
-
path: '/calculate',
|
|
38
|
-
children: [{
|
|
39
|
-
title: '任务记录',
|
|
40
|
-
key: 'job',
|
|
41
|
-
path: '/calculate/job'
|
|
42
|
-
}, {
|
|
43
|
-
title: '查询引擎',
|
|
44
|
-
key: 'queryEngine',
|
|
45
|
-
path: '/calculate/'
|
|
46
|
-
}]
|
|
47
|
-
}, {
|
|
48
|
-
title: '测试',
|
|
49
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
-
type: 'add'
|
|
51
|
-
}),
|
|
52
|
-
key: 'test',
|
|
53
|
-
path: '/calculate',
|
|
54
|
-
children: [{
|
|
55
|
-
title: '测试菜单1',
|
|
56
|
-
key: 'hello',
|
|
57
|
-
path: '/calculate/job'
|
|
58
|
-
}, {
|
|
59
|
-
title: '测试菜单2',
|
|
60
|
-
key: 'hello2',
|
|
61
|
-
path: '/calculate/'
|
|
62
|
-
}]
|
|
63
|
-
}];
|
|
64
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: 'ald-nav-demo'
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Navigator, {
|
|
67
|
-
menuList: mockData,
|
|
68
|
-
defaultSelectedKey: "dataSpace",
|
|
69
|
-
logoSrc: logoSrc
|
|
70
|
-
}));
|
|
71
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from "react"; // import { Select } from '@aloudata/aloudata-design';
|
|
2
|
-
|
|
3
|
-
import Select from '../../index';
|
|
4
|
-
var Option = Select.Option;
|
|
5
|
-
export default (function () {
|
|
6
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
className: 'ald-select-demo'
|
|
8
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
9
|
-
className: 'ald-select',
|
|
10
|
-
style: {
|
|
11
|
-
width: 200
|
|
12
|
-
},
|
|
13
|
-
size: 'large',
|
|
14
|
-
multiple: true,
|
|
15
|
-
disabled: true,
|
|
16
|
-
placeholder: "large"
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
18
|
-
key: 'a',
|
|
19
|
-
value: "Example Text"
|
|
20
|
-
}, "Example Text")), /*#__PURE__*/React.createElement(Select, {
|
|
21
|
-
className: 'ald-select',
|
|
22
|
-
style: {
|
|
23
|
-
width: 200
|
|
24
|
-
},
|
|
25
|
-
multiple: true,
|
|
26
|
-
label: 'Label:',
|
|
27
|
-
disabled: true,
|
|
28
|
-
placeholder: "placeholder"
|
|
29
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
30
|
-
key: 'a',
|
|
31
|
-
value: "Example Text"
|
|
32
|
-
}, "Example Text")), /*#__PURE__*/React.createElement(Select, {
|
|
33
|
-
className: 'ald-select',
|
|
34
|
-
style: {
|
|
35
|
-
width: 200
|
|
36
|
-
},
|
|
37
|
-
multiple: true,
|
|
38
|
-
size: "small",
|
|
39
|
-
label: 'Label:',
|
|
40
|
-
defaultValue: ['a', 'b'],
|
|
41
|
-
disabled: true,
|
|
42
|
-
placeholder: "normal"
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
44
|
-
key: 'a',
|
|
45
|
-
value: "a"
|
|
46
|
-
}, "Example Text"), /*#__PURE__*/React.createElement(Option, {
|
|
47
|
-
key: 'b',
|
|
48
|
-
value: "b"
|
|
49
|
-
}, "Example Text")));
|
|
50
|
-
});
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
import React from "react"; // import { Select } from '@aloudata/aloudata-design';
|
|
14
|
-
|
|
15
|
-
import Select from '../../index';
|
|
16
|
-
import Icon from '../../../Icon';
|
|
17
|
-
var Option = Select.Option;
|
|
18
|
-
export default (function () {
|
|
19
|
-
var _React$useState = React.useState(''),
|
|
20
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21
|
-
value = _React$useState2[0],
|
|
22
|
-
setValue = _React$useState2[1];
|
|
23
|
-
|
|
24
|
-
var _onChange = function onChange(value) {
|
|
25
|
-
console.log(value);
|
|
26
|
-
setValue(value);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: 'ald-select-demo'
|
|
31
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
32
|
-
className: 'ald-select',
|
|
33
|
-
style: {
|
|
34
|
-
width: 200
|
|
35
|
-
},
|
|
36
|
-
size: 'large',
|
|
37
|
-
multiple: true,
|
|
38
|
-
placeholder: "large size"
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
40
|
-
key: 'a',
|
|
41
|
-
value: "Example Text"
|
|
42
|
-
}, "Example TexExample TextExample TextExample TextExample TextExample Textt"), /*#__PURE__*/React.createElement(Option, {
|
|
43
|
-
key: 'b',
|
|
44
|
-
value: "b"
|
|
45
|
-
}, "b"), /*#__PURE__*/React.createElement(Option, {
|
|
46
|
-
key: 'c',
|
|
47
|
-
value: "c"
|
|
48
|
-
}, "c"), /*#__PURE__*/React.createElement(Option, {
|
|
49
|
-
key: 'd',
|
|
50
|
-
value: "d"
|
|
51
|
-
}, "d"), /*#__PURE__*/React.createElement(Option, {
|
|
52
|
-
key: 'e',
|
|
53
|
-
value: "e"
|
|
54
|
-
}, "e"), /*#__PURE__*/React.createElement(Option, {
|
|
55
|
-
key: "f",
|
|
56
|
-
value: "f"
|
|
57
|
-
}, "f"), /*#__PURE__*/React.createElement(Option, {
|
|
58
|
-
key: "g",
|
|
59
|
-
value: "g"
|
|
60
|
-
}, "g")), /*#__PURE__*/React.createElement(Select, {
|
|
61
|
-
className: 'ald-select',
|
|
62
|
-
style: {
|
|
63
|
-
width: 200
|
|
64
|
-
},
|
|
65
|
-
size: 'default',
|
|
66
|
-
label: 'Label:',
|
|
67
|
-
multiple: true,
|
|
68
|
-
listHeight: 100,
|
|
69
|
-
placeholder: "default"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
71
|
-
key: 'a',
|
|
72
|
-
value: "Example Text"
|
|
73
|
-
}, "Example Text"), /*#__PURE__*/React.createElement(Option, {
|
|
74
|
-
key: 'b',
|
|
75
|
-
value: "b"
|
|
76
|
-
}, "b"), /*#__PURE__*/React.createElement(Option, {
|
|
77
|
-
key: 'c',
|
|
78
|
-
value: "c"
|
|
79
|
-
}, "c"), /*#__PURE__*/React.createElement(Option, {
|
|
80
|
-
key: 'd',
|
|
81
|
-
value: "d"
|
|
82
|
-
}, "d"), /*#__PURE__*/React.createElement(Option, {
|
|
83
|
-
key: 'e',
|
|
84
|
-
value: "e"
|
|
85
|
-
}, "e"), /*#__PURE__*/React.createElement(Option, {
|
|
86
|
-
key: "f",
|
|
87
|
-
value: "f"
|
|
88
|
-
}, "f"), /*#__PURE__*/React.createElement(Option, {
|
|
89
|
-
key: "g",
|
|
90
|
-
value: "g"
|
|
91
|
-
}, "g")), /*#__PURE__*/React.createElement(Select, {
|
|
92
|
-
className: 'ald-select',
|
|
93
|
-
style: {
|
|
94
|
-
width: 200
|
|
95
|
-
},
|
|
96
|
-
size: 'small',
|
|
97
|
-
multiple: true,
|
|
98
|
-
value: value,
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
onChange: function onChange(v) {
|
|
101
|
-
_onChange(v);
|
|
102
|
-
},
|
|
103
|
-
placeholder: "small"
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
105
|
-
key: 'a',
|
|
106
|
-
value: "Example Text"
|
|
107
|
-
}, "Example Text")), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Select, {
|
|
108
|
-
className: 'ald-select',
|
|
109
|
-
style: {
|
|
110
|
-
width: 200
|
|
111
|
-
},
|
|
112
|
-
size: 'large',
|
|
113
|
-
multiple: true,
|
|
114
|
-
label: /*#__PURE__*/React.createElement(Icon, {
|
|
115
|
-
type: 'view_Partial_line'
|
|
116
|
-
}),
|
|
117
|
-
placeholder: "large size"
|
|
118
|
-
}, /*#__PURE__*/React.createElement(Option, {
|
|
119
|
-
key: 'a',
|
|
120
|
-
value: "Example Text"
|
|
121
|
-
}, "Example TexExample TextExample TextExample TextExample TextExample Textt"), /*#__PURE__*/React.createElement(Option, {
|
|
122
|
-
key: 'b',
|
|
123
|
-
value: "b"
|
|
124
|
-
}, "b"), /*#__PURE__*/React.createElement(Option, {
|
|
125
|
-
key: 'c',
|
|
126
|
-
value: "c"
|
|
127
|
-
}, "c"), /*#__PURE__*/React.createElement(Option, {
|
|
128
|
-
key: 'd',
|
|
129
|
-
value: "d"
|
|
130
|
-
}, "d"), /*#__PURE__*/React.createElement(Option, {
|
|
131
|
-
key: 'e',
|
|
132
|
-
value: "e"
|
|
133
|
-
}, "e"), /*#__PURE__*/React.createElement(Option, {
|
|
134
|
-
key: "f",
|
|
135
|
-
value: "f"
|
|
136
|
-
}, "f"), /*#__PURE__*/React.createElement(Option, {
|
|
137
|
-
key: "g",
|
|
138
|
-
value: "g"
|
|
139
|
-
}, "g")));
|
|
140
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from "react"; // import { Select } from '@aloudata/aloudata-design';
|
|
2
|
-
|
|
3
|
-
import Select from '../../index';
|
|
4
|
-
var Option = Select.Option;
|
|
5
|
-
export default (function () {
|
|
6
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
className: 'ald-select-demo'
|
|
8
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
|
9
|
-
className: 'ald-select',
|
|
10
|
-
style: {
|
|
11
|
-
width: 200
|
|
12
|
-
},
|
|
13
|
-
size: 'large',
|
|
14
|
-
multiple: true,
|
|
15
|
-
placeholder: "large",
|
|
16
|
-
options: [{
|
|
17
|
-
label: 'Option 1',
|
|
18
|
-
value: 'Option 1'
|
|
19
|
-
}, {
|
|
20
|
-
label: 'Option 2',
|
|
21
|
-
value: 'Option 2'
|
|
22
|
-
}]
|
|
23
|
-
}), /*#__PURE__*/React.createElement(Select, {
|
|
24
|
-
className: 'ald-select',
|
|
25
|
-
style: {
|
|
26
|
-
width: 200
|
|
27
|
-
},
|
|
28
|
-
multiple: true,
|
|
29
|
-
label: 'Label:',
|
|
30
|
-
placeholder: "placeholder",
|
|
31
|
-
options: [{
|
|
32
|
-
label: 'Option 1',
|
|
33
|
-
value: 'Option 1'
|
|
34
|
-
}, {
|
|
35
|
-
label: 'Option 2',
|
|
36
|
-
value: 'Option 2'
|
|
37
|
-
}]
|
|
38
|
-
}), /*#__PURE__*/React.createElement(Select, {
|
|
39
|
-
className: 'ald-select',
|
|
40
|
-
style: {
|
|
41
|
-
width: 200
|
|
42
|
-
},
|
|
43
|
-
multiple: true,
|
|
44
|
-
size: "small",
|
|
45
|
-
label: 'Label:',
|
|
46
|
-
placeholder: "normal",
|
|
47
|
-
options: [{
|
|
48
|
-
label: 'Option 1',
|
|
49
|
-
value: 'Option 1'
|
|
50
|
-
}, {
|
|
51
|
-
label: 'Option 2',
|
|
52
|
-
value: 'Option 2'
|
|
53
|
-
}]
|
|
54
|
-
}));
|
|
55
|
-
});
|