@topconsultnpm/sdkui-react 6.21.0-dev2.11 → 6.21.0-dev2.12
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.
|
@@ -327,7 +327,7 @@ const TMSearchQueryPanel = ({ fromDTD, showBackToResultButton, isExpertMode = SD
|
|
|
327
327
|
return (_jsxs(_Fragment, { children: [_jsxs(TMPanel, { title: fromDTD?.nameLoc ?? SDKUI_Localizator.Search_Metadata, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, onBack: onBack, onActiveChanged: handlePanelActiveChanged, toolbar: _jsx(_Fragment, { children: (SQD && !showSqdForm) ?
|
|
328
328
|
_jsx(ContextMenu, { items: contextMenuItems, trigger: "left", children: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, { color: 'white' }), showTooltip: false, onClick: () => setIsQueryPanelActive(true) }) })
|
|
329
329
|
: _jsx(_Fragment, {}) }), children: [_jsx(ConfirmQueryParamsDialog, {}), SQD
|
|
330
|
-
? _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { height: '100%', width: '100%', position: 'relative', display: 'flex', flexDirection: 'column', gap: 5 }, children: [showAdvancedSearch
|
|
330
|
+
? _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { height: '100%', width: '100%', position: 'relative', display: showSqdForm ? 'none' : 'flex', flexDirection: 'column', gap: 5 }, children: [showAdvancedSearch
|
|
331
331
|
? _jsx(TMQueryEditor, { formMode: FormModes.Update, showToolbar: false, inputData: qd, validateSelect: true, showApply: false, onQDChanged: handleQdChanged, updateIsModalOpen: updateIsModalOpen })
|
|
332
332
|
: _jsx(TMSearchQueryEditor, { qd: qd, dcmtTypesList: dcmtTypesList, isExpertMode: isExpertMode, showAllMdWhere: showAllMdWhere, onQdChanged: handleQdChanged, onFocusedMetadataChanged: setFocusedTidMid, onAdvancedMenuClick: handleAdvancedMenuClick, updateIsModalOpen: updateIsModalOpen }), _jsxs("div", { style: {
|
|
333
333
|
display: 'flex',
|
|
@@ -175,14 +175,11 @@ export const parseQueryDescriptorXml = (xmlString) => {
|
|
|
175
175
|
return SearchEngine.NormalizeQueryDescriptor(queryDescriptor);
|
|
176
176
|
};
|
|
177
177
|
export const serializeQueryDescriptorXml = async (qd) => {
|
|
178
|
-
// try {
|
|
179
178
|
if (!qd)
|
|
180
179
|
return '';
|
|
180
|
+
// Per compatibilità con V5, assicurati che ogni JoinItem abbia un alias (anche se vuoto) prima della serializzazione,
|
|
181
|
+
// poiché la logica di serializzazione potrebbe aspettarsi questa proprietà.
|
|
182
|
+
qd.join?.forEach(join => { join.alias ??= ""; });
|
|
181
183
|
let xml = await SDK_Globals.tmSession?.NewDcmtPlatformEngine().UtilsSerializeQdAsync(qd) ?? '';
|
|
182
184
|
return xml;
|
|
183
|
-
// } catch (error) {
|
|
184
|
-
// console.error('Error serializing QueryDescriptor to XML:', error);
|
|
185
|
-
//TODO: gestire errore
|
|
186
|
-
// return '';
|
|
187
|
-
// }
|
|
188
185
|
};
|