@antscorp/antsomi-ui 1.3.5-beta.531 → 1.3.5-beta.533

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.
@@ -54,6 +54,9 @@ export const ChildMenu = memo(props => {
54
54
  const [openKeys, setOpenKeys] = useState([]);
55
55
  const { pathname, hash } = window.location;
56
56
  const { isPushDifferentDomain, getPath, navigatePath } = useNavigatePath();
57
+ useDeepCompareEffect(() => {
58
+ setOpenKeys((items === null || items === void 0 ? void 0 : items.map(item => item.key)) || []);
59
+ }, [items]);
57
60
  useDeepCompareEffect(() => {
58
61
  switch (true) {
59
62
  case isCustomized: {
@@ -132,25 +135,31 @@ export const ChildMenu = memo(props => {
132
135
  env,
133
136
  ]);
134
137
  const onClick = e => {
135
- var _a;
136
138
  if (isRecommendation) {
137
- const permissionCode = (_a = recursiveFindItemByKey({
138
- activeKey: e.key,
139
- menuItems: items || [],
140
- })) === null || _a === void 0 ? void 0 : _a.permission_code;
141
- const permissionCodePath = (() => {
139
+ const [permissionCode, permissionCodePath] = (() => {
142
140
  var _a;
143
- const array = [];
144
- (_a = e.keyPath) === null || _a === void 0 ? void 0 : _a.forEach(item => {
141
+ if (e.key === 'WEB_PERSONALIZE') {
142
+ return ['WEB_PERSONALIZE-JOURNEY', ['WEB_PERSONALIZE-JOURNEY']];
143
+ }
144
+ const permissionCode = (_a = recursiveFindItemByKey({
145
+ activeKey: e.key,
146
+ menuItems: items || [],
147
+ })) === null || _a === void 0 ? void 0 : _a.permission_code;
148
+ const permissionCodePath = (() => {
145
149
  var _a;
146
- const permissionCode = (_a = recursiveFindItemByKey({
147
- activeKey: item,
148
- menuItems: items || [],
149
- })) === null || _a === void 0 ? void 0 : _a.permission_code;
150
- if (permissionCode)
151
- array.push(permissionCode);
152
- });
153
- return uniq(array);
150
+ const array = [];
151
+ (_a = e.keyPath) === null || _a === void 0 ? void 0 : _a.forEach(item => {
152
+ var _a;
153
+ const permissionCode = (_a = recursiveFindItemByKey({
154
+ activeKey: item,
155
+ menuItems: items || [],
156
+ })) === null || _a === void 0 ? void 0 : _a.permission_code;
157
+ if (permissionCode)
158
+ array.push(permissionCode);
159
+ });
160
+ return uniq(array);
161
+ })();
162
+ return [permissionCode, permissionCodePath];
154
163
  })();
155
164
  if (permissionCode)
156
165
  onMenuClick === null || onMenuClick === void 0 ? void 0 : onMenuClick(permissionCode, permissionCodePath);
@@ -34,6 +34,7 @@ export const HOME_MENU_ITEMS = {
34
34
  menu_item_name: 'Dashboard',
35
35
  menu_item_code: 'ownedDashboard',
36
36
  icon_name: 'icon-ants-dashboard',
37
+ // menu_item_path: `${HOME_ROUTE}/detail`,
37
38
  page_title: '_dashboard',
38
39
  },
39
40
  };
@@ -28,6 +28,8 @@ export const useLeftMenu = (props) => {
28
28
  return 'SQL_WORKSPACE';
29
29
  case 'DATASOURCES-APP_ANTALYSER':
30
30
  return 'DATASOURCES-SQL_WORKSPACE';
31
+ case 'WEB_PERSONALIZE-JOURNEY':
32
+ return 'WEB_PERSONALIZE';
31
33
  default:
32
34
  return activeKey;
33
35
  }
@@ -132,7 +132,7 @@ export const recursiveGetInitialFeatureMenuItem = (featureMenuItem) => (Object.a
132
132
  export const recursiveGetMenuItemByPermission = (featureMenuItem) => {
133
133
  var _a;
134
134
  return ({
135
- key: featureMenuItem.permission_code || 'null',
135
+ key: featureMenuItem.permission_code || featureMenuItem.menu_item_code || 'null',
136
136
  label: featureMenuItem.menu_item_name,
137
137
  icon: featureMenuItem.icon_name,
138
138
  logo_url: featureMenuItem.logo_url,
@@ -142,11 +142,12 @@ export const Layout = memo(props => {
142
142
  return (React.createElement(LayoutWrapper, { showLeftMenu: !!showLeftMenu },
143
143
  React.createElement(Helmet, null,
144
144
  React.createElement("meta", { charSet: "utf-8" }),
145
- React.createElement("title", null, (header === null || header === void 0 ? void 0 : header.browserTitle) || (header === null || header === void 0 ? void 0 : header.pageTitle)
146
- ? isString(header === null || header === void 0 ? void 0 : header.pageTitle)
147
- ? header === null || header === void 0 ? void 0 : header.pageTitle
148
- : ''
149
- : activePageTitle)),
145
+ React.createElement("title", null, (header === null || header === void 0 ? void 0 : header.browserTitle) ||
146
+ ((header === null || header === void 0 ? void 0 : header.pageTitle)
147
+ ? isString(header === null || header === void 0 ? void 0 : header.pageTitle)
148
+ ? header === null || header === void 0 ? void 0 : header.pageTitle
149
+ : ''
150
+ : activePageTitle))),
150
151
  React.createElement(HeaderV2, Object.assign({}, mergeHeaderProps, { showLogo: !showLeftMenu })),
151
152
  React.createElement(Flex, { className: "layout-body" },
152
153
  showLeftMenu && (React.createElement(LeftMenu, Object.assign({ className: `layout-body__menu ${leftMenuClassName}` }, mergeLeftMenuProps, { appConfig: leftMenuAppConfig, onActiveMenuCodeChange: onActiveMenuCodeChange }))),
@@ -31,6 +31,8 @@ export const OldLeftMenu = memo(props => {
31
31
  return 'DATASOURCES-APP_ANTALYSER';
32
32
  case 'EXPLORERS':
33
33
  return 'ANALYSIS';
34
+ case 'WEB_PERSONALIZE-JOURNEY':
35
+ return 'JOURNEY';
34
36
  default:
35
37
  return activeKey;
36
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.531",
3
+ "version": "1.3.5-beta.533",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",