@topconsultnpm/sdkui-react 6.20.0-dev1.106 → 6.20.0-dev1.108

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.
@@ -9,7 +9,6 @@ export interface AppRoute {
9
9
  type?: AppRouteType;
10
10
  }
11
11
  interface ITMSidebar {
12
- /** List of TMSidebarItem components that make up the menu */
13
12
  items: JSX.Element[];
14
13
  height?: string;
15
14
  width?: string;
@@ -1,17 +1,14 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useState } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import styled from 'styled-components';
4
- import { AccessLevelsEx, DcmtTypeListCacheService, SDK_Globals } from '@topconsultnpm/sdk-ts';
3
+ import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
5
4
  import { ScrollView } from 'devextreme-react';
6
5
  import { TMColors } from '../../utils/theme';
7
- import TMSpinner from '../base/TMSpinner';
8
- import { TMExceptionBoxManager } from '../base/TMPopUp';
9
6
  const StyledTMSidebarContainer = styled.div `
10
7
  top: ${props => props.$top || '70px'};
11
8
  left: ${props => props.$left || '0px'};
12
9
  width: ${props => props.$width || '50px'};
13
10
  height: ${props => props.$height || 'calc(100% - 90px)'};
14
- background: linear-gradient(180deg, ${() => TMColors.primaryColor} 0%, #0a3d23 100%);
11
+ background: linear-gradient(180deg, ${() => TMColors.primaryColor} 0%, ${props => props.$appName === AppModules.DESIGNER ? '#351525' : props.$appName === AppModules.ORCHESTRATOR ? '#0a3d23' : '#0a3d23'} 100%);
15
12
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
16
13
  border-radius: 0px 10px 10px 0px;
17
14
  opacity: 1;
@@ -24,46 +21,13 @@ const StyledTMSidebarContainer = styled.div `
24
21
  overflow: hidden;
25
22
  z-index: 100;
26
23
  `;
27
- const FixedBottomContainer = styled.div `
28
- display: flex;
29
- flex-direction: column;
30
- align-items: center;
31
- gap: 3px;
32
- position: relative;
33
- width: 100%;
34
- min-height: 130px;
35
- overflow: hidden;
36
- `;
37
24
  const TMSidebar = ({ items, height, borderRightRadius, left, top, width }) => {
38
- const [canArchive, setCanArhive] = useState(false);
39
- const [canSearch, setCanSearch] = useState(false);
40
- useEffect(() => {
41
- getAllDcmtTypesAsync();
42
- }, []);
43
- const getAllDcmtTypesAsync = async () => {
44
- try {
45
- TMSpinner.show();
46
- const res = await DcmtTypeListCacheService.GetAllWithoutMetadataAsync();
47
- if (!res)
48
- return;
49
- if (res.some(r => r.perm?.canArchive === AccessLevelsEx.Yes))
50
- setCanArhive(true);
51
- if (res.some(r => r.perm?.canSearch === AccessLevelsEx.Yes))
52
- setCanSearch(true);
53
- }
54
- catch (e) {
55
- TMExceptionBoxManager.show({ exception: e });
56
- }
57
- finally {
58
- TMSpinner.hide();
59
- }
60
- };
61
- return (_jsxs(StyledTMSidebarContainer, { "$borderRightRadius": borderRightRadius, "$left": left, "$top": top, "$width": width, "$appName": SDK_Globals.appModule, "$height": height, children: [_jsx(ScrollView, { height: "calc(100% - 150px)", width: "100%", useNative: true, children: _jsx("div", { style: {
62
- display: "flex",
63
- flexDirection: "column",
64
- alignItems: "center",
65
- gap: "3px",
66
- width: "100%"
67
- }, children: items.filter(item => item.props.type !== 'app') }) }), _jsx(FixedBottomContainer, { children: items.filter(item => item.props.type === 'app') })] }));
25
+ return (_jsx(StyledTMSidebarContainer, { "$borderRightRadius": borderRightRadius, "$left": left, "$top": top, "$width": width, "$appName": SDK_Globals.appModule, "$height": height, children: _jsx(ScrollView, { height: "calc(100%)", width: "100%", useNative: true, children: _jsx("div", { style: {
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ alignItems: "center",
29
+ gap: "3px",
30
+ width: "100%"
31
+ }, children: items.filter(item => item.props.type !== 'app') }) }) }));
68
32
  };
69
33
  export default TMSidebar;
@@ -964,14 +964,13 @@ export const getBrowserAuditInfo = () => {
964
964
  userAgent: navigator.userAgent,
965
965
  toString() {
966
966
  return [
967
- `[BROWSER AUDIT INFO]`,
968
967
  `Browser: ${this.name} ${this.version}`,
969
968
  `OS: ${this.os}`,
970
969
  `Language: ${this.language}`,
971
970
  `Timezone: ${this.timezone}`,
972
971
  `Screen: ${this.screenWidth}x${this.screenHeight} (${this.colorDepth}bit, ${this.pixelRatio}x)`,
973
972
  `Viewport: ${this.viewportWidth}x${this.viewportHeight}`,
974
- `Features: Cookies=${this.cookiesEnabled}, Online=${this.onlineStatus}, Touch=${this.touchSupport}`,
973
+ // `Features: Cookies=${this.cookiesEnabled}, Online=${this.onlineStatus}, Touch=${this.touchSupport}`,
975
974
  `UserAgent: ${this.userAgent}`
976
975
  ].join(' | ');
977
976
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev1.106",
3
+ "version": "6.20.0-dev1.108",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",