@arcblock/ux 2.9.53 → 2.9.54

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.
@@ -7,7 +7,7 @@ import { styled } from '../../Theme';
7
7
  import { NavLink } from './external-link';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- function renderGroup(item) {
10
+ function renderGroup(item, index) {
11
11
  return /*#__PURE__*/_jsxs("li", {
12
12
  className: "layout-sidebar-group",
13
13
  children: [/*#__PURE__*/_jsx("span", {
@@ -16,11 +16,11 @@ function renderGroup(item) {
16
16
  }), /*#__PURE__*/_jsx("ul", {
17
17
  children: item.children.map(renderItem)
18
18
  })]
19
- }, `group-${item.title}`);
19
+ }, `group-${item.title}-${index}`);
20
20
  }
21
- function renderItem(item) {
21
+ function renderItem(item, index) {
22
22
  if (item.children?.length) {
23
- return renderGroup(item);
23
+ return renderGroup(item, index);
24
24
  }
25
25
  const {
26
26
  url,
@@ -50,7 +50,7 @@ function renderItem(item) {
50
50
  children: title
51
51
  })]
52
52
  })
53
- }, url);
53
+ }, `${url}-${index}`);
54
54
  }
55
55
  function Sidebar({
56
56
  links,
@@ -23,7 +23,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
23
23
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
24
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
- function renderGroup(item) {
26
+ function renderGroup(item, index) {
27
27
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
28
28
  className: "layout-sidebar-group",
29
29
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
@@ -32,12 +32,12 @@ function renderGroup(item) {
32
32
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
33
33
  children: item.children.map(renderItem)
34
34
  })]
35
- }, "group-".concat(item.title));
35
+ }, "group-".concat(item.title, "-").concat(index));
36
36
  }
37
- function renderItem(item) {
37
+ function renderItem(item, index) {
38
38
  var _item$children;
39
39
  if ((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
40
- return renderGroup(item);
40
+ return renderGroup(item, index);
41
41
  }
42
42
  const {
43
43
  url,
@@ -70,7 +70,7 @@ function renderItem(item) {
70
70
  children: title
71
71
  })]
72
72
  })
73
- }, url);
73
+ }, "".concat(url, "-").concat(index));
74
74
  }
75
75
  function Sidebar(_ref2) {
76
76
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.9.53",
3
+ "version": "2.9.54",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -358,12 +358,12 @@
358
358
  "@mui/material": "^5.15.0",
359
359
  "react": ">=18.2.0"
360
360
  },
361
- "gitHead": "bf54e5b6fe510e2340ae87d1561d38d04dc25363",
361
+ "gitHead": "497c6bb83ad04937b3ba6a182e79383889a4562e",
362
362
  "dependencies": {
363
363
  "@arcblock/did-motif": "^1.1.13",
364
- "@arcblock/icons": "^2.9.53",
365
- "@arcblock/nft-display": "^2.9.53",
366
- "@arcblock/react-hooks": "^2.9.53",
364
+ "@arcblock/icons": "^2.9.54",
365
+ "@arcblock/nft-display": "^2.9.54",
366
+ "@arcblock/react-hooks": "^2.9.54",
367
367
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
368
368
  "@emotion/react": "^11.10.4",
369
369
  "@emotion/styled": "^11.10.4",
@@ -6,23 +6,23 @@ import clsx from 'clsx';
6
6
  import { styled } from '../../Theme';
7
7
  import { NavLink } from './external-link';
8
8
 
9
- function renderGroup(item) {
9
+ function renderGroup(item, index) {
10
10
  return (
11
- <li key={`group-${item.title}`} className="layout-sidebar-group">
11
+ <li key={`group-${item.title}-${index}`} className="layout-sidebar-group">
12
12
  <span className="layout-sidebar-group-title">{item.title}</span>
13
13
  <ul>{item.children.map(renderItem)}</ul>
14
14
  </li>
15
15
  );
16
16
  }
17
17
 
18
- function renderItem(item) {
18
+ function renderItem(item, index) {
19
19
  if (item.children?.length) {
20
- return renderGroup(item);
20
+ return renderGroup(item, index);
21
21
  }
22
22
  const { url, icon, title, showBadge, external, active } = item;
23
23
  // external = true 时 link active 状态由传入 links 的调用方决定 (适用于 blocklet ui dashboard 的情况)
24
24
  return (
25
- <li key={url} className="layout-sidebar-item">
25
+ <li key={`${url}-${index}`} className="layout-sidebar-item">
26
26
  <NavLink
27
27
  external={external}
28
28
  to={url}