@topconsultnpm/sdkui-react-beta 6.11.88 → 6.11.89
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.
@@ -11,6 +11,7 @@ import { TMColors } from '../../utils/theme';
|
|
11
11
|
import TMValidationItemsList from '../grids/TMValidationItemsList';
|
12
12
|
import TMModal from '../base/TMModal';
|
13
13
|
import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
|
14
|
+
import toppy from '../../assets/Toppy-generico.png';
|
14
15
|
const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showBackButton, showWarningsCount = true, showErrorCount = true, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height }) => {
|
15
16
|
const [showList, setShowList] = useState(true);
|
16
17
|
const [showErrorGrid, setShowErrorGrid] = useState(false);
|
@@ -121,7 +122,7 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
|
|
121
122
|
};
|
122
123
|
return (_jsx(_Fragment, { children: isModal && onClose
|
123
124
|
?
|
124
|
-
_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: showConfirmForClose ? 'none' : 'block' }, children: renderSaveForm() }), _jsx("div", { style: { width: "100%", height: "100%", display: showConfirmForClose ? 'block' : 'none', overflowY: 'hidden' }, 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:
|
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: showConfirmForClose ? 'none' : 'block' }, children: renderSaveForm() }), _jsx("div", { style: { width: "100%", height: "100%", display: showConfirmForClose ? 'block' : 'none', overflowY: 'hidden' }, 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 () => {
|
125
126
|
deviceType === DeviceType.MOBILE ? (await onSaveAsync?.(), setShowList(true), onShowList?.(true)) : await onSaveAsync?.();
|
126
127
|
setShowConfirmForClose(false);
|
127
128
|
onClose?.();
|