@oceanbase/ui 0.2.10 → 0.2.11

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionButton, ActionLink } from './Item';
2
3
  declare const _default: {
3
4
  Group: ({ size, children, dropDownPlacement, shouldVisible, shouldDisabled, enableLoading, moreText, }: import("./Group").GroupProps) => import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { HighlightProps } from '.';
2
3
  import './index.less';
3
4
  export interface JsonViewProps extends HighlightProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="highlight.js" />
1
2
  import React from 'react';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import './index.less';
@@ -6,7 +6,6 @@ import { createFromIconfontCN } from '@oceanbase/icons';
6
6
  import React from 'react';
7
7
  import "./font/iconfont.css";
8
8
  var CustomIcon = createFromIconfontCN({
9
- // OceanBase 图标库地址: https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3786261
10
9
  // 在 iconfont.cn 上生成
11
10
  scriptUrl: '//at.alicdn.com/t/a/font_3786261_ifhixq9j5c.js'
12
11
  });
@@ -36,12 +36,12 @@ export default (function (props) {
36
36
  href = _list$i.href,
37
37
  key = _list$i.key,
38
38
  children = _list$i.children;
39
- if (openNewTab || href) return false;
40
39
  var linkList = isArray(link) ? link : [link];
41
40
  var match = linkList.some(function (lk) {
42
41
  return pathToRegexp(lk).test(pathname);
43
42
  });
44
43
  if (match) {
44
+ if (openNewTab || href) return false;
45
45
  setSelectedKeys([key]);
46
46
  setMenus(list);
47
47
  return;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Node, TreeNode } from '.';
2
3
  /** 根据 key 判断节点是否为叶子节点 */
3
4
  export declare const isLeaf: (node: TreeNode) => boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionButton, ActionLink } from './Item';
2
3
  declare const _default: {
3
4
  Group: ({ size, children, dropDownPlacement, shouldVisible, shouldDisabled, enableLoading, moreText, }: import("./Group").GroupProps) => import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { HighlightProps } from '.';
2
3
  import './index.less';
3
4
  export interface JsonViewProps extends HighlightProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="highlight.js" />
1
2
  import React from 'react';
2
3
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
4
  import './index.less';
@@ -36,7 +36,6 @@ var import_icons = require("@oceanbase/icons");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_iconfont = require("./font/iconfont.css");
38
38
  var CustomIcon = (0, import_icons.createFromIconfontCN)({
39
- // OceanBase 图标库地址: https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3786261
40
39
  // 在 iconfont.cn 上生成
41
40
  scriptUrl: "//at.alicdn.com/t/a/font_3786261_ifhixq9j5c.js"
42
41
  });
@@ -52,11 +52,11 @@ var NavMenu_default = (props) => {
52
52
  const { pathname } = location;
53
53
  for (let i = 0; i < list.length; i++) {
54
54
  const { link, openNewTab, href, key, children } = list[i];
55
- if (openNewTab || href)
56
- return false;
57
55
  const linkList = (0, import_lodash.isArray)(link) ? link : [link];
58
56
  const match = linkList.some((lk) => (0, import_path_to_regexp.pathToRegexp)(lk).test(pathname));
59
57
  if (match) {
58
+ if (openNewTab || href)
59
+ return false;
60
60
  setSelectedKeys([key]);
61
61
  setMenus(list);
62
62
  return;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Node, TreeNode } from '.';
2
3
  /** 根据 key 判断节点是否为叶子节点 */
3
4
  export declare const isLeaf: (node: TreeNode) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/ui",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "The UI library based on OceanBase Design",
5
5
  "keywords": [
6
6
  "OceanBase",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@ant-design/cssinjs": "^1.9.1",
39
39
  "@ant-design/pro-components": "^2.4.12",
40
- "@oceanbase/design": "^0.2.9",
40
+ "@oceanbase/design": "^0.2.10",
41
41
  "@oceanbase/icons": "^0.2.1",
42
42
  "@oceanbase/util": "^0.2.2",
43
43
  "ahooks": "^2.10.0",
@@ -67,5 +67,5 @@
67
67
  "react-dom": "^16.9.0",
68
68
  "react-router-dom": ">=5.2.0"
69
69
  },
70
- "gitHead": "50d5e0e6ecf64b44f17c1e5de8dd5d6d5be14eab"
70
+ "gitHead": "6c0f8edb7a7871d3c87582c4293c74a58dc17072"
71
71
  }