@antscorp/antsomi-ui 1.3.5-beta.610 → 1.3.5-beta.611

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.
@@ -4,7 +4,6 @@ import React, { memo, useState } from 'react';
4
4
  import Icon from '@antscorp/icons';
5
5
  import { isEmpty, isNil, uniq } from 'lodash';
6
6
  import classNames from 'classnames';
7
- import { Link } from 'react-router-dom';
8
7
  // Components
9
8
  import { Dropdown, Menu } from 'antd';
10
9
  import { MenuItemImage } from './components';
@@ -193,7 +192,9 @@ export const ChildMenu = memo(props => {
193
192
  style: styles.dropdownMenu,
194
193
  }, trigger: ['click'] },
195
194
  React.createElement(Icon, { className: "child-menu-item-icon", type: "icon-ants-three-dot-vertical", style: styles.dotIcon })))),
196
- !(children === null || children === void 0 ? void 0 : children.length) && type === 'recommendation' && !!menu_item_path && (React.createElement(Link, { to: getPath(menu_item_path), className: "icon-link", target: "_blank", onClick: e => e.stopPropagation() },
195
+ !(children === null || children === void 0 ? void 0 : children.length) && type === 'recommendation' && !!menu_item_path && (React.createElement("div", { className: "icon-link", onClick: () => {
196
+ navigatePath(menu_item_domain, menu_item_path, true);
197
+ } },
197
198
  React.createElement(Icon, { type: "icon-ants-open-in-new-window" })))));
198
199
  const renderIcon = () => {
199
200
  var _a;
@@ -174,7 +174,7 @@ export const handleActiveRecommendationItem = (args) => {
174
174
  }
175
175
  else {
176
176
  switch (customActiveCurrentKey) {
177
- case 'DATASOURCES-SQL_WORKSPACE':
177
+ case 'DATASOURCES-L_REPORTS':
178
178
  menuActiveKey = 'DATA_SOURCE';
179
179
  break;
180
180
  case 'DATASOURCES-DATAFLOWS':
@@ -29,7 +29,7 @@ export const useLeftMenu = (props) => {
29
29
  case 'ANALYSIS':
30
30
  return 'SQL_WORKSPACE';
31
31
  case 'DATASOURCES-APP_ANTALYSER':
32
- return 'DATASOURCES-SQL_WORKSPACE';
32
+ return 'DATASOURCES-L_REPORTS';
33
33
  case 'WEB_PERSONALIZE-JOURNEY':
34
34
  return 'WEB_PERSONALIZE';
35
35
  default:
@@ -1,5 +1,5 @@
1
1
  export declare const useNavigatePath: () => {
2
2
  isPushDifferentDomain: (domain: string | null, path: string | null) => boolean;
3
3
  getPath: (path: string | null, itemKey?: string) => string;
4
- navigatePath: (domain: string | null, path: string | null) => void;
4
+ navigatePath: (domain: string | null, path: string | null, newTab?: boolean) => void;
5
5
  };
@@ -49,9 +49,14 @@ export const useNavigatePath = () => {
49
49
  }
50
50
  return getGeneratePath(`${path !== null && path !== void 0 ? path : ''}${searchParams}`, auth);
51
51
  }, [auth, searchParams]);
52
- const navigatePath = useCallback((domain, path) => {
52
+ const navigatePath = useCallback((domain, path, newTab = false) => {
53
53
  const newDomain = isNil(domain) || env === ENV.DEV ? '' : domain;
54
- window.location.assign(getGeneratePath(`${newDomain}${path}${searchParams}`, auth));
54
+ const newPath = getGeneratePath(`${newDomain}${path}${searchParams}`, auth);
55
+ if (newTab) {
56
+ window.open(newPath, '_blank');
57
+ return;
58
+ }
59
+ window.location.assign(newPath);
55
60
  }, [auth, env, searchParams]);
56
61
  return { isPushDifferentDomain, getPath, navigatePath };
57
62
  };
@@ -27,7 +27,7 @@ export const OldLeftMenu = memo(props => {
27
27
  case 'BATCH_STREAMING':
28
28
  case 'REALTIME_STREAMING':
29
29
  return 'DATAFLOWS';
30
- case 'DATASOURCES-SQL_WORKSPACE':
30
+ case 'DATASOURCES-L_REPORTS':
31
31
  return 'DATASOURCES-APP_ANTALYSER';
32
32
  case 'EXPLORERS':
33
33
  return 'ANALYSIS';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.610",
3
+ "version": "1.3.5-beta.611",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",