@topconsultnpm/sdkui-react-beta 6.12.77 → 6.12.80
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.
@@ -45,7 +45,7 @@ const StyledSearchCardContent = styled.div `
|
|
45
45
|
`;
|
46
46
|
const TMToolbarCard = ({ items = [], onItemClick, selectedItem, showPanel, color = TMColors.colorHeader, backgroundColor = TMColors.backgroundColorHeader, backgroundColorContainer, children, showHeader = true, title, totalItems, displayedItemsCount, toolbar, padding = '3px', onBack, onClose, onHeaderDoubleClick }) => {
|
47
47
|
return (_jsxs(StyledSearchCard, { children: [showHeader && _jsx(StyledSearchCardHeader, { "$backgroundColor": backgroundColor, "$color": color, onDoubleClick: () => { if (onHeaderDoubleClick)
|
48
|
-
onHeaderDoubleClick(); }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '8px' }, children: [onBack && _jsx(TMButton, { btnStyle: 'icon', icon: _jsx("div", { style: { backgroundColor: 'white', minWidth: '24px', minHeight: '24px', borderRadius: '24px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(IconArrowLeft, { color: TMColors.primaryColor }) }), caption:
|
48
|
+
onHeaderDoubleClick(); }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '8px' }, children: [onBack && _jsx(TMButton, { btnStyle: 'icon', icon: _jsx("div", { style: { backgroundColor: 'white', minWidth: '24px', minHeight: '24px', borderRadius: '24px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(IconArrowLeft, { color: TMColors.primaryColor }) }), caption: SDKUI_Localizator.Back, onClick: onBack }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' }, children: [_jsx("p", { children: title }), Boolean(displayedItemsCount && displayedItemsCount > 0) && (_jsxs(_Fragment, { children: [_jsx(StyledBadge, { "$backgroundColor": '#679CE8', children: displayedItemsCount }), Boolean(totalItems && totalItems > 0) && _jsx("span", { children: "\u00A0\u00A0/\u00A0" })] })), Boolean(totalItems && totalItems > 0) && _jsx(StyledBadge, { "$backgroundColor": '#679CE8', children: totalItems })] })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '5px' }, children: [toolbar, onClose && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Close, icon: _jsx("i", { className: 'dx-icon-remove', style: { color: "white" } }), btnStyle: 'icon', onClick: () => onClose?.() })] })] }) }), _jsxs(StyledSearchCardContent, { "$height": showHeader ? "calc(100% - 35px)" : "100%", "$padding": padding, "$backgroundColor": backgroundColorContainer ?? `${TMColors.backgroundColorHeader}12`, children: [_jsx("div", { style: { width: items.length > 0 ? 'calc(100% - 30px)' : '100%' }, children: children }), items.length > 0 &&
|
49
49
|
_jsx(TMRightSidebar, { items: items, onItemClick: onItemClick, selectedItem: selectedItem, showPanel: showPanel })] })] }));
|
50
50
|
};
|
51
51
|
export default TMToolbarCard;
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
2
2
|
import { useState } from 'react';
|
3
3
|
import { ResultTypes } from '@topconsultnpm/sdk-ts-beta';
|
4
4
|
import { FormModes } from '../../ts/types';
|
5
|
-
import { IconArrowDown, IconArrowLeft, IconArrowUp, IconCloseCircle, IconHide, IconSave, IconShow, IconUndo, IconWarning, LocalizeFormModes, SDKUI_Localizator, getColor } from '../../helper';
|
5
|
+
import { IconArrowDown, IconArrowLeft, IconArrowUp, IconCloseCircle, IconHide, IconSave, IconShow, IconUndo, IconWarning, LocalizeFormModes, SDKUI_Localizator, calcResponsiveSizes, getColor } from '../../helper';
|
6
6
|
import { ButtonNames, TMExceptionBoxManager, TMMessageBoxManager } from '../base/TMPopUp';
|
7
7
|
import TMLayoutContainer, { TMCard, TMLayoutItem, TMSplitterLayout } from '../base/TMLayout';
|
8
8
|
import { StyledResultTypeContainer, StyledToolbarForm } from '../base/Styled';
|
@@ -122,17 +122,17 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
|
|
122
122
|
};
|
123
123
|
return (_jsx(_Fragment, { children: isModal && onClose
|
124
124
|
?
|
125
|
-
_jsxs(TMModal, { title: `${title} - ${LocalizeFormModes(formMode)}`, onClose: closeModal, width: width ?? '100%', height: height ?? '100%', hidePopup: false, children: [_jsx("div", { style: { width: "100%", height: "100%", display:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
125
|
+
_jsx(_Fragment, { children: _jsxs(TMModal, { title: `${title} - ${LocalizeFormModes(formMode)}`, onClose: closeModal, width: width ?? '100%', height: height ?? '100%', hidePopup: false, children: [_jsx("div", { style: { width: "100%", height: "100%", display: 'block' }, children: renderSaveForm() }), showConfirmForClose && _jsx(TMModal, { title: `${title} - ${LocalizeFormModes(formMode)}`, onClose: () => { setShowConfirmForClose(false); }, width: calcResponsiveSizes(deviceType, '400px', '300px', '250px'), height: '180px', hidePopup: false, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 40px)', children: _jsx(TMCard, { showBorder: false, scrollY: true, children: _jsxs(TMLayoutContainer, { direction: 'horizontal', alignItems: 'center', justifyContent: 'center', gap: 10, children: [_jsx(TMLayoutItem, { width: 'fit-content', children: _jsx("img", { style: { transform: 'translateY(8px)' }, src: toppy, width: 60, height: 75, alt: "" }) }), _jsx(TMLayoutItem, { height: 'fit-content', children: _jsxs("div", { children: [" ", SDKUI_Localizator.SaveQuestion, " "] }) })] }) }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsxs("div", { style: { position: "relative", display: "flex", flexDirection: "row", justifyContent: "flex-end", alignItems: "center", gap: "5px", padding: "5px", userSelect: "none", borderTop: "1px solid #f3f3f3", backgroundColor: "#ffffff", zIndex: 100, }, children: [_jsx(TMButton, { caption: SDKUI_Localizator.Yes, fontSize: '1.1rem', color: 'primaryOutline', btnStyle: 'text', onClick: async () => {
|
126
|
+
deviceType === DeviceType.MOBILE ? (await onSaveAsync?.(), setShowList(true), onShowList?.(true)) : await onSaveAsync?.();
|
127
|
+
setShowConfirmForClose(false);
|
128
|
+
onClose?.();
|
129
|
+
}, showTooltip: false }), _jsx(TMButton, { caption: SDKUI_Localizator.No, fontSize: '1.1rem', btnStyle: 'text', onClick: () => {
|
130
|
+
deviceType === DeviceType.MOBILE && (onUndo(), setShowList(true), onShowList?.(true));
|
131
|
+
setShowConfirmForClose(false);
|
132
|
+
onClose?.();
|
133
|
+
}, showTooltip: false, color: 'error' }), _jsx(TMButton, { caption: SDKUI_Localizator.Cancel, fontSize: '1.1rem', btnStyle: 'text', onClick: () => {
|
134
|
+
setShowConfirmForClose(false);
|
135
|
+
}, showTooltip: false, color: 'error' })] }) })] }) })] }) })
|
136
136
|
: renderSaveForm() }));
|
137
137
|
};
|
138
138
|
export default TMSaveForm;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
3
|
-
"version": "6.12.
|
3
|
+
"version": "6.12.80",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"lib"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@topconsultnpm/sdk-ts-beta": "6.12.
|
44
|
+
"@topconsultnpm/sdk-ts-beta": "6.12.9",
|
45
45
|
"buffer": "^6.0.3",
|
46
46
|
"devextreme": "24.2.6",
|
47
47
|
"devextreme-react": "24.2.6",
|