@topconsultnpm/sdkui-react 6.20.0-dev1.6 → 6.20.0-dev1.60
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.
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +416 -0
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +13 -0
- package/lib/components/NewComponents/ContextMenu/hooks.js +61 -0
- package/lib/components/NewComponents/ContextMenu/index.d.ts +5 -0
- package/lib/components/NewComponents/ContextMenu/index.js +3 -0
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +31 -0
- package/lib/components/NewComponents/ContextMenu/styles.js +336 -0
- package/lib/components/NewComponents/ContextMenu/types.d.ts +39 -0
- package/lib/components/NewComponents/ContextMenu/types.js +1 -0
- package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
- package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +4 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +745 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +51 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +385 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +29 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
- package/lib/components/base/TMAccordionNew.js +35 -14
- package/lib/components/base/TMCustomButton.js +61 -17
- package/lib/components/base/TMDataGrid.d.ts +7 -4
- package/lib/components/base/TMDataGrid.js +142 -11
- package/lib/components/choosers/TMMetadataChooser.js +8 -1
- package/lib/components/editors/TMMetadataValues.js +23 -5
- package/lib/components/editors/TMTextBox.js +6 -3
- package/lib/components/features/documents/TMDcmtForm.d.ts +13 -1
- package/lib/components/features/documents/TMDcmtForm.js +386 -194
- package/lib/components/features/documents/TMDcmtPreview.js +40 -69
- package/lib/components/features/documents/TMMasterDetailDcmts.js +37 -52
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
- package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +5 -10
- package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
- package/lib/components/features/search/TMSearch.js +30 -5
- package/lib/components/features/search/TMSearchQueryPanel.js +13 -12
- package/lib/components/features/search/TMSearchResult.js +57 -216
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
- package/lib/components/features/search/TMSignSettingsForm.js +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
- package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
- package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
- package/lib/components/features/tasks/TMTaskForm.js +20 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
- package/lib/components/features/tasks/TMTasksUtils.js +62 -52
- package/lib/components/features/tasks/TMTasksView.js +6 -6
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +32 -2
- package/lib/components/features/workflow/TMWorkflowPopup.js +112 -14
- package/lib/components/features/workflow/diagram/WFDiagram.js +2 -2
- package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
- package/lib/components/forms/Login/LoginValidatorService.js +7 -2
- package/lib/components/forms/Login/TMLoginForm.js +34 -6
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +55 -30
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
- package/lib/components/viewers/TMDataListItemViewer.js +12 -11
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +17 -0
- package/lib/helper/SDKUI_Globals.js +9 -0
- package/lib/helper/SDKUI_Localizator.d.ts +9 -1
- package/lib/helper/SDKUI_Localizator.js +87 -1
- package/lib/helper/TMIcons.d.ts +2 -0
- package/lib/helper/TMIcons.js +6 -0
- package/lib/helper/TMPdfViewer.d.ts +8 -0
- package/lib/helper/TMPdfViewer.js +368 -0
- package/lib/helper/checkinCheckoutManager.d.ts +32 -2
- package/lib/helper/checkinCheckoutManager.js +115 -38
- package/lib/helper/devextremeCustomMessages.d.ts +30 -0
- package/lib/helper/devextremeCustomMessages.js +30 -0
- package/lib/helper/helpers.d.ts +2 -1
- package/lib/helper/helpers.js +14 -3
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/helper/queryHelper.js +29 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
- package/lib/hooks/useCheckInOutOperations.js +223 -0
- package/lib/hooks/useWorkflowApprove.d.ts +4 -0
- package/lib/hooks/useWorkflowApprove.js +14 -1
- package/lib/ts/types.d.ts +56 -1
- package/package.json +5 -2
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
|
@@ -8,13 +8,14 @@ import { FileExtensionHandler, FormModes } from '../../../ts';
|
|
|
8
8
|
import { TMColors } from '../../../utils/theme';
|
|
9
9
|
import ShowAlert from '../../base/TMAlert';
|
|
10
10
|
import TMButton from '../../base/TMButton';
|
|
11
|
-
import TMDropDownMenu from '../../base/TMDropDownMenu';
|
|
12
11
|
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
13
12
|
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
|
14
13
|
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
|
|
15
14
|
import { StyledAnimatedComponentOpacity } from '../../base/Styled';
|
|
16
15
|
import TMPanel from '../../base/TMPanel';
|
|
17
16
|
import TMTooltip from '../../base/TMTooltip';
|
|
17
|
+
import { ContextMenu } from '../../NewComponents/ContextMenu';
|
|
18
|
+
import TMPdfViewer from '../../../helper/TMPdfViewer';
|
|
18
19
|
const ErrorContent = ({ error, isAbortError, onRetry }) => {
|
|
19
20
|
if (isAbortError) {
|
|
20
21
|
return (_jsx(StyledAnimatedComponentOpacity, { style: { width: '100%', height: '100%' }, children: _jsxs(StyledPanelStatusContainer, { children: [_jsx(IconCloseOutline, { fontSize: 92, color: TMColors.error }), _jsxs(StyledPreviewNotAvailable, { children: [_jsx("div", { children: error }), _jsx("div", { children: SDKUI_Localizator.PreviewNotAvailable })] }), _jsx(TMButton, { caption: SDKUI_Localizator.TryAgain, onClick: onRetry, showTooltip: false })] }) }));
|
|
@@ -124,10 +125,11 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
|
|
|
124
125
|
console.error('Error reopening document:', error);
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
const cacheMenuItems = useMemo(() => [
|
|
129
|
+
{ icon: _jsx(IconCloseCircle, {}), name: SDKUI_Localizator.RemoveFromCache, onClick: () => { removeDcmtsFileCache(cacheKey); setIsFromCache(false); } },
|
|
130
|
+
{ icon: _jsx(IconClear, {}), name: SDKUI_Localizator.ClearCache, onClick: () => { clearDcmtsFileCache(); setIsFromCache(false); } },
|
|
131
|
+
], [cacheKey, removeDcmtsFileCache, clearDcmtsFileCache, setIsFromCache]);
|
|
132
|
+
return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMPanel, { padding: '0', title: titleHandler(), onClose: onClosePanel, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, toolbar: _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [onPrev && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), onNext && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(StyledHeaderIcon, { "$color": TMColors.primaryColor, children: _jsx(ContextMenu, { items: cacheMenuItems, trigger: "left", children: _jsx(IconMenuVertical, {}) }) }), _jsx(StyledHeaderIcon, { onClick: reOpenDcmt, "$color": TMColors.primaryColor, children: _jsx(TMTooltip, { content: SDKUI_Localizator.ReopenDocument, children: _jsx(IconRefresh, {}) }) })] }), children: error
|
|
131
133
|
? _jsx(ErrorContent, { error: error, isAbortError: isAbortError, onRetry: reOpenDcmt })
|
|
132
134
|
: renderedPreview(dcmtData?.tid, dcmtData?.did, dcmtData?.fileExt, dcmtData?.fileSize, dcmtData?.fileCount, extensionHandler(dcmtData?.fileExt), showPreview, isResizingActive, () => { loadDocumentWithCache(); setShowPreview(true); }, dcmtBlob) }) }));
|
|
133
135
|
};
|
|
@@ -136,40 +138,15 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
|
|
|
136
138
|
const [blobUrl, setBlobUrl] = useState(undefined);
|
|
137
139
|
const [fileType, setFileType] = useState(undefined);
|
|
138
140
|
const [formattedXml, setFormattedXml] = useState(undefined);
|
|
139
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
140
|
-
useEffect(() => {
|
|
141
|
-
const checkIsMobile = () => {
|
|
142
|
-
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
143
|
-
// Only detect actual mobile/tablet devices, NOT desktop browsers
|
|
144
|
-
const isMobileDevice =
|
|
145
|
-
// Traditional mobile detection (phones and tablets)
|
|
146
|
-
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent) ||
|
|
147
|
-
// Additional Android tablet detection (covers tablets in landscape)
|
|
148
|
-
/android.*tablet|android.*mobile/i.test(userAgent) ||
|
|
149
|
-
// Touch-only devices (excludes laptops with touchscreen)
|
|
150
|
-
(('ontouchstart' in window || navigator.maxTouchPoints > 0) &&
|
|
151
|
-
!/Windows NT|Macintosh|Linux/.test(userAgent)) ||
|
|
152
|
-
// Small screen mobile devices only
|
|
153
|
-
(window.screen.width <= 768 && /Mobi|Android/i.test(userAgent));
|
|
154
|
-
setIsMobile(isMobileDevice);
|
|
155
|
-
};
|
|
156
|
-
checkIsMobile();
|
|
157
|
-
// Listen for orientation changes (important for tablets)
|
|
158
|
-
window.addEventListener('orientationchange', checkIsMobile);
|
|
159
|
-
window.addEventListener('resize', checkIsMobile);
|
|
160
|
-
return () => {
|
|
161
|
-
window.removeEventListener('orientationchange', checkIsMobile);
|
|
162
|
-
window.removeEventListener('resize', checkIsMobile);
|
|
163
|
-
};
|
|
164
|
-
}, []);
|
|
165
141
|
useEffect(() => {
|
|
166
142
|
if (fileBlob) {
|
|
167
|
-
|
|
143
|
+
const blobType = fileBlob.type;
|
|
144
|
+
setFileType(blobType);
|
|
168
145
|
setFormattedXml(undefined);
|
|
169
146
|
const fileName = fileBlob.name || '';
|
|
170
147
|
const fileExtension = fileName.split('.').pop()?.toLowerCase() || '';
|
|
171
|
-
const
|
|
172
|
-
if (fileBlob.type.includes("xml") && !
|
|
148
|
+
const isTextBasedFile = ['config', 'cfg', 'sql'].includes(fileExtension);
|
|
149
|
+
if (fileBlob.type.includes("xml") && !isTextBasedFile) {
|
|
173
150
|
fileBlob.text().then((text) => {
|
|
174
151
|
const parser = new DOMParser();
|
|
175
152
|
const xmlDoc = parser.parseFromString(text, "application/xml");
|
|
@@ -188,7 +165,7 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
|
|
|
188
165
|
});
|
|
189
166
|
setBlobUrl(undefined);
|
|
190
167
|
}
|
|
191
|
-
else if (
|
|
168
|
+
else if (isTextBasedFile) {
|
|
192
169
|
fileBlob.text().then((text) => {
|
|
193
170
|
const escapedText = text
|
|
194
171
|
.replace(/&/g, "&")
|
|
@@ -222,41 +199,10 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
|
|
|
222
199
|
if (fileBlob.type.includes('image')) {
|
|
223
200
|
return (_jsx(ImageViewer, { fileBlob: fileBlob, alt: '' }));
|
|
224
201
|
}
|
|
225
|
-
if (fileType === 'application/pdf'
|
|
226
|
-
return
|
|
227
|
-
border: 'none',
|
|
228
|
-
zIndex: 0,
|
|
229
|
-
pointerEvents: isResizingActive === true ? "none" : "auto"
|
|
230
|
-
}, children: _jsxs("div", { style: {
|
|
231
|
-
padding: '40px',
|
|
232
|
-
textAlign: 'center',
|
|
233
|
-
display: 'flex',
|
|
234
|
-
flexDirection: 'column',
|
|
235
|
-
alignItems: 'center',
|
|
236
|
-
justifyContent: 'center',
|
|
237
|
-
height: '100%',
|
|
238
|
-
gap: '20px'
|
|
239
|
-
}, children: [_jsx(IconPreview, { fontSize: 96 }), _jsxs("div", { children: [_jsx("h3", { children: SDKUI_Localizator.PDFDocument }), _jsx("p", { children: SDKUI_Localizator.PreviewNotAvailableOnDevice })] }), _jsxs("div", { style: { display: 'flex', gap: '10px', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'center' }, children: [_jsx("a", { href: blobUrl, download: "document.pdf", style: {
|
|
240
|
-
minWidth: '180px',
|
|
241
|
-
padding: '12px 24px',
|
|
242
|
-
backgroundColor: TMColors.primaryColor,
|
|
243
|
-
color: 'white',
|
|
244
|
-
textDecoration: 'none',
|
|
245
|
-
borderRadius: '4px',
|
|
246
|
-
display: 'inline-block'
|
|
247
|
-
}, children: SDKUI_Localizator.DownloadFile }), _jsx("a", { href: blobUrl, target: "_blank", rel: "noopener noreferrer", style: {
|
|
248
|
-
minWidth: '180px',
|
|
249
|
-
padding: '12px 24px',
|
|
250
|
-
backgroundColor: TMColors.primaryColor,
|
|
251
|
-
color: 'white',
|
|
252
|
-
textDecoration: 'none',
|
|
253
|
-
borderRadius: '4px',
|
|
254
|
-
display: 'inline-block'
|
|
255
|
-
}, children: SDKUI_Localizator.OpenInNewTab })] })] }) }, blobUrl));
|
|
202
|
+
if (fileType === 'application/pdf') {
|
|
203
|
+
return _jsx(TMPdfViewer, { pdfBlob: fileBlob, isResizingActive: isResizingActive, enableFitToWidth: true });
|
|
256
204
|
}
|
|
257
|
-
return (_jsx("iframe", { srcDoc: formattedXml ? `<html><body>${formattedXml}</body></html>` : undefined, src: !formattedXml
|
|
258
|
-
? (fileType === 'application/pdf' ? `${blobUrl}#view=FitH&scrollbar=1` : blobUrl)
|
|
259
|
-
: undefined, title: "File Viewer", width: "100%", height: "100%", style: { border: 'none', zIndex: 0, pointerEvents: isResizingActive === true ? "none" : "auto" } }, blobUrl));
|
|
205
|
+
return (_jsx("iframe", { srcDoc: formattedXml ? `<html><body>${formattedXml}</body></html>` : undefined, src: !formattedXml ? blobUrl : undefined, title: "File Viewer", width: "100%", height: "100%", style: { border: 'none', zIndex: 0, pointerEvents: isResizingActive === true ? "none" : "auto" } }, blobUrl));
|
|
260
206
|
};
|
|
261
207
|
const ImageViewer = ({ fileBlob, alt = 'Image', className }) => {
|
|
262
208
|
const containerRef = useRef(null);
|
|
@@ -475,3 +421,28 @@ const StyledImage = styled.img.attrs(props => ({
|
|
|
475
421
|
pointer-events: none;
|
|
476
422
|
position: absolute;
|
|
477
423
|
`;
|
|
424
|
+
const PDFViewerContainer = styled.div `
|
|
425
|
+
width: 100%;
|
|
426
|
+
height: 100%;
|
|
427
|
+
overflow-y: auto;
|
|
428
|
+
overflow-x: hidden;
|
|
429
|
+
background-color: #f5f5f5;
|
|
430
|
+
|
|
431
|
+
.react-pdf__Document {
|
|
432
|
+
display: flex;
|
|
433
|
+
flex-direction: column;
|
|
434
|
+
align-items: center;
|
|
435
|
+
gap: 10px;
|
|
436
|
+
padding: 10px 0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.react-pdf__Page {
|
|
440
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
441
|
+
margin: 0 auto;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.react-pdf__Page__canvas {
|
|
445
|
+
max-width: 100%;
|
|
446
|
+
height: auto !important;
|
|
447
|
+
}
|
|
448
|
+
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
|
|
4
|
-
import { ContextMenu } from 'devextreme-react';
|
|
5
4
|
import TMRelationViewer from './TMRelationViewer';
|
|
6
|
-
import
|
|
5
|
+
import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
|
|
6
|
+
import { genUniqueId, IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow } from '../../../helper';
|
|
7
7
|
import { FormModes, SearchResultContext } from '../../../ts';
|
|
8
8
|
import { TMColors } from '../../../utils/theme';
|
|
9
9
|
import ShowAlert from '../../base/TMAlert';
|
|
@@ -46,120 +46,105 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
46
46
|
}, []);
|
|
47
47
|
const commandsMenuItems = [
|
|
48
48
|
{
|
|
49
|
-
icon:
|
|
50
|
-
|
|
51
|
-
operationType: 'singleRow',
|
|
49
|
+
icon: _jsx(IconMultipleSelection, { color: allowMultipleSelection ? TMColors.tertiary : TMColors.text_normal }),
|
|
50
|
+
name: "Selezione multipla",
|
|
52
51
|
onClick: () => {
|
|
53
52
|
setAllowMultipleSelection(prev => !prev);
|
|
54
53
|
}
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
|
-
icon:
|
|
58
|
-
|
|
59
|
-
operationType: 'singleRow',
|
|
56
|
+
icon: _jsx(IconCheckFile, {}),
|
|
57
|
+
name: "Consenti dettagli con 0 documenti",
|
|
60
58
|
onClick: () => {
|
|
61
59
|
setShowZeroDcmts(prev => !prev);
|
|
62
60
|
}
|
|
63
61
|
},
|
|
64
62
|
{
|
|
65
|
-
icon:
|
|
66
|
-
|
|
67
|
-
operationType: 'singleRow',
|
|
63
|
+
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
64
|
+
name: SDKUI_Localizator.DcmtsMaster,
|
|
68
65
|
disabled: !focusedItem?.isDcmt || !isForMaster,
|
|
69
66
|
onClick: () => {
|
|
70
67
|
appendMasterDcmts?.(focusedItem?.tid, focusedItem?.did);
|
|
71
68
|
}
|
|
72
69
|
},
|
|
73
70
|
{
|
|
74
|
-
icon:
|
|
75
|
-
|
|
76
|
-
operationType: 'multiRow',
|
|
71
|
+
icon: _jsx(IconMail, {}),
|
|
72
|
+
name: "Invia per posta",
|
|
77
73
|
disabled: false,
|
|
78
74
|
beginGroup: true,
|
|
79
|
-
|
|
75
|
+
submenu: [
|
|
80
76
|
{
|
|
81
|
-
icon:
|
|
82
|
-
|
|
83
|
-
operationType: 'multiRow',
|
|
77
|
+
icon: _jsx(IconMail, {}),
|
|
78
|
+
name: "I documenti selezionati",
|
|
84
79
|
disabled: false,
|
|
85
80
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
86
81
|
},
|
|
87
82
|
{
|
|
88
|
-
icon:
|
|
89
|
-
|
|
90
|
-
operationType: 'multiRow',
|
|
83
|
+
icon: _jsx(IconMail, {}),
|
|
84
|
+
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
91
85
|
disabled: false,
|
|
92
86
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
93
87
|
},
|
|
94
88
|
{
|
|
95
|
-
icon:
|
|
96
|
-
|
|
97
|
-
operationType: 'multiRow',
|
|
89
|
+
icon: _jsx(IconMail, {}),
|
|
90
|
+
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
98
91
|
disabled: false,
|
|
99
92
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
100
93
|
},
|
|
101
94
|
]
|
|
102
95
|
},
|
|
103
96
|
{
|
|
104
|
-
icon:
|
|
105
|
-
|
|
106
|
-
operationType: 'multiRow',
|
|
97
|
+
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
98
|
+
name: "Unisci in un file PDF",
|
|
107
99
|
disabled: false,
|
|
108
|
-
|
|
100
|
+
submenu: [
|
|
109
101
|
{
|
|
110
|
-
icon:
|
|
111
|
-
|
|
112
|
-
operationType: 'multiRow',
|
|
102
|
+
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
103
|
+
name: "I documenti selezionati",
|
|
113
104
|
disabled: false,
|
|
114
105
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
115
106
|
},
|
|
116
107
|
{
|
|
117
|
-
icon:
|
|
118
|
-
|
|
119
|
-
operationType: 'multiRow',
|
|
108
|
+
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
109
|
+
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
120
110
|
disabled: false,
|
|
121
111
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
122
112
|
},
|
|
123
113
|
{
|
|
124
|
-
icon:
|
|
125
|
-
|
|
126
|
-
operationType: 'multiRow',
|
|
114
|
+
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
115
|
+
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
127
116
|
disabled: false,
|
|
128
117
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
129
118
|
},
|
|
130
119
|
]
|
|
131
120
|
},
|
|
132
121
|
{
|
|
133
|
-
icon:
|
|
134
|
-
|
|
135
|
-
operationType: 'multiRow',
|
|
122
|
+
icon: _jsx(IconCopy, {}),
|
|
123
|
+
name: "Copia in una cartella",
|
|
136
124
|
disabled: false,
|
|
137
|
-
|
|
125
|
+
submenu: [
|
|
138
126
|
{
|
|
139
|
-
icon:
|
|
140
|
-
|
|
141
|
-
operationType: 'multiRow',
|
|
127
|
+
icon: _jsx(IconCopy, {}),
|
|
128
|
+
name: "I documenti selezionati",
|
|
142
129
|
disabled: false,
|
|
143
130
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
144
131
|
},
|
|
145
132
|
{
|
|
146
|
-
icon:
|
|
147
|
-
|
|
148
|
-
operationType: 'multiRow',
|
|
133
|
+
icon: _jsx(IconCopy, {}),
|
|
134
|
+
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
149
135
|
disabled: false,
|
|
150
136
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
151
137
|
},
|
|
152
138
|
{
|
|
153
|
-
icon:
|
|
154
|
-
|
|
155
|
-
operationType: 'multiRow',
|
|
139
|
+
icon: _jsx(IconCopy, {}),
|
|
140
|
+
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
156
141
|
disabled: false,
|
|
157
142
|
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
158
143
|
},
|
|
159
144
|
]
|
|
160
145
|
}
|
|
161
146
|
];
|
|
162
|
-
const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(
|
|
147
|
+
const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(TMContextMenu, { items: commandsMenuItems, trigger: 'left', children: _jsx(IconMenuVertical, { color: 'white', cursor: 'pointer' }) })] });
|
|
163
148
|
const getTitle = () => isForMaster ? `${SDKUI_Localizator.DcmtsMaster} - ${dtdMaster?.nameLoc}` : SDKUI_Localizator.DcmtsDetail;
|
|
164
149
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
165
150
|
const tmTreeView = useMemo(() => _jsx(_Fragment, { children: !inputDcmts || inputDcmts.length === 0
|
|
@@ -169,7 +154,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
169
154
|
_jsx(TMRelationViewerWrapper, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, showZeroDcmts: showZeroDcmts,
|
|
170
155
|
// customItemRender={customItemRender}
|
|
171
156
|
allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged]);
|
|
172
|
-
const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, deviceType, allTasks]);
|
|
157
|
+
const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, deviceType, allTasks, handleNavigateToWGs, handleNavigateToDossiers]);
|
|
173
158
|
const initialPanelDimensions = {
|
|
174
159
|
'tmTreeView': { width: '50%', height: '100%' },
|
|
175
160
|
'tmFormOrResult': { width: '50%', height: '100%' },
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DcmtInfo } from "../../../ts";
|
|
2
|
+
interface TMDcmtCheckoutInfoFormProps {
|
|
3
|
+
dtdName: string;
|
|
4
|
+
selectedDcmtOrFocused: DcmtInfo;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const TMDcmtCheckoutInfoForm: (props: TMDcmtCheckoutInfoFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TMDcmtCheckoutInfoForm;
|
|
@@ -5,14 +5,14 @@ import { IconBxInfo, IconFileDots, IconFolder, SDKUI_Globals, SDKUI_Localizator
|
|
|
5
5
|
import { FormModes } from "../../../ts";
|
|
6
6
|
import { ResultTypes, ValidationItem } from "@topconsultnpm/sdk-ts";
|
|
7
7
|
import { SaveFormOptions, useSaveForm } from "../../../hooks/useForm";
|
|
8
|
-
import { getCicoDownloadFileName,
|
|
8
|
+
import { getCicoDownloadFileName, updateCicoCheckoutStorageItem } from "../../../helper/checkinCheckoutManager";
|
|
9
9
|
import { TMColors } from "../../../utils/theme";
|
|
10
10
|
import TMLayoutContainer, { TMLayoutItem } from "../../base/TMLayout";
|
|
11
11
|
import TMTooltip from "../../base/TMTooltip";
|
|
12
12
|
import TMTextBox from "../../editors/TMTextBox";
|
|
13
13
|
import ShowAlert from "../../base/TMAlert";
|
|
14
14
|
import { TMExceptionBoxManager } from "../../base/TMPopUp";
|
|
15
|
-
const
|
|
15
|
+
const TMDcmtCheckoutInfoForm = (props) => {
|
|
16
16
|
const { dtdName, selectedDcmtOrFocused, onClose } = props;
|
|
17
17
|
const [initialDcmtCheckoutFolder, setInitialDcmtCheckoutFolder] = useState("");
|
|
18
18
|
const [initialDcmtCheckoutName, setInitialDcmtCheckoutName] = useState("");
|
|
@@ -57,13 +57,8 @@ const TMSearchResultCheckoutInfoForm = (props) => {
|
|
|
57
57
|
// Check: formData must exist, selectedDcmtOrFocused.TID and selectedDcmtOrFocused.DID must exist, and at least one of checkoutFolder or checkoutName must be filled
|
|
58
58
|
if (formData && selectedDcmtOrFocused.TID && selectedDcmtOrFocused.DID) {
|
|
59
59
|
// Create a new draft checkout item with TID, DID, and folder/name values
|
|
60
|
-
const newItem = {
|
|
61
|
-
|
|
62
|
-
DID: selectedDcmtOrFocused.DID.toString(),
|
|
63
|
-
checkoutFolder: formData.checkoutFolder ?? "",
|
|
64
|
-
checkoutName: formData.checkoutName ?? ""
|
|
65
|
-
};
|
|
66
|
-
updateCheckoutItem(newItem, "dcmtInfo", "addOrUpdate");
|
|
60
|
+
const newItem = { TID: selectedDcmtOrFocused.TID.toString(), DID: selectedDcmtOrFocused.DID.toString(), checkoutFolder: formData.checkoutFolder ?? "", checkoutName: formData.checkoutName ?? "" };
|
|
61
|
+
updateCicoCheckoutStorageItem(newItem, "dcmtInfo", "addOrUpdate");
|
|
67
62
|
onClose();
|
|
68
63
|
ShowAlert({ mode: 'success', title: SDKUI_Localizator.CheckoutInfo, message: SDKUI_Localizator.OperationSuccess, duration: 3000 });
|
|
69
64
|
}
|
|
@@ -131,4 +126,4 @@ const TMSearchResultCheckoutInfoForm = (props) => {
|
|
|
131
126
|
e.currentTarget.style.color = TMColors.primary;
|
|
132
127
|
}, children: SDKUI_Localizator.Cancel })] })] }) }) }) }) });
|
|
133
128
|
};
|
|
134
|
-
export default
|
|
129
|
+
export default TMDcmtCheckoutInfoForm;
|
|
@@ -3,8 +3,8 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { SharingModes, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts';
|
|
5
5
|
import { LocalizeSharingModes } from '../../../helper/Enum_Localizator';
|
|
6
|
-
import
|
|
7
|
-
import { SDKUI_Localizator, Globalization,
|
|
6
|
+
import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
|
|
7
|
+
import { SDKUI_Localizator, Globalization, IconStar, IconDelete, IconDashboard, IconSavedQuery, IconApply, IconInfo, IconCloseOutline } from '../../../helper';
|
|
8
8
|
import { TMColors } from '../../../utils/theme';
|
|
9
9
|
import ShowAlert from '../../base/TMAlert';
|
|
10
10
|
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
@@ -81,45 +81,38 @@ export const getTooltipBySqd = (sqd) => {
|
|
|
81
81
|
return (_jsxs("div", { style: { textAlign: "left", fontSize: '1rem', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: [_jsx(IconSavedQuery, { color: getSharingModeColor(sqd.sharingMode), fontSize: 20, style: { flexShrink: 0 } }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs("div", { children: ["ID: ", sqd.id] }), _jsxs("div", { children: ["Master TID: ", sqd.masterTID] }), sqd.description && _jsx("div", { children: `${SDKUI_Localizator.Description}: ${sqd.description}` })] })] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.OwnerName, ": ", sqd.ownerName, " (", sqd.ownerID, ")"] }), _jsx("div", { children: LocalizeSharingModes(sqd.sharingMode) }), _jsxs("div", { children: ["Default: ", sqd.isDefault == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Filtro semplice", ": ", sqd.isEasyWhere == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsxs("div", { children: ["Esegui ricerca immediatamente", ": ", sqd.runSearchWhenSelected == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No] }), _jsx("hr", {}), _jsxs("div", { children: [SDKUI_Localizator.CreationTime, ": ", Globalization.getDateTimeDisplayValue(sqd.creationTime)] }), _jsxs("div", { children: [SDKUI_Localizator.LastUpdateTime, ": ", Globalization.getDateTimeDisplayValue(sqd.lastUpdateTime)] })] }));
|
|
82
82
|
};
|
|
83
83
|
const initialSQDsMaxItems = 12;
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
] : [])
|
|
109
|
-
], target: `#sqd-item-${sqd.id}`, onItemClick: (e) => {
|
|
110
|
-
if (e.itemIndex == 0)
|
|
111
|
-
setDefaultAsync?.(sqd);
|
|
112
|
-
else if (e.itemIndex == 1)
|
|
113
|
-
deleteAsync?.(sqd);
|
|
114
|
-
else if (e.itemIndex == 2)
|
|
115
|
-
favManageAsync?.(sqd);
|
|
116
|
-
} });
|
|
84
|
+
const getContextMenuItems = (sqd, manageDefault, isMobile, deleteAsync, setDefaultAsync, favManageAsync, setInfoSQD) => [
|
|
85
|
+
...(manageDefault ? [{
|
|
86
|
+
name: SDKUI_Localizator.SetAsDefault2,
|
|
87
|
+
icon: _jsx(IconStar, { color: 'rgb(248, 215, 117)' }),
|
|
88
|
+
onClick: () => setDefaultAsync(sqd)
|
|
89
|
+
}] : []),
|
|
90
|
+
{
|
|
91
|
+
name: SDKUI_Localizator.Delete,
|
|
92
|
+
disabled: (sqd.id == 1),
|
|
93
|
+
icon: _jsx(IconDelete, {}),
|
|
94
|
+
onClick: () => deleteAsync(sqd)
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: SDKUI_Localizator.AddToHomePage,
|
|
98
|
+
disabled: (sqd.id == 1),
|
|
99
|
+
icon: _jsx(IconDashboard, {}),
|
|
100
|
+
onClick: () => favManageAsync?.(sqd)
|
|
101
|
+
},
|
|
102
|
+
...(isMobile ? [{
|
|
103
|
+
name: SDKUI_Localizator.About,
|
|
104
|
+
icon: _jsx(IconInfo, { color: TMColors.info }),
|
|
105
|
+
onClick: () => { setInfoSQD?.(sqd); }
|
|
106
|
+
}] : [])
|
|
107
|
+
];
|
|
117
108
|
const TMSavedQuerySelector = React.memo(({ items, selectedId, allowShowSearch = true, height, manageDefault = true, onItemClick, onDeleted, onFavoritesAdded, onRefreshData }) => {
|
|
118
109
|
const [dataSource, setDataSource] = useState([]);
|
|
119
110
|
const [selectedItem, setSelectedItem] = useState();
|
|
120
111
|
const [searchText, setSearchText] = useState('');
|
|
121
112
|
const [showAllRoot, setShowAllRoot] = useState(false);
|
|
122
113
|
const [infoSQD, setInfoSQD] = useState();
|
|
114
|
+
// Context menu state
|
|
115
|
+
const [contextMenuState, setContextMenuState] = useState({ visible: false, position: { x: 0, y: 0 }, sqd: null });
|
|
123
116
|
const deviceType = useDeviceType();
|
|
124
117
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
125
118
|
const panelRef = useOutsideClick(() => {
|
|
@@ -187,40 +180,52 @@ const TMSavedQuerySelector = React.memo(({ items, selectedId, allowShowSearch =
|
|
|
187
180
|
overflow: 'auto'
|
|
188
181
|
}, children: dataSource.slice(0, showAllRoot || searchText.length > 0 ? dataSource.length : initialSQDsMaxItems).filter(o => searchText.length <= 0 || (searchText.length > 0 && o.name?.toLocaleLowerCase().includes(searchText.toLocaleLowerCase())) || o.description?.toLocaleLowerCase().includes(searchText.toLocaleLowerCase())).map((sqd, index) => {
|
|
189
182
|
const isCurrent = selectedItem?.id == sqd.id;
|
|
190
|
-
return (
|
|
183
|
+
return (_jsx(StyledSqdItem, { id: `sqd-item-${sqd.id}`, "$isMobile": isMobile, onClick: () => {
|
|
191
184
|
setSelectedItem(sqd);
|
|
192
185
|
onItemClick?.(sqd);
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
186
|
+
}, onContextMenu: (e) => {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
e.stopPropagation();
|
|
189
|
+
setContextMenuState({
|
|
190
|
+
visible: true,
|
|
191
|
+
position: { x: e.clientX, y: e.clientY },
|
|
192
|
+
sqd: sqd
|
|
193
|
+
});
|
|
194
|
+
}, children: _jsxs(StyledDivHorizontal, { style: { alignItems: 'center', gap: 8, width: '100%' }, children: [!isMobile && (_jsx("span", { className: "info-icon", style: {
|
|
195
|
+
marginRight: 4,
|
|
196
|
+
display: 'flex',
|
|
197
|
+
alignItems: 'center'
|
|
198
|
+
}, children: _jsx(TMTooltip, { content: getTooltipBySqd(sqd), children: _jsx(IconInfo, { color: TMColors.primaryColor }) }) })), _jsxs("div", { style: {
|
|
199
|
+
flex: 1,
|
|
200
|
+
display: 'flex',
|
|
201
|
+
alignItems: 'center',
|
|
202
|
+
justifyContent: 'center',
|
|
203
|
+
minWidth: 0
|
|
204
|
+
}, children: [_jsx("p", { style: {
|
|
205
|
+
fontSize: '1rem',
|
|
206
|
+
fontWeight: sqd.id === 1 ? 600 : 'normal',
|
|
207
|
+
whiteSpace: 'nowrap',
|
|
208
|
+
overflow: 'hidden',
|
|
209
|
+
textOverflow: 'ellipsis',
|
|
210
|
+
color: TMColors.primaryColor,
|
|
211
|
+
paddingRight: '15px'
|
|
212
|
+
}, children: sqd.name }), manageDefault && sqd.isDefault == 1 && _jsx(IconStar, { fontSize: 16, color: 'rgb(248, 215, 117)' })] }), _jsx("span", { style: {
|
|
213
|
+
width: 24,
|
|
214
|
+
height: 24,
|
|
215
|
+
borderRadius: 24,
|
|
216
|
+
display: 'flex',
|
|
217
|
+
alignItems: 'center',
|
|
218
|
+
justifyContent: 'center',
|
|
219
|
+
fontSize: '1rem',
|
|
220
|
+
fontWeight: 'bold',
|
|
221
|
+
marginLeft: 8,
|
|
222
|
+
visibility: isCurrent ? 'visible' : 'hidden'
|
|
223
|
+
}, children: _jsx(IconApply, { fontSize: 24, color: 'green' }) })] }) }, sqd.id));
|
|
223
224
|
}) }), dataSource.length > initialSQDsMaxItems && searchText.length <= 0 &&
|
|
224
|
-
_jsx("div", { style: { display: 'flex', justifyContent: 'flex-end', padding: '10px', position: 'relative' }, children: _jsx(TMShowAllOrMaxItemsButton, { showAll: showAllRoot, dataSourceLength: dataSource.length, onClick: () => { setShowAllRoot(!showAllRoot); } }) }),
|
|
225
|
+
_jsx("div", { style: { display: 'flex', justifyContent: 'flex-end', padding: '10px', position: 'relative' }, children: _jsx(TMShowAllOrMaxItemsButton, { showAll: showAllRoot, dataSourceLength: dataSource.length, onClick: () => { setShowAllRoot(!showAllRoot); } }) }), _jsx(TMContextMenu, { target: "[id^='sqd-item-']", items: contextMenuState.sqd ? getContextMenuItems(contextMenuState.sqd, manageDefault, isMobile, deleteSQDAsync, setDefaultSQDAsync, favManageSQDAsync, setInfoSQD) : [], externalControl: {
|
|
226
|
+
visible: contextMenuState.visible,
|
|
227
|
+
position: contextMenuState.position,
|
|
228
|
+
onClose: () => setContextMenuState(prev => ({ ...prev, visible: false, sqd: null }))
|
|
229
|
+
} }), _jsxs(StyledOffCanvasPanel, { ref: panelRef, "$isOpen": isMobile && infoSQD !== undefined, children: [_jsxs(StyledDivHorizontal, { style: { gap: 10, padding: '10px 8px', width: '100%', alignItems: 'center' }, children: [_jsx("p", { style: { fontSize: '1.1rem', fontWeight: 'bold' }, children: `${SDK_Localizator.SavedQuery} - ${SDKUI_Localizator.About}` }), _jsx(IconCloseOutline, { style: { marginLeft: 'auto', cursor: 'pointer' }, onClick: () => setInfoSQD(undefined) })] }), getTooltipBySqd(infoSQD)] })] }));
|
|
225
230
|
});
|
|
226
231
|
export default TMSavedQuerySelector;
|