@topconsultnpm/sdkui-react 6.21.0-dev3.9 → 6.21.0-dev4.10
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.js +28 -2
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
- package/lib/components/base/TMAreaManager.js +11 -0
- package/lib/components/base/TMDataGrid.js +12 -2
- package/lib/components/base/TMDataGridExportForm.js +19 -8
- package/lib/components/base/TMModal.js +2 -2
- package/lib/components/base/TMPopUp.d.ts +1 -0
- package/lib/components/base/TMPopUp.js +59 -2
- package/lib/components/base/TMSpinner.d.ts +4 -2
- package/lib/components/base/TMSpinner.js +33 -6
- package/lib/components/choosers/TMDistinctValues.js +1 -1
- package/lib/components/choosers/TMGroupChooser.js +1 -1
- package/lib/components/editors/TMEditorStyled.d.ts +4 -4
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -0
- package/lib/components/editors/TMFormulaEditor.js +98 -49
- package/lib/components/editors/TMMetadataValues.js +23 -6
- package/lib/components/editors/TMTextBox.d.ts +1 -0
- package/lib/components/editors/TMTextBox.js +2 -1
- package/lib/components/features/documents/TMDcmtForm.d.ts +2 -0
- package/lib/components/features/documents/TMDcmtForm.js +2 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +7 -4
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +91 -48
- package/lib/components/features/documents/TMRelationViewer.js +58 -5
- package/lib/components/features/documents/mergePdfUtils.d.ts +52 -0
- package/lib/components/features/documents/mergePdfUtils.js +268 -0
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +17 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +17 -0
- package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
- package/lib/components/features/search/TMSearch.d.ts +2 -0
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
- package/lib/components/features/search/TMSearchResult.d.ts +3 -0
- package/lib/components/features/search/TMSearchResult.js +77 -22
- package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
- package/lib/components/features/search/metadataFormHelper.js +77 -0
- package/lib/components/forms/Login/TMLoginForm.js +15 -3
- package/lib/components/wizard/TMWizard.d.ts +1 -0
- package/lib/components/wizard/TMWizard.js +5 -3
- package/lib/helper/Enum_Localizator.js +2 -0
- package/lib/helper/SDKUI_Localizator.d.ts +14 -0
- package/lib/helper/SDKUI_Localizator.js +152 -12
- package/lib/helper/certificateImportHelper.d.ts +43 -0
- package/lib/helper/certificateImportHelper.js +403 -0
- package/lib/helper/checkinCheckoutManager.js +10 -2
- package/lib/helper/helpers.d.ts +2 -1
- package/lib/helper/helpers.js +1 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useDataUserIdItem.js +1 -1
- package/lib/hooks/useDcmtOperations.d.ts +2 -1
- package/lib/hooks/useDcmtOperations.js +177 -4
- package/lib/hooks/useDocumentOperations.d.ts +2 -0
- package/lib/hooks/useDocumentOperations.js +47 -6
- package/lib/services/platform_services.d.ts +4 -4
- package/lib/ts/types.d.ts +3 -1
- package/lib/ts/types.js +2 -0
- package/package.json +13 -7
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { OrderByItem, SDK_Localizator } from "@topconsultnpm/sdk-ts";
|
|
4
|
+
import { IconAddCircleOutline, IconApply, IconClear, IconDelete, IconDraggabledots, IconUndo, SDKUI_Localizator } from "../../../helper";
|
|
5
|
+
import TMToppyMessage from "../../../helper/TMToppyMessage";
|
|
6
|
+
import { ButtonNames, TMMessageBoxManager } from "../../base/TMPopUp";
|
|
7
|
+
import { TMColors } from "../../../utils/theme";
|
|
8
|
+
import { StyledToolbarForm } from "../../base/Styled";
|
|
9
|
+
import TMButton from "../../base/TMButton";
|
|
10
|
+
import TMModal from "../../base/TMModal";
|
|
11
|
+
import { TMMetadataChooserForm } from "../../choosers/TMMetadataChooser";
|
|
12
|
+
import TMDropDown from "../../editors/TMDropDown";
|
|
13
|
+
import { TMMetadataIcon } from "../../viewers/TMMidViewer";
|
|
14
|
+
import { loadMetadataFromQd, removeDuplicatesByTidMid, areArraysEqual } from "./metadataFormHelper";
|
|
15
|
+
const TMMetadataSorterForm = (props) => {
|
|
16
|
+
const { qd, selectedOrderByItems, allowSysMetadata = true, filterMetadata, onClose, onChoose } = props;
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// STATE
|
|
19
|
+
// =============================================================================
|
|
20
|
+
// Stato iniziale degli OrderByItem (per confronto isModified)
|
|
21
|
+
const initialOrderByItemsRef = useRef((selectedOrderByItems ?? []).map(item => {
|
|
22
|
+
const newItem = new OrderByItem();
|
|
23
|
+
newItem.tid = item.tid;
|
|
24
|
+
newItem.mid = item.mid;
|
|
25
|
+
newItem.asc = item.asc ?? true;
|
|
26
|
+
return newItem;
|
|
27
|
+
}));
|
|
28
|
+
// Lista degli OrderByItem correnti (inizializzata da selectedOrderByItems)
|
|
29
|
+
const [orderByItems, setOrderByItems] = useState(() => {
|
|
30
|
+
// Clona gli OrderByItem iniziali per evitare mutazioni
|
|
31
|
+
return (selectedOrderByItems ?? []).map(item => {
|
|
32
|
+
const newItem = new OrderByItem();
|
|
33
|
+
newItem.tid = item.tid;
|
|
34
|
+
newItem.mid = item.mid;
|
|
35
|
+
newItem.asc = item.asc ?? true;
|
|
36
|
+
return newItem;
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
// Calcola se ci sono modifiche rispetto allo stato iniziale
|
|
40
|
+
const isModified = useMemo(() => {
|
|
41
|
+
return !areArraysEqual(orderByItems, initialOrderByItemsRef.current, (a, b) => a.asc === b.asc);
|
|
42
|
+
}, [orderByItems]);
|
|
43
|
+
// Lista "piatta" di tutti i metadati estratti dai DTD, con chiave univoca
|
|
44
|
+
const [metadataList, setMetadataList] = useState([]);
|
|
45
|
+
// Flag di caricamento
|
|
46
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
47
|
+
// Flag per mostrare il TMMetadataChooserForm
|
|
48
|
+
const [showMetadataChooser, setShowMetadataChooser] = useState(false);
|
|
49
|
+
// Item in fase di drag
|
|
50
|
+
const [draggingItem, setDraggingItem] = useState(undefined);
|
|
51
|
+
// =============================================================================
|
|
52
|
+
// MEMOIZZAZIONI per evitare re-render del TMMetadataChooserForm
|
|
53
|
+
// =============================================================================
|
|
54
|
+
// Lista di TID_MID già selezionati (per escluderli dal chooser)
|
|
55
|
+
const selectedIDs = useMemo(() => orderByItems.map(oi => ({ tid: oi.tid, mid: oi.mid })), [orderByItems]);
|
|
56
|
+
// Callback per chiudere il chooser
|
|
57
|
+
const handleCloseChooser = useCallback(() => {
|
|
58
|
+
setShowMetadataChooser(false);
|
|
59
|
+
}, []);
|
|
60
|
+
// =============================================================================
|
|
61
|
+
// EFFECT: Carica i metadati al mount
|
|
62
|
+
// =============================================================================
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const load = async () => {
|
|
65
|
+
setIsLoading(true);
|
|
66
|
+
try {
|
|
67
|
+
const { metadata } = await loadMetadataFromQd(qd, filterMetadata);
|
|
68
|
+
setMetadataList(metadata);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.error("Errore nel caricamento dei metadati:", error);
|
|
72
|
+
setMetadataList([]);
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
setIsLoading(false);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
load();
|
|
79
|
+
}, [qd, filterMetadata]);
|
|
80
|
+
// =============================================================================
|
|
81
|
+
// HELPER: Trova il MetadataDescriptor per un OrderByItem
|
|
82
|
+
// =============================================================================
|
|
83
|
+
const getMetadataForOrderByItem = useCallback((item) => {
|
|
84
|
+
return metadataList.find(md => md.customData1 === item.tid && md.id === item.mid);
|
|
85
|
+
}, [metadataList]);
|
|
86
|
+
// =============================================================================
|
|
87
|
+
// HANDLER: Conferma la scelta dal chooser (sincronizza la lista completa)
|
|
88
|
+
// =============================================================================
|
|
89
|
+
const handleChooseFromChooser = useCallback((tid_mids) => {
|
|
90
|
+
// Se la lista è vuota o undefined, rimuovi tutti
|
|
91
|
+
if (!tid_mids || tid_mids.length === 0) {
|
|
92
|
+
setOrderByItems([]);
|
|
93
|
+
setShowMetadataChooser(false);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
setOrderByItems(prev => {
|
|
97
|
+
// Filtra quelli esistenti che sono ancora selezionati (mantenendo ordine e impostazioni asc/desc)
|
|
98
|
+
const kept = prev.filter(oi => tid_mids.some(tm => tm.tid === oi.tid && tm.mid === oi.mid));
|
|
99
|
+
// Trova i nuovi da aggiungere
|
|
100
|
+
const newItems = [];
|
|
101
|
+
for (const tm of tid_mids) {
|
|
102
|
+
const exists = prev.some(oi => oi.tid === tm.tid && oi.mid === tm.mid);
|
|
103
|
+
if (!exists) {
|
|
104
|
+
const newItem = new OrderByItem();
|
|
105
|
+
newItem.tid = tm.tid;
|
|
106
|
+
newItem.mid = tm.mid;
|
|
107
|
+
newItem.asc = true;
|
|
108
|
+
newItems.push(newItem);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return removeDuplicatesByTidMid([...kept, ...newItems]);
|
|
112
|
+
});
|
|
113
|
+
setShowMetadataChooser(false);
|
|
114
|
+
}, []);
|
|
115
|
+
// =============================================================================
|
|
116
|
+
// HANDLER: Rimuove un ordinamento
|
|
117
|
+
// =============================================================================
|
|
118
|
+
const handleRemoveOrderBy = useCallback((index) => {
|
|
119
|
+
setOrderByItems(prev => prev.filter((_, i) => i !== index));
|
|
120
|
+
}, []);
|
|
121
|
+
// =============================================================================
|
|
122
|
+
// HANDLER: Toggle ascendente/discendente
|
|
123
|
+
// =============================================================================
|
|
124
|
+
const handleChangeAsc = useCallback((index, asc) => {
|
|
125
|
+
setOrderByItems(prev => prev.map((item, i) => {
|
|
126
|
+
if (i !== index)
|
|
127
|
+
return item;
|
|
128
|
+
const newItem = new OrderByItem();
|
|
129
|
+
newItem.tid = item.tid;
|
|
130
|
+
newItem.mid = item.mid;
|
|
131
|
+
newItem.asc = asc;
|
|
132
|
+
return newItem;
|
|
133
|
+
}));
|
|
134
|
+
}, []);
|
|
135
|
+
// =============================================================================
|
|
136
|
+
// DRAG & DROP HANDLERS
|
|
137
|
+
// =============================================================================
|
|
138
|
+
const handleDragStart = useCallback((e, item) => {
|
|
139
|
+
// Previeni il drag se il target è l'icona elimina o il dropdown
|
|
140
|
+
const target = e.target;
|
|
141
|
+
if (target.closest('[data-no-drag="true"]')) {
|
|
142
|
+
e.preventDefault();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
setDraggingItem(item);
|
|
146
|
+
e.dataTransfer.setData('text/plain', '');
|
|
147
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
148
|
+
}, []);
|
|
149
|
+
const handleDragEnd = useCallback(() => {
|
|
150
|
+
setDraggingItem(undefined);
|
|
151
|
+
}, []);
|
|
152
|
+
const handleDragOver = useCallback((e) => {
|
|
153
|
+
e.preventDefault();
|
|
154
|
+
e.dataTransfer.dropEffect = 'move';
|
|
155
|
+
}, []);
|
|
156
|
+
const handleDrop = useCallback((e, targetItem) => {
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
if (!draggingItem)
|
|
159
|
+
return;
|
|
160
|
+
const currentIndex = orderByItems.indexOf(draggingItem);
|
|
161
|
+
const targetIndex = orderByItems.indexOf(targetItem);
|
|
162
|
+
if (currentIndex === -1 || targetIndex === -1 || currentIndex === targetIndex) {
|
|
163
|
+
setDraggingItem(undefined);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const listCopy = [...orderByItems];
|
|
167
|
+
listCopy.splice(currentIndex, 1);
|
|
168
|
+
listCopy.splice(targetIndex, 0, draggingItem);
|
|
169
|
+
setOrderByItems(listCopy);
|
|
170
|
+
setDraggingItem(undefined);
|
|
171
|
+
}, [draggingItem, orderByItems]);
|
|
172
|
+
// =============================================================================
|
|
173
|
+
// HANDLER: Rollback allo stato iniziale
|
|
174
|
+
// =============================================================================
|
|
175
|
+
const handleRollback = useCallback(() => {
|
|
176
|
+
setOrderByItems(initialOrderByItemsRef.current.map(item => {
|
|
177
|
+
const newItem = new OrderByItem();
|
|
178
|
+
newItem.tid = item.tid;
|
|
179
|
+
newItem.mid = item.mid;
|
|
180
|
+
newItem.asc = item.asc;
|
|
181
|
+
return newItem;
|
|
182
|
+
}));
|
|
183
|
+
}, []);
|
|
184
|
+
// =============================================================================
|
|
185
|
+
// HANDLER: Chiusura con conferma se modificato
|
|
186
|
+
// =============================================================================
|
|
187
|
+
const confirmCloseContainerId = "TMMetadataSorterFormConfirmClose";
|
|
188
|
+
const handleClose = useCallback(() => {
|
|
189
|
+
if (!isModified) {
|
|
190
|
+
onClose();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
TMMessageBoxManager.show({
|
|
194
|
+
parentId: confirmCloseContainerId,
|
|
195
|
+
message: SDKUI_Localizator.ConfirmOnCancel,
|
|
196
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
197
|
+
onButtonClick: (buttonClicked) => {
|
|
198
|
+
if (buttonClicked === ButtonNames.YES) {
|
|
199
|
+
onClose();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}, [isModified, onClose]);
|
|
204
|
+
// =============================================================================
|
|
205
|
+
// HANDLER: Conferma la selezione
|
|
206
|
+
// =============================================================================
|
|
207
|
+
const handleConfirm = useCallback(() => {
|
|
208
|
+
onChoose?.(orderByItems.length > 0 ? orderByItems : undefined);
|
|
209
|
+
onClose();
|
|
210
|
+
}, [orderByItems, onChoose, onClose]);
|
|
211
|
+
// =============================================================================
|
|
212
|
+
// RENDER
|
|
213
|
+
// =============================================================================
|
|
214
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMModal, { title: `${SDKUI_Localizator.Configure} - ${SDK_Localizator.QueryOrderBy}${orderByItems.length > 0 ? ` (${orderByItems.length})` : ''}`, width: "600px", height: "500px", onClose: handleClose, hidePopup: false, askClosingConfirm: isModified, children: [_jsx("div", { id: confirmCloseContainerId }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', gap: '10px' }, children: [_jsxs(StyledToolbarForm, { children: [_jsx(TMButton, { caption: SDKUI_Localizator.Confirm, icon: _jsx(IconApply, {}), btnStyle: "toolbar", color: "success", disabled: !isModified, onClick: handleConfirm }), _jsx(TMButton, { caption: SDKUI_Localizator.Undo, icon: _jsx(IconUndo, {}), btnStyle: "toolbar", color: "tertiary", disabled: !isModified, onClick: handleRollback }), _jsx(TMButton, { caption: SDKUI_Localizator.Add, icon: _jsx(IconAddCircleOutline, {}), btnStyle: "toolbar", onClick: () => setShowMetadataChooser(true) }), _jsx(TMButton, { caption: SDKUI_Localizator.Clear, icon: _jsx(IconClear, {}), btnStyle: "toolbar", disabled: orderByItems.length === 0, onClick: () => setOrderByItems([]) })] }), _jsxs("div", { style: {
|
|
215
|
+
flex: 1,
|
|
216
|
+
overflow: 'auto',
|
|
217
|
+
border: `1px solid ${TMColors.border_normal}`,
|
|
218
|
+
borderRadius: '4px',
|
|
219
|
+
padding: '5px'
|
|
220
|
+
}, children: [isLoading && _jsxs("p", { style: { textAlign: 'center', padding: '20px' }, children: [SDKUI_Localizator.Loading, "..."] }), !isLoading && orderByItems.length === 0 && (_jsx(TMToppyMessage, { message: SDKUI_Localizator.NoSortingApplied, titleTooltip: SDKUI_Localizator.NoSortingApplied })), !isLoading && orderByItems.length > 0 && (_jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '2px' }, children: orderByItems.map((item, index) => {
|
|
221
|
+
const md = getMetadataForOrderByItem(item);
|
|
222
|
+
const isDragging = draggingItem === item;
|
|
223
|
+
return (_jsxs("div", { draggable: true, onDragStart: (e) => handleDragStart(e, item), onDragEnd: handleDragEnd, onDragOver: handleDragOver, onDrop: (e) => handleDrop(e, item), style: {
|
|
224
|
+
display: 'flex',
|
|
225
|
+
alignItems: 'center',
|
|
226
|
+
gap: '6px',
|
|
227
|
+
padding: '4px 8px',
|
|
228
|
+
backgroundColor: isDragging ? TMColors.primary_container : TMColors.default_background,
|
|
229
|
+
borderRadius: '3px',
|
|
230
|
+
border: `1px solid ${isDragging ? TMColors.primaryColor : TMColors.border_normal}`,
|
|
231
|
+
minHeight: '32px',
|
|
232
|
+
cursor: 'grab',
|
|
233
|
+
transition: 'all 0.2s ease',
|
|
234
|
+
transform: isDragging ? 'scale(1.02)' : 'scale(1)',
|
|
235
|
+
boxShadow: isDragging ? '0 4px 12px rgba(0,0,0,0.15)' : 'none',
|
|
236
|
+
opacity: isDragging ? 0.9 : 1,
|
|
237
|
+
}, children: [_jsx("div", { style: { display: 'flex', cursor: 'grab' }, children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), _jsx(TMMetadataIcon, { tid: item.tid ?? 0, md: md }), _jsx("span", { style: { flex: 1, fontSize: '13px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, children: md?.name ?? `MID: ${item.mid}` }), _jsx("div", { "data-no-drag": "true", onMouseDown: (e) => e.stopPropagation(), children: _jsx(TMDropDown, { width: "175px", height: "28px", value: item.asc ? 'asc' : 'desc', dataSource: [
|
|
238
|
+
{ value: 'asc', display: SDKUI_Localizator.ValueAscending },
|
|
239
|
+
{ value: 'desc', display: SDKUI_Localizator.ValueDescending }
|
|
240
|
+
], onValueChanged: (e) => handleChangeAsc(index, e.target.value === 'asc') }) }), _jsx("div", { "data-no-drag": "true", onMouseDown: (e) => e.stopPropagation(), children: _jsx(TMButton, { caption: SDKUI_Localizator.Remove, icon: _jsx(IconDelete, { color: TMColors.error }), btnStyle: "icon", onClick: () => handleRemoveOrderBy(index) }) })] }, `${item.tid}_${item.mid}_${index}`));
|
|
241
|
+
}) }))] })] })] }), showMetadataChooser && (_jsx(TMMetadataChooserForm, { allowMultipleSelection: true, height: "600px", width: "700px", allowSysMetadata: allowSysMetadata, filterMetadata: filterMetadata, qd: qd, selectedIDs: selectedIDs, onClose: handleCloseChooser, onChoose: handleChooseFromChooser }))] }));
|
|
242
|
+
};
|
|
243
|
+
export default TMMetadataSorterForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SavedQueryDescriptor, DcmtTypeDescriptor, TaskDescriptor, ObjectRef, HomeBlogPost } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { IntesiCertificateData } from '../../../helper';
|
|
3
4
|
import { DcmtInfo, TaskContext } from '../../../ts';
|
|
4
5
|
import { TMSearchResultFloatingActionConfig } from './TMSearchResultFloatingActionButton';
|
|
5
6
|
interface ITMSearchProps {
|
|
@@ -42,6 +43,7 @@ interface ITMSearchProps {
|
|
|
42
43
|
onReferenceClick?: (ref: ObjectRef) => void;
|
|
43
44
|
inputDID?: number;
|
|
44
45
|
formAutoOpen?: boolean;
|
|
46
|
+
fetchRemoteCertificates?: (email: string) => Promise<IntesiCertificateData[]>;
|
|
45
47
|
}
|
|
46
48
|
declare const TMSearch: React.FunctionComponent<ITMSearchProps>;
|
|
47
49
|
export default TMSearch;
|
|
@@ -20,7 +20,7 @@ var TMSearchViews;
|
|
|
20
20
|
TMSearchViews[TMSearchViews["Search"] = 0] = "Search";
|
|
21
21
|
TMSearchViews[TMSearchViews["Result"] = 1] = "Result";
|
|
22
22
|
})(TMSearchViews || (TMSearchViews = {}));
|
|
23
|
-
const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, openInOffice, isVisible, inputTID, inputSqdID, inputMids, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, floatingActionConfig, onFileOpened, onRefreshAfterAddDcmtToFavs, onTaskCreateRequest, openWGsCopyMoveForm, editPdfForm = false, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, showTodoDcmtForm, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, passToArchiveCallback, onCurrentTIDChangedCallback, onlyShowSearchQueryPanel, onReferenceClick, refreshFavoriteSavedQueries, inputDID, formAutoOpen }) => {
|
|
23
|
+
const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, openInOffice, isVisible, inputTID, inputSqdID, inputMids, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, floatingActionConfig, onFileOpened, onRefreshAfterAddDcmtToFavs, onTaskCreateRequest, openWGsCopyMoveForm, editPdfForm = false, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, showTodoDcmtForm, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, passToArchiveCallback, onCurrentTIDChangedCallback, onlyShowSearchQueryPanel, onReferenceClick, refreshFavoriteSavedQueries, inputDID, formAutoOpen, fetchRemoteCertificates }) => {
|
|
24
24
|
const [allSQDs, setAllSQDs] = useState([]);
|
|
25
25
|
const [filteredByTIDSQDs, setFilteredByTIDSQDs] = useState([]);
|
|
26
26
|
const [currentSQD, setCurrentSQD] = useState();
|
|
@@ -266,7 +266,7 @@ const TMSearch = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTask
|
|
|
266
266
|
toolbarOptions: { icon: _jsx(IconSavedQuery, { fontSize: 24 }), visible: true, orderNumber: 4, isActive: allInitialPanelVisibility['TMSavedQuerySelector'] }
|
|
267
267
|
}
|
|
268
268
|
], [tmTreeSelectorElement, showSearchResults, tmRecentsManagerElement, tmSearchQueryPanelElement, tmSavedQuerySelectorElement, fromDTD, mruTIDs]);
|
|
269
|
-
return (_jsxs(_Fragment, { children: [showSearchResults ? _jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'TMRecentsManager', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true, minPanelSizePx: !isMobile ? 250 : 150 }) }) }) : tmSearchQueryPanelElement, showSearchResults && _jsx(TMSearchResult, { isVisible: isVisible && currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, floatingActionConfig: floatingActionConfig, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, openInOffice: openInOffice, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onClose: () => { onlyShowSearchQueryPanel ? setShowSearchResults(false) : setCurrentSearchView(TMSearchViews.Search); }, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, passToArchiveCallback: passToArchiveCallback, onSelectedTIDChanged: onCurrentTIDChangedCallback, showTodoDcmtForm: showTodoDcmtForm, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, inputDID: inputDID, formAutoOpen: formAutoOpen })] }));
|
|
269
|
+
return (_jsxs(_Fragment, { children: [showSearchResults ? _jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'TMRecentsManager', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true, minPanelSizePx: !isMobile ? 250 : 150 }) }) }) : tmSearchQueryPanelElement, showSearchResults && _jsx(TMSearchResult, { isVisible: isVisible && currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, floatingActionConfig: floatingActionConfig, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, openInOffice: openInOffice, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onClose: () => { onlyShowSearchQueryPanel ? setShowSearchResults(false) : setCurrentSearchView(TMSearchViews.Search); }, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, passToArchiveCallback: passToArchiveCallback, onSelectedTIDChanged: onCurrentTIDChangedCallback, showTodoDcmtForm: showTodoDcmtForm, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, inputDID: inputDID, formAutoOpen: formAutoOpen, fetchRemoteCertificates: fetchRemoteCertificates })] }));
|
|
270
270
|
};
|
|
271
271
|
export default TMSearch;
|
|
272
272
|
const TMTreeSelectorWrapper = ({ isMobile, onSelectedTIDChanged }) => {
|