@antscorp/antsomi-ui 1.3.5-beta.519 → 1.3.5-beta.521

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.
@@ -391,11 +391,11 @@ export const AccountSharing = props => {
391
391
  React.createElement("div", { className: "info-account" }, infoAccount ? (React.createElement(React.Fragment, null,
392
392
  React.createElement("div", { className: "current-account-avatar" },
393
393
  React.createElement("img", { src: infoAccount.avatar, alt: "" }),
394
- React.createElement("div", { className: "edit-profile" },
395
- React.createElement(Icon, { type: "icon-ants-edit-2", style: { color: '#aaa' }, onClick: () => {
396
- setOpen(p => !p);
397
- setOpenAccountProfile(true);
398
- } }))),
394
+ React.createElement("div", { className: "edit-profile", onClick: () => {
395
+ setOpen(p => !p);
396
+ setOpenAccountProfile(true);
397
+ } },
398
+ React.createElement(Icon, { type: "icon-ants-edit-2", style: { color: '#aaa' } }))),
399
399
  React.createElement("p", { style: { fontWeight: 600 } }, infoAccount.full_name),
400
400
  React.createElement("p", { style: { color: '#aaa', marginTop: 2 } }, infoAccount.email))) : (React.createElement("div", null,
401
401
  translateLang('KEY_LOADING'),
@@ -182,11 +182,7 @@ export const ChildMenu = memo(props => {
182
182
  return !!icon || !!logo_url ? (React.createElement(Flex, { style: { flexShrink: 0 }, align: "center" }, !isNil(icon) ? (React.createElement(IconWrapper, null,
183
183
  React.createElement(Icon, { type: icon }))) : !isNil(logo_url) ? (React.createElement(MenuItemImage, { imageUrl: logo_url, fallbackIcon: (_a = args === null || args === void 0 ? void 0 : args.parent) === null || _a === void 0 ? void 0 : _a.icon, className: classNames({ isActive: currentActiveItem === key }) })) : null)) : null;
184
184
  };
185
- const renderTitle = () => !menu_item_path || isRecommendation ? (renderLabel()) : isPushDifferentDomain(menu_item_domain, menu_item_path) ? (React.createElement("div", { onClick: () => navigatePath(menu_item_domain, menu_item_path), className: "menu-link" },
186
- "1 ",
187
- renderLabel())) : (React.createElement(Link, { to: getPath(menu_item_path, key), className: "menu-link", onClick: e => e.stopPropagation() },
188
- "2 ",
189
- renderLabel()));
185
+ const renderTitle = () => !menu_item_path || isRecommendation ? (renderLabel()) : isPushDifferentDomain(menu_item_domain, menu_item_path) ? (React.createElement("div", { onClick: () => navigatePath(menu_item_domain, menu_item_path), className: "menu-link" }, renderLabel())) : (React.createElement(Link, { to: getPath(menu_item_path, key), className: "menu-link", onClick: e => e.stopPropagation() }, renderLabel()));
190
186
  return {
191
187
  key,
192
188
  label: (React.createElement(Flex, { gap: 10, align: "center", justify: "space-between", style: { height: '100%' } },
@@ -16,7 +16,6 @@ import { usePermission } from './usePermission';
16
16
  export const useNavigatePath = () => {
17
17
  const appConfig = useLeftMenuContext(store => store.appConfig);
18
18
  const { auth, env } = appConfig || {};
19
- console.log('🚀 ~ useNavigatePath ~ env:', env);
20
19
  const { search } = useLocation();
21
20
  const isDev = env === ENV.DEV;
22
21
  const { activeItemPath, flattenMenuPermission } = usePermission();
@@ -25,7 +24,7 @@ export const useNavigatePath = () => {
25
24
  const oidParam = hasRole ? urlParams.get('oid') : null;
26
25
  const searchParams = oidParam ? `?oid=${oidParam}` : '';
27
26
  const isPushDifferentDomain = useCallback((domain, path) => {
28
- var _a, _b, _c, _d, _e, _f, _g;
27
+ var _a, _b, _c, _d, _e, _f;
29
28
  if (isDev)
30
29
  return false;
31
30
  const customDomain = domain !== null && domain !== void 0 ? domain : '';
@@ -35,11 +34,9 @@ export const useNavigatePath = () => {
35
34
  if (isCurrentPathIncludeHash && isNextPathIncludeHash) {
36
35
  const currentRoute = ((_e = (_d = (_c = window.location.href) === null || _c === void 0 ? void 0 : _c.split) === null || _d === void 0 ? void 0 : _d['#']) === null || _e === void 0 ? void 0 : _e[0]) || '';
37
36
  const nextRoute = `${customDomain}${splitNextPath[0]}`;
38
- console.log('🚀 ~ useNavigatePath ~ currentRoute:', currentRoute, nextRoute);
39
37
  return currentRoute !== nextRoute;
40
38
  }
41
- console.log('out:: ', customDomain, (_f = window.location) === null || _f === void 0 ? void 0 : _f.origin);
42
- return !!customDomain && customDomain !== ((_g = window.location) === null || _g === void 0 ? void 0 : _g.origin);
39
+ return !!customDomain && customDomain !== ((_f = window.location) === null || _f === void 0 ? void 0 : _f.origin);
43
40
  }, [isDev]);
44
41
  const getPath = useCallback((path, itemKey) => {
45
42
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.519",
3
+ "version": "1.3.5-beta.521",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",