@antscorp/antsomi-ui 1.3.5-beta.113 → 1.3.5-beta.115

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.
@@ -66,7 +66,7 @@ export const RichMenuCell = props => {
66
66
  const { objectPosition, objectFit } = imageStyles, restImageStyles = __rest(imageStyles, ["objectPosition", "objectFit"]);
67
67
  const isBlank = isEmpty(imageUrl);
68
68
  if (isBlank)
69
- return (React.createElement(AddContainer, null,
69
+ return (React.createElement(AddContainer, { className: "cell-add-container" },
70
70
  React.createElement(Icon, { type: "icon-ants-plus-circle", size: 20, style: { color: 'rgba(0, 95, 184, 1)' } }),
71
71
  React.createElement(AddLabel, null, t(translations.cellAction).toString())));
72
72
  return (React.createElement(CellImage, { active: active && !isPreview, src: imageUrl, imagePosition: objectPosition, imageSize: objectFit, style: restImageStyles }));
@@ -1,9 +1,10 @@
1
1
  /* eslint-disable react/jsx-no-constructed-context-values */
2
- import React, { useEffect, useReducer } from 'react';
2
+ import React, { useReducer } from 'react';
3
3
  import { ShareAccessDispatchContext, ShareAccessStateContext } from './context';
4
4
  import { LayoutContent } from './components';
5
5
  import { shareAccessReducer } from './reducer';
6
6
  import { updateObjAccessInfo } from './actions';
7
+ import { useDeepCompareEffect } from '@antscorp/antsomi-ui/es/hooks/useDeepCompareEffect';
7
8
  export const ShareAccess = (props) => {
8
9
  const { accessInfo, excludeUserAccess, userId, onChange, userPermission } = props;
9
10
  const [state, dispatch] = useReducer(shareAccessReducer(onChange), {
@@ -12,7 +13,7 @@ export const ShareAccess = (props) => {
12
13
  userToOwnerShipId: -1,
13
14
  },
14
15
  });
15
- useEffect(() => {
16
+ useDeepCompareEffect(() => {
16
17
  if (!accessInfo)
17
18
  return;
18
19
  dispatch(updateObjAccessInfo(accessInfo));
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { ShareAccessProps } from '../../types';
3
- export declare const LayoutContent: (props: ShareAccessProps) => React.JSX.Element | null;
3
+ export declare const LayoutContent: (props: ShareAccessProps) => React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { useShareAccess } from '../../hooks';
3
2
  import { GeneralAccess } from '../GeneralAccess';
4
3
  import { ModalTransferOwnership } from '../ModalTransferOwnerShip/ModalTransferOwnerShip';
5
4
  import { PeopleAccess } from '../PeopleAccess';
@@ -7,10 +6,9 @@ import { SearchUser } from '../SearchUser';
7
6
  import { StyledLayoutContentRoot } from './styled';
8
7
  export const LayoutContent = (props) => {
9
8
  const { getUserInfo, generalAccessSettings, excludeUserAccess, placeholder, allowAddUser = true, } = props;
10
- const { state } = useShareAccess();
11
- const { allowEdit, allowView } = state;
12
- if (!allowEdit && !allowView)
13
- return null;
9
+ // const { state } = useShareAccess();
10
+ // const { allowEdit, allowView } = state;
11
+ // if (!allowEdit && !allowView) return null;
14
12
  return (React.createElement(StyledLayoutContentRoot, null,
15
13
  allowAddUser && React.createElement(SearchUser, { getUserInfo: getUserInfo, placeholder: placeholder }),
16
14
  React.createElement(PeopleAccess, { excludeUserAccess: excludeUserAccess }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.113",
3
+ "version": "1.3.5-beta.115",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",