@antscorp/antsomi-ui 1.3.5-beta.586 → 1.3.5-beta.588

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.
@@ -98,6 +98,7 @@ const Help = props => {
98
98
  const [allAppOptions, setAllAppOptions] = useState([]);
99
99
  const [isForceStopRecorder, setIsForceStopRecorder] = useState(false);
100
100
  const [isLoadingListHelp, setIsLoadingHelp] = useState(true);
101
+ const fetchingRef = useRef(false);
101
102
  const recorderRef = useRef();
102
103
  const streamTracks = useRef();
103
104
  const allAppOptionsRef = useRef([]);
@@ -231,7 +232,8 @@ const Help = props => {
231
232
  setIsMainLoading(false);
232
233
  }
233
234
  });
234
- if (isEmpty(allAppOptions)) {
235
+ if (!fetchingRef.current && isEmpty(allAppOptions)) {
236
+ fetchingRef.current = true;
235
237
  handleFetchAllApps();
236
238
  }
237
239
  }, [allAppOptions, config, domainTicket, token, userId]);
@@ -12,6 +12,7 @@ import { ENV } from '@antscorp/antsomi-ui/es/config';
12
12
  import { findLastMatchedItemByUrl, findPathOfActiveItem, flattenMenuArray, getMappingAppChildren, recursivePermissionMenu, } from '../utils';
13
13
  import { useCheckUserPermission } from '@antscorp/antsomi-ui/es/queries';
14
14
  import { recursiveSortBy } from '@antscorp/antsomi-ui/es/utils';
15
+ import { useDeepCompareEffect } from '@antscorp/antsomi-ui/es/hooks';
15
16
  const { DEV, SANDBOX, SANDBOX_CDP } = ENV;
16
17
  export const usePermission = () => {
17
18
  const appConfig = useLeftMenuContext(store => store.appConfig);
@@ -167,7 +168,7 @@ export const usePermission = () => {
167
168
  })
168
169
  : [];
169
170
  }, [auth, env, hash, mappingChildrenMenuWithNoPermission, pathname]);
170
- useEffect(() => setLeftMenuState({ dashboardList }), [dashboardList, setLeftMenuState]);
171
+ useDeepCompareEffect(() => setLeftMenuState({ dashboardList }), [dashboardList, setLeftMenuState]);
171
172
  useEffect(() => {
172
173
  if (!isCustomized) {
173
174
  const receivePostMessage = (event) => {
@@ -227,6 +227,7 @@ export const getMappingAppChildren = (args) => {
227
227
  }
228
228
  })();
229
229
  return Object.assign({}, getInitialFeatureMenuItem({
230
+ page_title: appItem.page_title,
230
231
  menu_item_domain: childMenuItem.menu_item_domain,
231
232
  menu_item: String(item.dashboardId),
232
233
  menu_item_code: String(item.dashboardId),
@@ -186,10 +186,10 @@ export const Layout = memo(props => {
186
186
  /** Handle replace current userId in params if current userId is not match */
187
187
  useDeepCompareEffect(() => {
188
188
  const { userId: userIdParam } = (params || {});
189
- if (userIdParam && userId && userIdParam !== userId && location.pathname) {
189
+ if (userIdParam && userId && +userIdParam !== +userId && location.pathname) {
190
190
  replace(`${location.pathname.replace(userIdParam, `${userId}`)}${location.search}`);
191
191
  }
192
- }, [params, location, userId, navigate, replace]);
192
+ }, [params, location.pathname, userId, replace]);
193
193
  /** If left menu props has customization then set layout loading to false, because we don't need check permission here */
194
194
  useDeepCompareEffect(() => {
195
195
  if (mergeLeftMenuProps.customization) {
@@ -633,7 +633,7 @@
633
633
  "_general": "General Settings",
634
634
  "_accountSharing": "Account Sharing",
635
635
  "_ticket": "Ticket",
636
- "_channelIntegration": "Channel Intergration",
636
+ "_channelIntegration": "Channel Integration",
637
637
  "_diagrams": "Diagrams",
638
638
  "_eventSources": "Event Sources",
639
639
  "_events": "Events",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.586",
3
+ "version": "1.3.5-beta.588",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -63,7 +63,7 @@
63
63
  "not op_mini all"
64
64
  ],
65
65
  "dependencies": {
66
- "@antscorp/icons": "0.27.52",
66
+ "@antscorp/icons": "0.27.54",
67
67
  "@antscorp/image-editor": "1.0.2",
68
68
  "@antscorp/processing-notification": "^1.0.3",
69
69
  "@dnd-kit/core": "^6.1.0",