@topconsultnpm/sdkui-react 6.21.0-dev2.40 → 6.21.0-dev2.42

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.
@@ -341,6 +341,6 @@ const TMCopyToFolderForm = ({ mode, selectedDcmtInfos, onClose, showTMRelationVi
341
341
  e.target.style.backgroundImage = 'none';
342
342
  e.target.style.borderBottom = `1px solid ${TMColors.border_normal}`;
343
343
  } })] }), _jsx(TMCheckBox, { label: "Rimuovi la firma se presente", value: settings.removeSignature, onValueChanged: (value) => updateSettings('removeSignature', value) })] }), _jsxs("div", { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))', gap: '12px' }, children: [_jsx(TMInvoiceRetrieveFormats, { width: '100%', label: SDKUI_Localizator.ElectronicInvoice + ' - ' + SDKUI_Localizator.DisplayFormat, onValueChanged: (newValue) => updateSettings('invoiceFormat', newValue), value: settings.invoiceFormat, valueOrig: settings.invoiceFormat }), _jsx(TMOrderRetrieveFormats, { width: '100%', label: SDKUI_Localizator.ElectronicOrder + ' - ' + SDKUI_Localizator.DisplayFormat, value: settings.orderFormat, valueOrig: settings.orderFormat, onValueChanged: (newValue) => updateSettings('orderFormat', newValue) })] })] })] }));
344
- return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '780px', showTMRelationViewer ? '95%' : '780px', '95%'), height: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '450px', showTMRelationViewer ? '95%' : '450px', '95%'), title: getTitle(), onClose: onClose, showCloseButton: true, children: _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: _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { display: 'flex', flexDirection: 'column', padding: '4px', width: '100%', height: '100%', boxSizing: 'border-box', overflow: 'hidden' }, children: [showTMRelationViewer ? (_jsx("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' }, children: _jsxs(TMSplitterLayout, { direction: 'vertical', showSeparator: true, separatorSize: 8, separatorColor: 'transparent', separatorActiveColor: 'transparent', overflow: 'hidden', min: SPLITTER_MIN, start: SPLITTER_START_60_40, children: [_jsx(TMDownloadRelationViewerSection, { selectedDcmtInfos: selectedDcmtInfos, onSelectionChanged: setSelectedItemsRelationViewer, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), configSection] }, "TMCopyToFolder-relation-config") })) : (configSection), _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0, marginTop: '12px' }, children: _jsx(TMButton, { caption: "Esegui", icon: _jsx(IconPlay, {}), color: 'success', showTooltip: false, disabled: !isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0), onClick: run }) })] }) }) }));
344
+ return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '780px', showTMRelationViewer ? '95%' : '780px', '95%'), height: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '450px', showTMRelationViewer ? '95%' : '450px', '95%'), title: getTitle(), onClose: onClose, showCloseButton: true, children: _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: _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { display: 'flex', flexDirection: 'column', padding: '4px 4px 16px 4px', width: '100%', height: '100%', boxSizing: 'border-box', overflow: 'hidden' }, children: [showTMRelationViewer ? (_jsx("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' }, children: _jsxs(TMSplitterLayout, { direction: 'vertical', showSeparator: true, separatorSize: 8, separatorColor: 'transparent', separatorActiveColor: 'transparent', overflow: 'hidden', min: SPLITTER_MIN, start: SPLITTER_START_60_40, children: [_jsx(TMDownloadRelationViewerSection, { selectedDcmtInfos: selectedDcmtInfos, onSelectionChanged: setSelectedItemsRelationViewer, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), configSection] }, "TMCopyToFolder-relation-config") })) : (configSection), _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0, marginTop: '12px' }, children: _jsx(TMButton, { caption: "Esegui", icon: _jsx(IconPlay, {}), color: 'success', showTooltip: false, disabled: !isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0), onClick: run }) })] }) }) }));
345
345
  };
346
346
  export default TMCopyToFolderForm;
@@ -427,6 +427,14 @@ handleNavigateToWGs, handleNavigateToDossiers, }) => {
427
427
  if (targetItem && focusedItem?.DID != inputDID) {
428
428
  setFocusedItem(targetItem);
429
429
  }
430
+ else if (!targetItem) {
431
+ ShowAlert({
432
+ message: `${SDKUI_Localizator.NoDcmtFound} (DID: ${inputDID})`,
433
+ mode: "warning",
434
+ title: 'External link',
435
+ duration: 5000
436
+ });
437
+ }
430
438
  }, [inputDID, visibleItems]);
431
439
  // Quando inputDID e formAutoOpen sono forniti, apri automaticamente il form del documento
432
440
  useEffect(() => {
@@ -206,8 +206,15 @@ const TMLoginForm = (props) => {
206
206
  if (!props.defaultLoginValues)
207
207
  return;
208
208
  const matchingEndpoint = props.endpoints.find(ep => ep.URL === props.defaultLoginValues.endpoint);
209
- if (!matchingEndpoint)
209
+ if (!matchingEndpoint) {
210
+ ShowAlert({
211
+ message: "Endpoint non trovato",
212
+ mode: "warning",
213
+ title: "External link",
214
+ duration: 5000
215
+ });
210
216
  return;
217
+ }
211
218
  setEndpoint(matchingEndpoint);
212
219
  if (props.defaultLoginValues.archiveId)
213
220
  setManualArchiveID(props.defaultLoginValues.archiveId);
@@ -234,8 +241,8 @@ const TMLoginForm = (props) => {
234
241
  setDcmtArchive(undefined);
235
242
  }, [isSuccess]);
236
243
  useEffect(() => {
237
- // Skip default endpoint
238
- if (props.defaultLoginValues && props.endpoints.some(ep => ep.URL === props.defaultLoginValues.endpoint))
244
+ // Skip all default endpoint logic when defaultLoginValues is defined (external link)
245
+ if (props.defaultLoginValues)
239
246
  return;
240
247
  let preferredRapidAccess = localRa?.find(ar => ar.preferred === true);
241
248
  if (preferredRapidAccess) {
@@ -276,6 +283,13 @@ const TMLoginForm = (props) => {
276
283
  setLoginStep(2);
277
284
  }
278
285
  catch (e) {
286
+ ShowAlert({
287
+ message: "Archive id non valido",
288
+ mode: "warning",
289
+ title: "External link",
290
+ duration: 5000
291
+ });
292
+ setManualArchiveID('');
279
293
  TMExceptionBoxManager.show({ exception: e });
280
294
  }
281
295
  finally {
@@ -440,6 +454,9 @@ const TMLoginForm = (props) => {
440
454
  if (!archives)
441
455
  return;
442
456
  setDcmtArchives(archives);
457
+ // Skip auto-selection when defaultLoginValues provides an archiveId (external link)
458
+ if (props.defaultLoginValues?.archiveId)
459
+ return;
443
460
  if (archives.length === 1) {
444
461
  setDcmtArchive(archives[0]);
445
462
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev2.40",
3
+ "version": "6.21.0-dev2.42",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",