@topconsultnpm/sdkui-react-beta 6.8.0 → 6.8.1

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.
@@ -39,13 +39,14 @@ declare const TMLayoutItem: ({ onClick, children, width, minWidth, maxWidth, max
39
39
  height?: string;
40
40
  minHeight?: string;
41
41
  }) => import("react/jsx-runtime").JSX.Element;
42
- declare const TMLayoutContainer: ({ gap, onClick, justifyContent, alignItems, children, direction }: {
42
+ export interface ITMLayoutContainerProps {
43
+ children: React.ReactNode;
43
44
  gap?: number;
44
45
  justifyContent?: string;
45
46
  alignItems?: string;
47
+ direction?: 'vertical' | 'horizontal';
46
48
  onClick?: () => void;
47
- children: React.ReactNode;
48
- direction?: "vertical" | "horizontal";
49
- }) => import("react/jsx-runtime").JSX.Element;
49
+ }
50
+ declare const TMLayoutContainer: ({ gap, onClick, justifyContent, alignItems, children, direction }: ITMLayoutContainerProps) => import("react/jsx-runtime").JSX.Element;
50
51
  export { TMCard, TMLayoutItem, TMSplitterLayout };
51
52
  export default TMLayoutContainer;
@@ -157,7 +157,7 @@ const TMSplitterLayout = ({ animation = false, showSeparator = true, separatorCo
157
157
  sepDiv?.addEventListener('touchstart', onMouseDownSep);
158
158
  return () => { sepDiv?.removeEventListener('mousedown', onMouseDownSep); sepDiv?.removeEventListener('touchstart', onMouseDownSep); };
159
159
  }, [firstDivRef, secondDivRef, sepRef, isFrag, containerRef]);
160
- return (_jsxs("div", { ref: containerRef, style: { display: 'flex', width: '100%', height: '100%', flexDirection: direction === 'vertical' ? 'column' : 'row', alignItems: 'flex-start', justifyContent: 'flex-start', position: 'relative' }, children: [_jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[0] : '100%', minHeight: direction === 'vertical' ? min[0] : '100%', minWidth: direction === 'vertical' ? '100%' : min[0], width: direction === 'vertical' ? '100%' : start[0] }, ref: firstDivRef, children: React.Children.toArray(children)[0] }), !isFrag && _jsx("div", { ref: sepRef, style: { display: showSeparator ? 'block' : 'none', minWidth: direction === 'vertical' ? '100%' : `${separatorSize}px`, minHeight: direction === 'vertical' ? `${separatorSize}px` : '100%', backgroundColor: separatorColor, cursor: direction === 'vertical' ? 's-resize' : 'e-resize' } }), _jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[1] : '100%', minHeight: direction === 'vertical' ? min[1] : '100%', minWidth: direction === 'vertical' ? '100%' : min[1], width: direction === 'vertical' ? '100%' : start[1] }, ref: secondDivRef, children: React.Children.toArray(children)[1] })] }));
160
+ return (_jsxs("div", { ref: containerRef, style: { display: 'flex', width: '100%', height: '100%', flexDirection: direction === 'vertical' ? 'column' : 'row', alignItems: 'flex-start', justifyContent: 'flex-start', position: 'relative' }, children: [_jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[0] : '100%', minHeight: direction === 'vertical' ? min[0] : '100%', minWidth: direction === 'vertical' ? '100%' : min[0], width: direction === 'vertical' ? '100%' : start[0] }, ref: firstDivRef, children: React.Children.toArray(children)?.[0] }), !isFrag && _jsx("div", { ref: sepRef, style: { display: showSeparator ? 'block' : 'none', minWidth: direction === 'vertical' ? '100%' : `${separatorSize}px`, minHeight: direction === 'vertical' ? `${separatorSize}px` : '100%', backgroundColor: separatorColor, cursor: direction === 'vertical' ? 's-resize' : 'e-resize' } }), _jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[1] : '100%', minHeight: direction === 'vertical' ? min[1] : '100%', minWidth: direction === 'vertical' ? '100%' : min[1], width: direction === 'vertical' ? '100%' : start[1] }, ref: secondDivRef, children: React.Children.toArray(children)?.[1] })] }));
161
161
  };
162
162
  const TMLayoutItem = ({ onClick, children, width = '100%', minWidth, maxWidth, maxHeight, height = '100%', minHeight }) => {
163
163
  return (_jsx(StyledLayoutItem, { onClick: onClick, "$height": height, "$maxHeight": maxHeight, "$minHeight": minHeight, "$width": width, "$minWidth": minWidth, "$maxWidth": maxWidth, children: children }));
@@ -0,0 +1,32 @@
1
+ import { ITMLayoutContainerProps } from './TMLayout';
2
+ interface ITMWaitPanelProps {
3
+ title?: string;
4
+ showPrimary?: boolean;
5
+ textPrimary?: string;
6
+ valuePrimary?: number;
7
+ maxValuePrimary?: number;
8
+ showSecondary?: boolean;
9
+ textSecondary?: string;
10
+ valueSecondary?: number;
11
+ maxValueSecondary?: number;
12
+ isCancelable?: boolean;
13
+ abortController?: AbortController;
14
+ onAbortClick?: (abortController: AbortController | undefined) => void;
15
+ }
16
+ export declare const TMWaitPanel: (props: ITMWaitPanelProps) => import("react/jsx-runtime").JSX.Element;
17
+ interface ITMLayoutWaitingContainerProps extends ITMLayoutContainerProps {
18
+ showWaitPanel?: boolean;
19
+ waitPanelTitle?: string;
20
+ showWaitPanelPrimary?: boolean;
21
+ waitPanelTextPrimary?: string;
22
+ waitPanelValuePrimary?: number;
23
+ waitPanelMaxValuePrimary?: number;
24
+ showWaitPanelSecondary?: boolean;
25
+ waitPanelTextSecondary?: string;
26
+ waitPanelValueSecondary?: number;
27
+ waitPanelMaxValueSecondary?: number;
28
+ isCancelable?: boolean;
29
+ abortController?: AbortController;
30
+ }
31
+ export declare const TMLayoutWaitingContainer: ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, gap, onClick, justifyContent, alignItems, children, direction }: ITMLayoutWaitingContainerProps) => import("react/jsx-runtime").JSX.Element;
32
+ export {};
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import TMLayoutContainer from './TMLayout';
4
+ import { SDKUI_Localizator } from '../../helper';
5
+ const StyledWaitPanelOverlay = styled.div `
6
+ width: 100%;
7
+ height: 100%;
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ z-index: 1501;
12
+ transition: all;
13
+ overflow: visible;
14
+ background-color: rgba(0, 0, 0, 0.4);
15
+ `;
16
+ const StyledWaitPanel = styled.div `
17
+ position: absolute;
18
+ top: 50%;
19
+ left: 50%;
20
+ transform: translate(-50%, -50%);
21
+ width: 300px;
22
+ height: ${(props) => props.$height};
23
+ background: white;
24
+ border-radius: 8px;
25
+ padding: 10px;
26
+ text-align: center;
27
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
28
+ `;
29
+ const StyledTitle = styled.h2 ` margin: 0; font-size: 1.5em; color: #333; `;
30
+ const StyledProgressBarContainer = styled.div ` width: 100%; height: 20px; background: #e0e0e0; border-radius: 10px; overflow: hidden; margin: 20px 0; `;
31
+ const StyledProgressBar = styled.div ` height: 100%; background: #4caf50; transition: width 0.3s ease; `;
32
+ const StyledProgressText = styled.p ` font-weight: bold; color: #333; margin: 0; `;
33
+ const StyledMessage = styled.p ` color: #666; font-size: 0.9em; margin-top: 10px; `;
34
+ const StyledAbortButton = styled.button ` background: #ff4d4d; color: white; border: none; border-radius: 5px; padding: 10px 20px; font-size: 1em; cursor: pointer; margin-top: 20px; &:hover { background: #ff6666; } `;
35
+ export const TMWaitPanel = (props) => {
36
+ let progressValue1 = 100 * (((props.valuePrimary ?? 0) / (props.maxValuePrimary ?? 0)) || 0);
37
+ let progressValue2 = 100 * (((props.valueSecondary ?? 0) / (props.maxValueSecondary ?? 0)) || 0);
38
+ return (_jsx(StyledWaitPanelOverlay, { children: _jsxs(StyledWaitPanel, { "$height": (props.showPrimary && props.showSecondary) ? '350px' : '250px', children: [_jsx(StyledTitle, { children: props.title }), props.showPrimary &&
39
+ _jsxs("div", { style: { width: '100%', height: '100px' }, children: [_jsx(StyledProgressBarContainer, { children: _jsx(StyledProgressBar, { style: { width: `${progressValue1.toFixed(2)}%` } }) }), _jsxs(StyledProgressText, { children: [progressValue1.toFixed(2), "%"] }), _jsx(StyledMessage, { children: props.textPrimary })] }), props.showSecondary &&
40
+ _jsxs("div", { style: { width: '100%', height: '100px' }, children: [_jsx(StyledProgressBarContainer, { children: _jsx(StyledProgressBar, { style: { width: `${progressValue2.toFixed(2)}%` } }) }), _jsxs(StyledProgressText, { children: [progressValue2.toFixed(2), "%"] }), _jsx(StyledMessage, { children: props.textSecondary })] }), props.isCancelable && _jsx(StyledAbortButton, { onClick: () => props.onAbortClick?.(props.abortController), children: SDKUI_Localizator.Abort })] }) }));
41
+ };
42
+ export const TMLayoutWaitingContainer = ({ showWaitPanel, showWaitPanelPrimary, showWaitPanelSecondary, waitPanelTitle, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, isCancelable, abortController, gap = 3, onClick, justifyContent = 'flex-start', alignItems = 'flex-start', children, direction = 'vertical' }) => {
43
+ return (_jsxs(TMLayoutContainer, { gap: gap, justifyContent: justifyContent, alignItems: alignItems, direction: direction, children: [children, showWaitPanel &&
44
+ _jsx(TMWaitPanel, { title: waitPanelTitle, showPrimary: showWaitPanelPrimary, textPrimary: waitPanelTextPrimary, valuePrimary: waitPanelValuePrimary, maxValuePrimary: waitPanelMaxValuePrimary, showSecondary: showWaitPanelSecondary, textSecondary: waitPanelTextSecondary, valueSecondary: waitPanelValueSecondary, maxValueSecondary: waitPanelMaxValueSecondary, isCancelable: isCancelable, abortController: abortController, onAbortClick: (abortController) => { setTimeout(() => { abortController?.abort(); }, 1000); } })] }));
45
+ };
@@ -9,6 +9,7 @@ export { default as TMModal } from './base/TMModal';
9
9
  export * from './base/TMPopUp';
10
10
  export * from './base/TMLayout';
11
11
  export * from './base/Styled';
12
+ export * from './base/TMWaitPanel';
12
13
  export { default as CounterBar } from './base/TMCounterBar';
13
14
  export { default as TMProgressBar } from './base/TMProgressBar';
14
15
  export { default as TMSpinner } from './base/TMSpinner';
@@ -1,17 +1,16 @@
1
1
  // base
2
- // export { default as TMAbortBox } from './base/TMAbortBox'
3
2
  export { default as ShowAlert } from './base/TMAlert';
4
3
  export { default as TMButton } from './base/TMButton';
5
4
  export { default as TMClosableList } from './base/TMClosableList';
6
5
  export * from './base/TMContextMenu';
7
6
  export { default as TMDropDownMenu } from './base/TMDropDownMenu';
8
7
  export * from './base/TMListView';
9
- // export { default as TMListView } from './base/TMListView'
10
8
  export { default as TMList } from './base/TMList';
11
9
  export { default as TMModal } from './base/TMModal';
12
10
  export * from './base/TMPopUp';
13
11
  export * from './base/TMLayout';
14
12
  export * from './base/Styled';
13
+ export * from './base/TMWaitPanel';
15
14
  export { default as CounterBar } from './base/TMCounterBar';
16
15
  export { default as TMProgressBar } from './base/TMProgressBar';
17
16
  export { default as TMSpinner } from './base/TMSpinner';
@@ -44,12 +43,9 @@ export * from './query/TMQueryResultForm';
44
43
  //tab
45
44
  export * from './base/TMTab';
46
45
  // others
47
- // export { default as TMAreaManager } from "./filesystem/TMAreaManager";
48
- // export { default as TMFilePreviewer } from "./filesystem/TMFilePreviewer";
49
46
  export { default as TMHeader } from "./sidebar/TMHeader";
50
47
  export { default as TMSidebar } from "./sidebar/TMSidebar";
51
48
  export { default as TMSidebarItem } from "./sidebar/TMSidebarItem";
52
- // export { default as TMStatusbar } from "./sidebar/TMStatusBar";
53
49
  export { default as TMSplitterLayout } from "./splitter/TMSplitterLayout";
54
50
  //form
55
51
  export { default as TMLoginForm } from "./forms/TMLoginForm";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "@topconsultnpm/sdk-ts-beta": "^6.8.0",
32
32
  "buffer": "^6.0.3",
33
- "devextreme": "24.1.6",
34
- "devextreme-react": "24.1.6",
33
+ "devextreme": "24.2.3",
34
+ "devextreme-react": "24.2.3",
35
35
  "react-router-dom": "^6.15.0",
36
36
  "styled-components": "^6.1.1"
37
37
  }