@antscorp/antsomi-ui 1.3.5-beta.610 → 1.3.5-beta.612
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/components/organism/AccountSharing/AccountSharing.js +6 -1
- package/es/components/organism/LeftMenu/components/common/ChildMenu/index.js +3 -2
- package/es/components/organism/LeftMenu/components/common/ChildMenu/utils.js +1 -1
- package/es/components/organism/LeftMenu/hooks/useLeftMenu.js +1 -1
- package/es/components/organism/LeftMenu/hooks/useNavigatePath.d.ts +1 -1
- package/es/components/organism/LeftMenu/hooks/useNavigatePath.js +7 -2
- package/es/components/template/Layout/components/RecommendationWorkspace/components/MenuMapping/components/OldLeftMenu/index.js +1 -1
- package/package.json +1 -1
|
@@ -165,7 +165,12 @@ export const AccountSharing = props => {
|
|
|
165
165
|
}
|
|
166
166
|
const arrMenus = buildListAppMenus(data, userId);
|
|
167
167
|
if (!arrMenus.some(url => convertedHomePage.includes(url))) {
|
|
168
|
-
|
|
168
|
+
// Redirect to recommendation
|
|
169
|
+
if (env !== ENV.DEV) {
|
|
170
|
+
window.location.assign(`${CDP_ROUTE[env || 'development']}/gen2/${networkId}/dashboard/recommendation`);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
// return redirectFirstMenu(data, userId);
|
|
169
174
|
}
|
|
170
175
|
window.location.href = convertedHomePage;
|
|
171
176
|
};
|
|
@@ -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(
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
30
|
+
case 'DATASOURCES-L_REPORTS':
|
|
31
31
|
return 'DATASOURCES-APP_ANTALYSER';
|
|
32
32
|
case 'EXPLORERS':
|
|
33
33
|
return 'ANALYSIS';
|