@aloudata/aloudata-design 0.2.0-beta.1 → 0.2.0-beta.10

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.
Files changed (301) hide show
  1. package/es/Button/index.d.ts +0 -1
  2. package/es/Button/index.js +0 -1
  3. package/es/Button/style/index.less +23 -13
  4. package/es/Dropdown/Button.d.ts +0 -1
  5. package/es/Dropdown/Button.js +0 -1
  6. package/es/Dropdown/index.d.ts +1 -1
  7. package/es/Dropdown/index.js +0 -1
  8. package/es/Empty/index.d.ts +0 -1
  9. package/es/Empty/index.js +0 -1
  10. package/es/Empty/style/index.less +2 -1
  11. package/es/Icon/iconfont/demo_index.html +49 -3
  12. package/es/Icon/iconfont/iconfont.css +11 -3
  13. package/es/Icon/iconfont/iconfont.js +5 -5
  14. package/es/Icon/iconfont/iconfont.json +14 -0
  15. package/es/Icon/iconfont/iconfont.ttf +0 -0
  16. package/es/Icon/iconfont/iconfont.woff +0 -0
  17. package/es/Icon/iconfont/iconfont.woff2 +0 -0
  18. package/es/Icon/index.js +3 -1
  19. package/es/Icon/index.less +2 -2
  20. package/es/Input/components/Group/index.d.ts +3 -2
  21. package/es/Input/components/Input/index.d.ts +61 -0
  22. package/es/Input/components/Input/index.js +37 -0
  23. package/es/Input/components/Password/index.d.ts +5 -3
  24. package/es/Input/components/Password/index.js +5 -4
  25. package/es/Input/components/TextArea/index.d.ts +9 -4
  26. package/es/Input/components/TextArea/index.js +16 -6
  27. package/es/Input/index.d.ts +14 -63
  28. package/es/Input/index.js +4 -41
  29. package/es/Input/style/index.less +5 -3
  30. package/es/Menu/Divider.d.ts +1 -1
  31. package/es/Menu/Divider.js +0 -1
  32. package/es/Menu/MenuItem.d.ts +7 -1
  33. package/es/Menu/MenuItem.js +0 -1
  34. package/es/Menu/SubMenu.d.ts +0 -1
  35. package/es/Menu/SubMenu.js +0 -1
  36. package/es/Menu/index.d.ts +1 -1
  37. package/es/Menu/index.js +0 -1
  38. package/es/Navigator/index.d.ts +0 -1
  39. package/es/Navigator/index.js +0 -1
  40. package/es/Navigator/style/index.less +13 -9
  41. package/es/Select/index.d.ts +0 -1
  42. package/es/Select/index.js +0 -1
  43. package/es/Table/index.d.ts +1 -2
  44. package/es/Table/index.js +205 -56
  45. package/es/Table/interface.d.ts +28 -6
  46. package/es/Table/react-table-config.d.ts +122 -0
  47. package/es/Table/style/index.less +66 -26
  48. package/es/Tabs/index.d.ts +1 -1
  49. package/es/Tabs/index.js +0 -1
  50. package/es/Tooltip/index.d.ts +0 -1
  51. package/es/Tooltip/index.js +0 -1
  52. package/es/index.d.ts +10 -0
  53. package/es/style/themes/default/index.less +1 -1
  54. package/lib/Button/index.d.ts +0 -1
  55. package/lib/Button/index.js +0 -2
  56. package/lib/Button/style/index.less +23 -13
  57. package/lib/Dropdown/Button.d.ts +0 -1
  58. package/lib/Dropdown/Button.js +0 -2
  59. package/lib/Dropdown/index.d.ts +1 -1
  60. package/lib/Dropdown/index.js +0 -2
  61. package/lib/Empty/index.d.ts +0 -1
  62. package/lib/Empty/index.js +0 -2
  63. package/lib/Empty/style/index.less +2 -1
  64. package/lib/Icon/iconfont/demo_index.html +49 -3
  65. package/lib/Icon/iconfont/iconfont.css +11 -3
  66. package/lib/Icon/iconfont/iconfont.js +5 -5
  67. package/lib/Icon/iconfont/iconfont.json +14 -0
  68. package/lib/Icon/iconfont/iconfont.ttf +0 -0
  69. package/lib/Icon/iconfont/iconfont.woff +0 -0
  70. package/lib/Icon/iconfont/iconfont.woff2 +0 -0
  71. package/lib/Icon/index.js +5 -3
  72. package/lib/Icon/index.less +2 -2
  73. package/lib/Input/components/Group/index.d.ts +3 -2
  74. package/lib/Input/components/Input/index.d.ts +61 -0
  75. package/lib/Input/components/Input/index.js +50 -0
  76. package/lib/Input/components/Password/index.d.ts +5 -3
  77. package/lib/Input/components/Password/index.js +10 -8
  78. package/lib/Input/components/TextArea/index.d.ts +9 -4
  79. package/lib/Input/components/TextArea/index.js +18 -7
  80. package/lib/Input/index.d.ts +14 -63
  81. package/lib/Input/index.js +4 -44
  82. package/lib/Input/style/index.less +5 -3
  83. package/lib/Menu/Divider.d.ts +1 -1
  84. package/lib/Menu/Divider.js +0 -2
  85. package/lib/Menu/MenuItem.d.ts +7 -1
  86. package/lib/Menu/MenuItem.js +0 -2
  87. package/lib/Menu/SubMenu.d.ts +0 -1
  88. package/lib/Menu/SubMenu.js +0 -2
  89. package/lib/Menu/index.d.ts +1 -1
  90. package/lib/Menu/index.js +0 -2
  91. package/lib/Navigator/index.d.ts +0 -1
  92. package/lib/Navigator/index.js +0 -2
  93. package/lib/Navigator/style/index.less +13 -9
  94. package/lib/Select/index.d.ts +0 -1
  95. package/lib/Select/index.js +0 -2
  96. package/lib/Table/index.d.ts +1 -2
  97. package/lib/Table/index.js +212 -62
  98. package/lib/Table/interface.d.ts +28 -6
  99. package/lib/Table/react-table-config.d.ts +122 -0
  100. package/lib/Table/style/index.less +66 -26
  101. package/lib/Tabs/index.d.ts +1 -1
  102. package/lib/Tabs/index.js +0 -2
  103. package/lib/Tooltip/index.d.ts +0 -1
  104. package/lib/Tooltip/index.js +0 -2
  105. package/lib/index.d.ts +10 -0
  106. package/lib/style/themes/default/index.less +1 -1
  107. package/package.json +11 -2
  108. package/es/Button/demo/Icon/index.d.ts +0 -3
  109. package/es/Button/demo/Icon/index.js +0 -67
  110. package/es/Button/demo/Icon/index.less +0 -6
  111. package/es/Button/demo/basic/index.d.ts +0 -4
  112. package/es/Button/demo/basic/index.js +0 -57
  113. package/es/Button/demo/basic/index.less +0 -6
  114. package/es/Button/demo/disable/index.d.ts +0 -3
  115. package/es/Button/demo/disable/index.js +0 -23
  116. package/es/Button/demo/disable/index.less +0 -0
  117. package/es/Button/demo/href/index.d.ts +0 -2
  118. package/es/Button/demo/href/index.js +0 -17
  119. package/es/Button/demo/loading/index.d.ts +0 -3
  120. package/es/Button/demo/loading/index.js +0 -37
  121. package/es/Button/demo/loading/index.less +0 -6
  122. package/es/Dropdown/demo/basic/index.d.ts +0 -4
  123. package/es/Dropdown/demo/basic/index.js +0 -18
  124. package/es/Dropdown/demo/button/index.d.ts +0 -3
  125. package/es/Dropdown/demo/button/index.js +0 -159
  126. package/es/Dropdown/demo/button/index.less +0 -9
  127. package/es/Dropdown/demo/placement/index.d.ts +0 -2
  128. package/es/Dropdown/demo/placement/index.js +0 -40
  129. package/es/Dropdown/demo/subMenu/index.d.ts +0 -2
  130. package/es/Dropdown/demo/subMenu/index.js +0 -42
  131. package/es/Dropdown/demo/trigger/index.d.ts +0 -2
  132. package/es/Dropdown/demo/trigger/index.js +0 -17
  133. package/es/Input/demo/allowClear/index.d.ts +0 -3
  134. package/es/Input/demo/allowClear/index.js +0 -11
  135. package/es/Input/demo/allowClear/index.less +0 -0
  136. package/es/Input/demo/basic/index.d.ts +0 -4
  137. package/es/Input/demo/basic/index.js +0 -65
  138. package/es/Input/demo/basic/index.less +0 -6
  139. package/es/Input/demo/gourp/index.d.ts +0 -2
  140. package/es/Input/demo/gourp/index.js +0 -67
  141. package/es/Input/demo/password/index.d.ts +0 -3
  142. package/es/Input/demo/password/index.js +0 -21
  143. package/es/Input/demo/password/index.less +0 -0
  144. package/es/Input/demo/prefix/index.d.ts +0 -3
  145. package/es/Input/demo/prefix/index.js +0 -17
  146. package/es/Input/demo/prefix/index.less +0 -0
  147. package/es/Input/demo/showCount/index.d.ts +0 -3
  148. package/es/Input/demo/showCount/index.js +0 -17
  149. package/es/Input/demo/showCount/index.less +0 -0
  150. package/es/Input/demo/textArea/autoSize.d.ts +0 -2
  151. package/es/Input/demo/textArea/autoSize.js +0 -50
  152. package/es/Navigator/demo/basic/index.d.ts +0 -4
  153. package/es/Navigator/demo/basic/index.js +0 -45
  154. package/es/Navigator/demo/basic/index.less +0 -3
  155. package/es/Navigator/demo/example/index.d.ts +0 -4
  156. package/es/Navigator/demo/example/index.js +0 -153
  157. package/es/Navigator/demo/example/index.less +0 -10
  158. package/es/Navigator/demo/logo.png +0 -0
  159. package/es/Navigator/demo/menuWithFooter/index.d.ts +0 -4
  160. package/es/Navigator/demo/menuWithFooter/index.js +0 -73
  161. package/es/Navigator/demo/menuWithFooter/index.less +0 -3
  162. package/es/Navigator/demo/subMenu/index.d.ts +0 -4
  163. package/es/Navigator/demo/subMenu/index.js +0 -71
  164. package/es/Navigator/demo/subMenu/index.less +0 -3
  165. package/es/Select/demo/disabled/index.d.ts +0 -2
  166. package/es/Select/demo/disabled/index.js +0 -50
  167. package/es/Select/demo/multiple/index.d.ts +0 -2
  168. package/es/Select/demo/multiple/index.js +0 -140
  169. package/es/Select/demo/options/index.d.ts +0 -2
  170. package/es/Select/demo/options/index.js +0 -55
  171. package/es/Select/demo/single/index.d.ts +0 -3
  172. package/es/Select/demo/single/index.js +0 -89
  173. package/es/Select/demo/single/index.less +0 -5
  174. package/es/Table/demo/basic/createData.d.ts +0 -9
  175. package/es/Table/demo/basic/createData.js +0 -18
  176. package/es/Table/demo/basic/index.d.ts +0 -2
  177. package/es/Table/demo/basic/index.js +0 -64
  178. package/es/Table/demo/editCell/index.d.ts +0 -2
  179. package/es/Table/demo/editCell/index.js +0 -39
  180. package/es/Table/demo/renderHeaderRight/index.d.ts +0 -2
  181. package/es/Table/demo/renderHeaderRight/index.js +0 -37
  182. package/es/Table/demo/rowSelect/index.d.ts +0 -2
  183. package/es/Table/demo/rowSelect/index.js +0 -40
  184. package/es/Table/demo/virtualList/index.d.ts +0 -2
  185. package/es/Table/demo/virtualList/index.js +0 -88
  186. package/es/Tabs/demo/adaptHeight/index.d.ts +0 -3
  187. package/es/Tabs/demo/adaptHeight/index.js +0 -19
  188. package/es/Tabs/demo/adaptHeight/index.less +0 -3
  189. package/es/Tabs/demo/basic/index.d.ts +0 -4
  190. package/es/Tabs/demo/basic/index.js +0 -44
  191. package/es/Tabs/demo/basic/index.less +0 -5
  192. package/es/Tabs/demo/horizontalScroll/index.d.ts +0 -3
  193. package/es/Tabs/demo/horizontalScroll/index.js +0 -30
  194. package/es/Tabs/demo/horizontalScroll/index.less +0 -3
  195. package/es/Tooltip/demo/basic/index.d.ts +0 -2
  196. package/es/Tooltip/demo/basic/index.js +0 -7
  197. package/es/Tooltip/demo/overflow/index.d.ts +0 -2
  198. package/es/Tooltip/demo/overflow/index.js +0 -7
  199. package/es/Tooltip/demo/placement/index.d.ts +0 -6
  200. package/es/Tooltip/demo/placement/index.js +0 -70
  201. package/es/Tooltip/demo/placement/index.less +0 -7
  202. package/es/Tooltip/demo/trigger/index.d.ts +0 -3
  203. package/es/Tooltip/demo/trigger/index.js +0 -20
  204. package/es/Tooltip/demo/trigger/index.less +0 -5
  205. package/lib/Button/demo/Icon/index.d.ts +0 -3
  206. package/lib/Button/demo/Icon/index.js +0 -82
  207. package/lib/Button/demo/Icon/index.less +0 -6
  208. package/lib/Button/demo/basic/index.d.ts +0 -4
  209. package/lib/Button/demo/basic/index.js +0 -73
  210. package/lib/Button/demo/basic/index.less +0 -6
  211. package/lib/Button/demo/disable/index.d.ts +0 -3
  212. package/lib/Button/demo/disable/index.js +0 -37
  213. package/lib/Button/demo/disable/index.less +0 -0
  214. package/lib/Button/demo/href/index.d.ts +0 -2
  215. package/lib/Button/demo/href/index.js +0 -30
  216. package/lib/Button/demo/loading/index.d.ts +0 -3
  217. package/lib/Button/demo/loading/index.js +0 -51
  218. package/lib/Button/demo/loading/index.less +0 -6
  219. package/lib/Dropdown/demo/basic/index.d.ts +0 -4
  220. package/lib/Dropdown/demo/basic/index.js +0 -35
  221. package/lib/Dropdown/demo/button/index.d.ts +0 -3
  222. package/lib/Dropdown/demo/button/index.js +0 -182
  223. package/lib/Dropdown/demo/button/index.less +0 -9
  224. package/lib/Dropdown/demo/placement/index.d.ts +0 -2
  225. package/lib/Dropdown/demo/placement/index.js +0 -56
  226. package/lib/Dropdown/demo/subMenu/index.d.ts +0 -2
  227. package/lib/Dropdown/demo/subMenu/index.js +0 -59
  228. package/lib/Dropdown/demo/trigger/index.d.ts +0 -2
  229. package/lib/Dropdown/demo/trigger/index.js +0 -32
  230. package/lib/Input/demo/allowClear/index.d.ts +0 -3
  231. package/lib/Input/demo/allowClear/index.js +0 -25
  232. package/lib/Input/demo/allowClear/index.less +0 -0
  233. package/lib/Input/demo/basic/index.d.ts +0 -4
  234. package/lib/Input/demo/basic/index.js +0 -80
  235. package/lib/Input/demo/basic/index.less +0 -6
  236. package/lib/Input/demo/gourp/index.d.ts +0 -2
  237. package/lib/Input/demo/gourp/index.js +0 -81
  238. package/lib/Input/demo/password/index.d.ts +0 -3
  239. package/lib/Input/demo/password/index.js +0 -35
  240. package/lib/Input/demo/password/index.less +0 -0
  241. package/lib/Input/demo/prefix/index.d.ts +0 -3
  242. package/lib/Input/demo/prefix/index.js +0 -32
  243. package/lib/Input/demo/prefix/index.less +0 -0
  244. package/lib/Input/demo/showCount/index.d.ts +0 -3
  245. package/lib/Input/demo/showCount/index.js +0 -31
  246. package/lib/Input/demo/showCount/index.less +0 -0
  247. package/lib/Input/demo/textArea/autoSize.d.ts +0 -2
  248. package/lib/Input/demo/textArea/autoSize.js +0 -63
  249. package/lib/Navigator/demo/basic/index.d.ts +0 -4
  250. package/lib/Navigator/demo/basic/index.js +0 -62
  251. package/lib/Navigator/demo/basic/index.less +0 -3
  252. package/lib/Navigator/demo/example/index.d.ts +0 -4
  253. package/lib/Navigator/demo/example/index.js +0 -179
  254. package/lib/Navigator/demo/example/index.less +0 -10
  255. package/lib/Navigator/demo/logo.png +0 -0
  256. package/lib/Navigator/demo/menuWithFooter/index.d.ts +0 -4
  257. package/lib/Navigator/demo/menuWithFooter/index.js +0 -92
  258. package/lib/Navigator/demo/menuWithFooter/index.less +0 -3
  259. package/lib/Navigator/demo/subMenu/index.d.ts +0 -4
  260. package/lib/Navigator/demo/subMenu/index.js +0 -88
  261. package/lib/Navigator/demo/subMenu/index.less +0 -3
  262. package/lib/Select/demo/disabled/index.d.ts +0 -2
  263. package/lib/Select/demo/disabled/index.js +0 -64
  264. package/lib/Select/demo/multiple/index.d.ts +0 -2
  265. package/lib/Select/demo/multiple/index.js +0 -154
  266. package/lib/Select/demo/options/index.d.ts +0 -2
  267. package/lib/Select/demo/options/index.js +0 -69
  268. package/lib/Select/demo/single/index.d.ts +0 -3
  269. package/lib/Select/demo/single/index.js +0 -103
  270. package/lib/Select/demo/single/index.less +0 -5
  271. package/lib/Table/demo/basic/createData.d.ts +0 -9
  272. package/lib/Table/demo/basic/createData.js +0 -23
  273. package/lib/Table/demo/basic/index.d.ts +0 -2
  274. package/lib/Table/demo/basic/index.js +0 -80
  275. package/lib/Table/demo/editCell/index.d.ts +0 -2
  276. package/lib/Table/demo/editCell/index.js +0 -54
  277. package/lib/Table/demo/renderHeaderRight/index.d.ts +0 -2
  278. package/lib/Table/demo/renderHeaderRight/index.js +0 -52
  279. package/lib/Table/demo/rowSelect/index.d.ts +0 -2
  280. package/lib/Table/demo/rowSelect/index.js +0 -55
  281. package/lib/Table/demo/virtualList/index.d.ts +0 -2
  282. package/lib/Table/demo/virtualList/index.js +0 -103
  283. package/lib/Tabs/demo/adaptHeight/index.d.ts +0 -3
  284. package/lib/Tabs/demo/adaptHeight/index.js +0 -34
  285. package/lib/Tabs/demo/adaptHeight/index.less +0 -3
  286. package/lib/Tabs/demo/basic/index.d.ts +0 -4
  287. package/lib/Tabs/demo/basic/index.js +0 -67
  288. package/lib/Tabs/demo/basic/index.less +0 -5
  289. package/lib/Tabs/demo/horizontalScroll/index.d.ts +0 -3
  290. package/lib/Tabs/demo/horizontalScroll/index.js +0 -45
  291. package/lib/Tabs/demo/horizontalScroll/index.less +0 -3
  292. package/lib/Tooltip/demo/basic/index.d.ts +0 -2
  293. package/lib/Tooltip/demo/basic/index.js +0 -20
  294. package/lib/Tooltip/demo/overflow/index.d.ts +0 -2
  295. package/lib/Tooltip/demo/overflow/index.js +0 -20
  296. package/lib/Tooltip/demo/placement/index.d.ts +0 -6
  297. package/lib/Tooltip/demo/placement/index.js +0 -86
  298. package/lib/Tooltip/demo/placement/index.less +0 -7
  299. package/lib/Tooltip/demo/trigger/index.d.ts +0 -3
  300. package/lib/Tooltip/demo/trigger/index.js +0 -34
  301. package/lib/Tooltip/demo/trigger/index.less +0 -5
@@ -1,4 +0,0 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- declare const _default: () => JSX.Element;
4
- export default _default;
@@ -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
- }
@@ -1,10 +0,0 @@
1
- .ald-nav-demo-example {
2
- border: 1px solid #ccc;
3
- width: 800px;
4
- height: 600px;
5
- display: flex;
6
-
7
- .ald-nav-content {
8
- padding: 24px;
9
- }
10
- }
Binary file
@@ -1,4 +0,0 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- declare const _default: () => JSX.Element;
4
- export default _default;
@@ -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,3 +0,0 @@
1
- .ald-nav-demo {
2
- height: 600px;
3
- }
@@ -1,4 +0,0 @@
1
- import '../../style/index.less';
2
- import './index.less';
3
- declare const _default: () => JSX.Element;
4
- export default _default;
@@ -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,3 +0,0 @@
1
- .ald-nav-demo {
2
- height: 600px;
3
- }
@@ -1,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;
@@ -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,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;
@@ -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,2 +0,0 @@
1
- declare const _default: () => JSX.Element;
2
- export default _default;
@@ -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
- });
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const _default: () => JSX.Element;
3
- export default _default;