@topconsultnpm/sdkui-react 6.22.0-dev1.3 → 6.22.0-dev1.31

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.
Files changed (32) hide show
  1. package/lib/components/base/TMModal.js +1 -1
  2. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
  3. package/lib/components/choosers/TMDynDataListItemChooser.js +4 -6
  4. package/lib/components/editors/TMTextBox.js +10 -5
  5. package/lib/components/features/documents/TMDcmtForm.d.ts +2 -1
  6. package/lib/components/features/documents/TMDcmtForm.js +52 -5
  7. package/lib/components/features/documents/TMMergeToPdfForm.js +1 -1
  8. package/lib/components/features/search/TMSearch.d.ts +2 -1
  9. package/lib/components/features/search/TMSearch.js +2 -2
  10. package/lib/components/features/search/TMSearchResult.d.ts +2 -1
  11. package/lib/components/features/search/TMSearchResult.js +3 -2
  12. package/lib/components/features/search/TMSignatureInfoContent.d.ts +4 -2
  13. package/lib/components/features/search/TMSignatureInfoContent.js +373 -79
  14. package/lib/components/forms/Login/TMLoginForm.d.ts +2 -0
  15. package/lib/components/forms/Login/TMLoginForm.js +17 -3
  16. package/lib/components/forms/Login/TextBox.d.ts +3 -0
  17. package/lib/components/forms/Login/TextBox.js +2 -2
  18. package/lib/components/pages/TMPage.js +3 -1
  19. package/lib/components/query/TMQueryEditor.js +1 -1
  20. package/lib/helper/SDKUI_Globals.js +22 -2
  21. package/lib/helper/grafometricSignaturesCache.d.ts +45 -0
  22. package/lib/helper/grafometricSignaturesCache.js +56 -0
  23. package/lib/helper/index.d.ts +1 -0
  24. package/lib/helper/index.js +1 -0
  25. package/lib/hooks/useDocumentOperations.d.ts +2 -1
  26. package/lib/hooks/useDocumentOperations.js +15 -15
  27. package/lib/hooks/usePreventFileDrop.js +14 -3
  28. package/lib/ts/graphometricTypes.d.ts +62 -0
  29. package/lib/ts/graphometricTypes.js +1 -0
  30. package/lib/ts/index.d.ts +1 -0
  31. package/lib/ts/index.js +1 -0
  32. package/package.json +66 -61
@@ -101,7 +101,7 @@ const TMModal = ({ resizable = true, expandable = false, isModal = true, title =
101
101
  setShowPopup(false);
102
102
  onClose && onClose();
103
103
  };
104
- return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { ref: popupRef, showCloseButton: showHeader ? showCloseButton : false, showTitle: showHeader, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing, resizeEnabled: resizable, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, toolbarItems: showHeader && expandable ? [
104
+ return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { ref: popupRef, showCloseButton: showHeader ? showCloseButton : false, showTitle: showHeader, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing && !isFullScreen, resizeEnabled: resizable && !isFullScreen, position: expandable && isFullScreen ? { my: 'center', at: 'center', of: window } : undefined, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, toolbarItems: showHeader && expandable ? [
105
105
  {
106
106
  widget: 'dxButton',
107
107
  location: 'after',
@@ -38,5 +38,7 @@ interface ITMDynDataListItemChooserFormProps extends ITMChooserFormProps<DataLis
38
38
  layoutMode?: LayoutModes;
39
39
  dynDL?: DynamicDataListDescriptor;
40
40
  searchResult?: SearchResultDescriptor;
41
+ /** Se presente, sono i parametri da passare alla query per recuperare il dataSource */
42
+ queryParamsDynDataList?: string[];
41
43
  }
42
44
  export declare const TMDynDataListItemChooserForm: (props: ITMDynDataListItemChooserFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -122,7 +122,7 @@ const TMDynDataListItemChooser = ({ tid, md, width = '100%', titleForm, openChoo
122
122
  updateIsModalOpen?.(true);
123
123
  }
124
124
  }, elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, openEditorOnSummaryClick: openChooserBySingleClick, label: label, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showChooser &&
125
- _jsx(TMDynDataListItemChooserForm, { TID: tid, MID: md?.id, dynDL: dynDl, title: titleForm, allowMultipleSelection: allowMultipleSelection, searchResult: dataSource, selectedIDs: values, onClose: () => {
125
+ _jsx(TMDynDataListItemChooserForm, { TID: tid, MID: md?.id, dynDL: dynDl, title: titleForm, allowMultipleSelection: allowMultipleSelection, searchResult: dataSource, selectedIDs: values, queryParamsDynDataList: queryParamsDynDataList, onClose: () => {
126
126
  setShowChooser(false);
127
127
  updateIsModalOpen?.(false);
128
128
  summaryInputRef.current?.focus();
@@ -167,7 +167,7 @@ const TMDynDataListItemChooser = ({ tid, md, width = '100%', titleForm, openChoo
167
167
  export default TMDynDataListItemChooser;
168
168
  const cellRenderIcon = () => _jsx(IconDetails, {});
169
169
  export const TMDynDataListItemChooserForm = (props) => {
170
- const { TID, MID, layoutMode, dynDL, searchResult, selectedIDs, title, width, height, onChoose } = props;
170
+ const { TID, MID, layoutMode, dynDL, searchResult, selectedIDs, title, width, height, onChoose, queryParamsDynDataList } = props;
171
171
  // Generate unique keys for all columns
172
172
  const uniqueKeys = generateUniqueColumnKeys(searchResult?.dtdResult?.columns, searchResult?.fromTID);
173
173
  const dataColumns = searchResult?.dtdResult?.columns?.map((col, index) => {
@@ -184,12 +184,10 @@ export const TMDynDataListItemChooserForm = (props) => {
184
184
  });
185
185
  const keyValue = uniqueKeys[dynDL?.selectItemForValue ?? 0] ?? '';
186
186
  const getItems = async (refreshCache) => {
187
- if (!searchResult)
188
- return [];
189
187
  if (refreshCache)
190
188
  DataListCacheService.RemoveAll();
191
189
  TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.DataList} ...` });
192
- let result = await SDK_Globals.tmSession?.NewSearchEngine().GetDynDataListValuesAsync(TID, MID, layoutMode, [])
190
+ let result = await SDK_Globals.tmSession?.NewSearchEngine().GetDynDataListValuesAsync(TID, MID, layoutMode, queryParamsDynDataList ?? [])
193
191
  .catch((err) => { TMSpinner.hide(); TMExceptionBoxManager.show({ exception: err }); });
194
192
  TMSpinner.hide();
195
193
  return result ? searchResultDescriptorToSimpleArray(result) ?? [] : [];
@@ -200,5 +198,5 @@ export const TMDynDataListItemChooserForm = (props) => {
200
198
  titleDataList += `: ${title}`;
201
199
  return titleDataList;
202
200
  };
203
- return (_jsx(TMChooserForm, { title: getTitle(), allowMultipleSelection: props.allowMultipleSelection, width: width, height: height, keyName: keyValue ?? '', showDefaultColumns: false, hasShowId: false, columns: dataColumns, selectedIDs: selectedIDs, cellRenderIcon: cellRenderIcon, dataSource: searchResultDescriptorToSimpleArray(searchResult) ?? [], getItems: getItems, onClose: props.onClose, onChoose: (IDs) => onChoose?.(IDs) }));
201
+ return (_jsx(TMChooserForm, { title: getTitle(), allowMultipleSelection: props.allowMultipleSelection, width: width, height: height, keyName: keyValue ?? '', showDefaultColumns: false, hasShowId: false, columns: dataColumns, selectedIDs: selectedIDs, cellRenderIcon: cellRenderIcon, getItems: getItems, onClose: props.onClose, onChoose: (IDs) => onChoose?.(IDs) }));
204
202
  };
@@ -257,14 +257,20 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
257
257
  : currentValue ?? '';
258
258
  // Calcola il padding-right necessario per evitare sovrapposizione con i bottoni
259
259
  const calculateRightPadding = () => {
260
- if (initialType === 'password')
261
- return 10; // Solo l'icona show/hide password
262
260
  let buttonCount = 0;
263
261
  if (formulaItems.length > 0)
264
262
  buttonCount++; // IconDataList
265
263
  if (showClearButton && currentValue)
266
264
  buttonCount++; // IconClearButton
267
265
  buttonCount += buttons.length; // Custom buttons
266
+ const buttonWidth = 28;
267
+ if (initialType === 'password') {
268
+ // Solo l'occhiolino se il chiamante non passa bottoni custom (comportamento invariato)
269
+ if (buttonCount === 0)
270
+ return 10;
271
+ // Occhiolino a destra + bottoni custom alla sua sinistra
272
+ return 34 + (buttonCount * buttonWidth) + 8;
273
+ }
268
274
  if (currentType === 'number') {
269
275
  // Per i number, non aggiungiamo padding-right perché le freccette native
270
276
  // occupano già spazio. Se ci sono bottoni custom a sinistra delle freccette,
@@ -273,7 +279,6 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
273
279
  }
274
280
  else {
275
281
  // Per gli altri tipi, calcolo normale
276
- const buttonWidth = 28;
277
282
  return 6 + (buttonCount * buttonWidth) + 8;
278
283
  }
279
284
  };
@@ -284,8 +289,8 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
284
289
  e.preventDefault();
285
290
  }
286
291
  onKeyDown?.(e);
287
- }, "$isMobile": deviceType === DeviceType.MOBILE, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType, "$borderRadius": borderRadius, style: { paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), initialType !== 'password' &&
288
- _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: type === 'number' ? '25px' : '6px', top: label.length > 0 ? '20px' : '3px', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
292
+ }, "$isMobile": deviceType === DeviceType.MOBILE, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType, "$borderRadius": borderRadius, style: { paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), (formulaItems.length > 0 || (showClearButton && currentValue) || buttons.length > 0) &&
293
+ _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: type === 'number' ? '25px' : (initialType === 'password' ? '34px' : '6px'), top: label.length > 0 ? '20px' : '3px', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
289
294
  _jsx(StyledTextBoxEditorButton, { onClick: () => {
290
295
  setShowFormulaItemsChooser(true);
291
296
  }, children: _jsx(IconDataList, {}) }), showClearButton && currentValue &&
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DcmtTypeDescriptor, HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
3
- import { DcmtInfo, FormModes, MetadataValueDescriptorEx, TaskContext } from '../../../ts';
3
+ import { DcmtInfo, FormModes, MetadataValueDescriptorEx, TaskContext, IGraphometricManagerProp } from '../../../ts';
4
4
  import { IntesiCertificateData } from '../../../helper';
5
5
  /**
6
6
  * Definisce il contesto da cui è stato invocato il TMDcmtForm.
@@ -85,6 +85,7 @@ interface ITMDcmtFormProps {
85
85
  onRefreshBlogDatagrid?: () => Promise<void>;
86
86
  onRefreshPreviewDatagrid?: () => Promise<void>;
87
87
  };
88
+ graphometricManager?: IGraphometricManagerProp;
88
89
  }
89
90
  declare const TMDcmtForm: React.FC<ITMDcmtFormProps>;
90
91
  export default TMDcmtForm;
@@ -57,7 +57,7 @@ export var InvocationContext;
57
57
  let abortControllerLocal = new AbortController();
58
58
  ;
59
59
  //#endregion
60
- const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMode = FormModes.Update, invocationContext = InvocationContext.Default, showHeader = true, showBackButton = true, showDcmtFormSidebar = true, isClosable = false, showTodoDcmtForm = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, isModal = false, titleModal, widthModal = "100%", heightModal = "100%", allowNavigation = true, canNext, canPrev, count, itemIndex, onNext, onPrev, inputFile = null, inputMids = [], connectorFileSave = undefined, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowRelations = true, allowButtonsRefs = false, openS4TViewer = false, enableDragDropOverlay = false, editPdfForm = false, onClose, onSavedAsyncCallback, onSaveRecents, onWFOperationCompleted, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, onTaskCompleted, onTaskCreateRequest, moreInfoTasks, taskFormDialogComponent, handleNavigateToWGs, handleNavigateToDossiers, onReferenceClick, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, s4TViewerDialogComponent, onScanRequest, passToSearch, fetchRemoteCertificates, datagridUtility }) => {
60
+ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMode = FormModes.Update, invocationContext = InvocationContext.Default, showHeader = true, showBackButton = true, showDcmtFormSidebar = true, isClosable = false, showTodoDcmtForm = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, isModal = false, titleModal, widthModal = "100%", heightModal = "100%", allowNavigation = true, canNext, canPrev, count, itemIndex, onNext, onPrev, inputFile = null, inputMids = [], connectorFileSave = undefined, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowRelations = true, allowButtonsRefs = false, openS4TViewer = false, enableDragDropOverlay = false, editPdfForm = false, onClose, onSavedAsyncCallback, onSaveRecents, onWFOperationCompleted, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, onTaskCompleted, onTaskCreateRequest, moreInfoTasks, taskFormDialogComponent, handleNavigateToWGs, handleNavigateToDossiers, onReferenceClick, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, s4TViewerDialogComponent, onScanRequest, passToSearch, fetchRemoteCertificates, datagridUtility, graphometricManager }) => {
61
61
  const { onRefreshSearchAsyncDatagrid, onRefreshBlogDatagrid, onRefreshPreviewDatagrid } = datagridUtility || {};
62
62
  const floatingBarContainerRef = useRef(null);
63
63
  const [id, setID] = useState('');
@@ -423,6 +423,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
423
423
  enablePinIcons: false,
424
424
  allowRelations,
425
425
  inputDcmtFormLayoutMode: layoutMode,
426
+ graphometricManager
426
427
  },
427
428
  tasks: {
428
429
  allTasks: allTasks,
@@ -1425,7 +1426,49 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
1425
1426
  return undefined;
1426
1427
  const settings = getCurrentDcmtFormSetting()?.setting;
1427
1428
  // Return the appropriate layout based on context
1428
- return invocationContext === InvocationContext.Todo ? settings?.layoutToDo : settings?.layout;
1429
+ const persistedState = invocationContext === InvocationContext.Todo ? settings?.layoutToDo : settings?.layout;
1430
+ // tmWF must always start hidden - PanelDisabledStateHandler will restore it
1431
+ // when workflow data becomes available and isWFDisabled becomes false
1432
+ if (persistedState && persistedState['tmWF']?.visible) {
1433
+ // Get tmWF width to redistribute
1434
+ const tmWFWidth = parseFloat(persistedState['tmWF'].width) || 0;
1435
+ // Find other visible panels to redistribute width
1436
+ const otherVisiblePanels = Object.keys(persistedState).filter(key => key !== 'tmWF' && persistedState[key]?.visible);
1437
+ // Calculate extra width per visible panel
1438
+ const extraWidthPerPanel = otherVisiblePanels.length > 0
1439
+ ? tmWFWidth / otherVisiblePanels.length
1440
+ : 0;
1441
+ // Build new state with redistributed widths
1442
+ const newState = {};
1443
+ for (const key of Object.keys(persistedState)) {
1444
+ if (key === 'tmWF') {
1445
+ // Hide tmWF
1446
+ newState[key] = { ...persistedState[key], visible: false };
1447
+ }
1448
+ else if (otherVisiblePanels.includes(key)) {
1449
+ // Add extra width to visible panels
1450
+ const currentWidth = parseFloat(persistedState[key].width) || 0;
1451
+ newState[key] = {
1452
+ ...persistedState[key],
1453
+ width: `${currentWidth + extraWidthPerPanel}%`
1454
+ };
1455
+ }
1456
+ else {
1457
+ // Keep other panels as-is
1458
+ newState[key] = persistedState[key];
1459
+ }
1460
+ }
1461
+ return newState;
1462
+ }
1463
+ return persistedState;
1464
+ };
1465
+ // Returns whether tmWF was visible in persisted state (for restoring after WF data loads)
1466
+ const getPersistedWFVisible = () => {
1467
+ if (isMobile)
1468
+ return false;
1469
+ const settings = getCurrentDcmtFormSetting()?.setting;
1470
+ const persistedState = invocationContext === InvocationContext.Todo ? settings?.layoutToDo : settings?.layout;
1471
+ return persistedState?.['tmWF']?.visible ?? false;
1429
1472
  };
1430
1473
  const onBlogCommentFormCustomSave = useCallback(async (blogPost) => {
1431
1474
  try {
@@ -1514,7 +1557,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
1514
1557
  overflow: 'hidden'
1515
1558
  }, children: [_jsxs("div", { style: { width: '100%', height: '100%', display: isOpenDetails || isOpenMaster ? 'none' : 'flex' }, children: [isNavigating && _jsx(Spinner, { description: SDKUI_Localizator.Loading, flat: false }), (fromDTD) && _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: useWaitPanelLocalState ? showWaitPanelLocal : showWaitPanel, showWaitPanelPrimary: useWaitPanelLocalState ? showPrimaryLocal : showPrimary, showWaitPanelSecondary: useWaitPanelLocalState ? showSecondaryLocal : showSecondary, waitPanelTitle: useWaitPanelLocalState ? waitPanelTitleLocal : waitPanelTitle, waitPanelTextPrimary: useWaitPanelLocalState ? waitPanelTextPrimaryLocal : waitPanelTextPrimary, waitPanelValuePrimary: useWaitPanelLocalState ? waitPanelValuePrimaryLocal : waitPanelValuePrimary, waitPanelMaxValuePrimary: useWaitPanelLocalState ? waitPanelMaxValuePrimaryLocal : waitPanelMaxValuePrimary, waitPanelTextSecondary: useWaitPanelLocalState ? waitPanelTextSecondaryLocal : waitPanelTextSecondary, waitPanelValueSecondary: useWaitPanelLocalState ? waitPanelValueSecondaryLocal : waitPanelValueSecondary, waitPanelMaxValueSecondary: useWaitPanelLocalState ? waitPanelMaxValueSecondaryLocal : waitPanelMaxValueSecondary, isCancelable: useWaitPanelLocalState ? dcmtFile ? dcmtFile.size >= 1000000 : false : true, abortController: useWaitPanelLocalState ? abortControllerLocal : abortController, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showCicoWaitPanel, showWaitPanelPrimary: showCicoPrimaryProgress, waitPanelTitle: cicoWaitPanelTitle, waitPanelTextPrimary: cicoPrimaryProgressText, waitPanelValuePrimary: cicoPrimaryProgressValue, waitPanelMaxValuePrimary: cicoPrimaryProgressMax, isCancelable: true, abortController: abortControllerLocal, children: [(groupId && groupId.length > 0)
1516
1559
  ? _jsxs(_Fragment, { children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] })
1517
- : _jsxs(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile ? hasSavedLayout() : false, persistPanelStates: !isMobile ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: getPersistedPanelStates(), children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] }), isOpenDistinctValues &&
1560
+ : _jsxs(TMPanelManagerWithPersistenceProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: defaultPanelDimensions, initialDimensions: defaultPanelDimensions, initialMobilePanelId: 'tmDcmtForm', isPersistenceEnabled: !isMobile && layoutMode !== LayoutModes.Ark ? hasSavedLayout() : false, persistPanelStates: !isMobile && layoutMode !== LayoutModes.Ark ? (state) => persistPanelStates(state) : undefined, persistedPanelStates: layoutMode !== LayoutModes.Ark ? getPersistedPanelStates() : undefined, children: [_jsx(PanelDisabledStateHandler, { isWFDisabled: isWFDisabled, isSysMetadataDisabled: isSysMetadataDisabled, isBoardDisabled: isBoardDisabled, isDcmtTasksDisabled: isDcmtTasksDisabled, isPreviewDisabled: isPreviewDisabled, persistedWFVisible: getPersistedWFVisible() }), _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showDcmtFormSidebar })] }), isOpenDistinctValues &&
1518
1561
  _jsx(TMDistinctValues, { tid: TID, mid: focusedMetadataValue?.mid, isModal: true, showHeader: false, layoutMode: layoutMode, onClosePanelCallback: () => setIsOpenDistinctValues(false), onSelectionChanged: (e) => {
1519
1562
  if (!e)
1520
1563
  return;
@@ -1604,7 +1647,7 @@ const validateMaxLength = (mvd, value, validationItems) => {
1604
1647
  };
1605
1648
  //#endregion Validation
1606
1649
  // Synchronizes panel visibility and toolbar button disabled states when panels become disabled
1607
- const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoardDisabled, isDcmtTasksDisabled, isPreviewDisabled }) => {
1650
+ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoardDisabled, isDcmtTasksDisabled, isPreviewDisabled, persistedWFVisible = false }) => {
1608
1651
  const { setPanelVisibilityById, setToolbarButtonDisabled } = useTMPanelManagerContext();
1609
1652
  useEffect(() => {
1610
1653
  if (isSysMetadataDisabled) {
@@ -1631,8 +1674,12 @@ const PanelDisabledStateHandler = ({ isWFDisabled, isSysMetadataDisabled, isBoar
1631
1674
  }
1632
1675
  else {
1633
1676
  setToolbarButtonDisabled('tmWF', false);
1677
+ // Restore persisted visibility when WF becomes enabled
1678
+ if (persistedWFVisible) {
1679
+ setPanelVisibilityById('tmWF', true);
1680
+ }
1634
1681
  }
1635
- }, [isWFDisabled]);
1682
+ }, [isWFDisabled, persistedWFVisible]);
1636
1683
  useEffect(() => {
1637
1684
  if (isDcmtTasksDisabled) {
1638
1685
  setToolbarButtonDisabled('tmDcmtTasks', true);
@@ -323,7 +323,7 @@ const TMMergeToPdfForm = (props) => {
323
323
  const extLabel = Array.from(extCounts.entries()).map(([ext, count]) => `${count} ${ext}`).join(', ');
324
324
  return (_jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: '6px' }, children: [_jsx("span", { children: allConvertible.length === 1
325
325
  ? SDKUI_Localizator.DocumentWillBeConvertedDuringMerge
326
- : SDKUI_Localizator.DocumentsWillBeConvertedDuringMerge.replaceParams(allConvertible.length.toString()) }), extLabel && (_jsx(TMTooltip, { content: _jsxs("div", { style: { minWidth: 180, padding: "10px 12px", borderRadius: 8 }, children: [_jsxs("div", { style: { textAlign: "center", fontWeight: 600, fontSize: 13, marginBottom: 10, paddingBottom: 8, borderBottom: "1px solid rgba(255,255,255,0.15)" }, children: [SDKUI_Localizator.ConversionDetails, " (", Array.from(extCounts.values()).reduce((a, b) => a + b, 0), ")"] }), _jsx("div", { style: { display: "flex", flexDirection: "column", gap: 4, maxHeight: 150, overflowY: "auto" }, children: Array.from(extCounts.entries()).sort((a, b) => a[0].localeCompare(b[0])).map(([ext, count]) => (_jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "4px 8px", background: "rgba(255,255,255,0.08)", borderRadius: 4 }, children: [_jsx("span", { style: { fontSize: 11, fontWeight: 500, textTransform: "uppercase" }, children: ext }), _jsx("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", minWidth: 24, height: 24, padding: "0 6px", background: "transparent", border: "2px solid #4caf50", borderRadius: 12, fontSize: 11, fontWeight: 600, lineHeight: 1 }, children: count > 99 ? '99+' : count })] }, ext))) })] }), children: _jsx("span", { style: { display: 'inline-flex', alignItems: 'center', cursor: 'help' }, children: _jsx("i", { className: "dx-icon-info", style: { fontSize: '16px', color: '#00527a' } }) }) }))] }));
326
+ : SDKUI_Localizator.DocumentsWillBeConvertedDuringMerge.replaceParams(allConvertible.length.toString()) }), extLabel && (_jsx(TMTooltip, { content: _jsxs("div", { style: { minWidth: 180, padding: "10px 12px", borderRadius: 8 }, children: [_jsxs("div", { style: { textAlign: "center", fontWeight: 600, fontSize: 13, marginBottom: 10, paddingBottom: 8, borderBottom: "1px solid rgba(255,255,255,0.15)" }, children: [SDKUI_Localizator.ConversionDetails, " (", Array.from(extCounts.values()).reduce((a, b) => a + b, 0), ")"] }), _jsx("div", { style: { display: "flex", flexDirection: "column", gap: 4, maxHeight: 150, overflowY: "auto" }, children: Array.from(extCounts.entries()).sort((a, b) => a[0].localeCompare(b[0])).map(([ext, count]) => (_jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "4px 8px", background: "rgba(255,255,255,0.08)", borderRadius: 4 }, children: [_jsx("span", { style: { fontSize: 11, fontWeight: 500, textTransform: "uppercase" }, children: ext }), _jsx("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", minWidth: 24, height: 24, padding: "0 6px", background: "transparent", border: "2px solid #4caf50", borderRadius: 12, fontSize: 11, fontWeight: 600, lineHeight: 1 }, children: count > 99 ? '99+' : count })] }, ext))) })] }), children: _jsx("span", { style: { display: 'inline-flex', alignItems: 'center' }, children: _jsx("i", { className: "dx-icon-info", style: { fontSize: '16px', color: '#00527a' } }) }) }))] }));
327
327
  })() })), hasPdfSelected && (_jsx("li", { style: { color: '#00527a' }, children: pdfSelectedItems.length === 1
328
328
  ? SDKUI_Localizator.DocumentAlreadyInPdfNoConversionNeeded
329
329
  : SDKUI_Localizator.DocumentsAlreadyInPdfNoConversionNeeded.replaceParams(pdfSelectedItems.length.toString()) })), !hasEnoughPdfForMerge && (_jsx("li", { style: { color: '#7a5d00' }, children: mergeableSelectedCount === 0
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SavedQueryDescriptor, DcmtTypeDescriptor, TaskDescriptor, ObjectRef, HomeBlogPost } from '@topconsultnpm/sdk-ts';
3
3
  import { IntesiCertificateData } from '../../../helper';
4
- import { DcmtInfo, TaskContext } from '../../../ts';
4
+ import { DcmtInfo, IGraphometricManagerProp, TaskContext } from '../../../ts';
5
5
  import { TMSearchResultFloatingActionConfig } from './TMSearchResultFloatingActionButton';
6
6
  interface ITMSearchProps {
7
7
  allTasks?: Array<TaskDescriptor>;
@@ -44,6 +44,7 @@ interface ITMSearchProps {
44
44
  inputDID?: number;
45
45
  formAutoOpen?: boolean;
46
46
  fetchRemoteCertificates?: (email: string) => Promise<IntesiCertificateData[]>;
47
+ graphometricManager?: IGraphometricManagerProp;
47
48
  }
48
49
  declare const TMSearch: React.FunctionComponent<ITMSearchProps>;
49
50
  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, fetchRemoteCertificates }) => {
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, graphometricManager }) => {
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, fetchRemoteCertificates: fetchRemoteCertificates })] }));
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, graphometricManager: graphometricManager })] }));
270
270
  };
271
271
  export default TMSearch;
272
272
  const TMTreeSelectorWrapper = ({ isMobile, onSelectedTIDChanged }) => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DcmtTypeDescriptor, HomeBlogPost, ObjectRef, SearchResultDescriptor, TaskDescriptor, WorkingGroupDescriptor } from '@topconsultnpm/sdk-ts';
3
3
  import { IntesiCertificateData } from '../../../helper';
4
- import { DcmtInfo, SearchResultContext, TaskContext } from '../../../ts';
4
+ import { DcmtInfo, IGraphometricManagerProp, SearchResultContext, TaskContext } from '../../../ts';
5
5
  import { TMSearchResultFloatingActionConfig } from './TMSearchResultFloatingActionButton';
6
6
  export declare const getSearchResultCountersSingleCategory: (searchResults: SearchResultDescriptor[]) => string;
7
7
  interface ITMSearchResultProps {
@@ -53,6 +53,7 @@ interface ITMSearchResultProps {
53
53
  openCommentFormCallback?: (documents: Array<DcmtInfo>) => void;
54
54
  openAddDocumentForm?: () => void;
55
55
  fetchRemoteCertificates?: (email: string) => Promise<IntesiCertificateData[]>;
56
+ graphometricManager?: IGraphometricManagerProp;
56
57
  allTasks?: Array<TaskDescriptor>;
57
58
  getAllTasks?: () => Promise<void>;
58
59
  deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
@@ -61,7 +61,7 @@ openInOffice, onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid, onSelec
61
61
  // Tasks
62
62
  allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback,
63
63
  // Navigation
64
- handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, }) => {
64
+ handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, graphometricManager, }) => {
65
65
  // Ref for the floating bar container (used to position the floating action buttons)
66
66
  const floatingBarContainerRef = useRef(null);
67
67
  // Ref per tracciare se autoFocusFirstRow=false deve bloccare l'auto-focus.
@@ -341,7 +341,8 @@ handleNavigateToWGs, handleNavigateToDossiers, fetchRemoteCertificates, }) => {
341
341
  allowFloatingBar,
342
342
  enablePinIcons,
343
343
  allowRelations,
344
- showTodoDcmtForm
344
+ showTodoDcmtForm,
345
+ graphometricManager,
345
346
  },
346
347
  tasks: {
347
348
  allTasks: allTasks,
@@ -1,6 +1,8 @@
1
- import { DcmtInfo } from "../../../ts";
1
+ import { DcmtInfo, IGraphometricManagerProp } from "../../../ts";
2
2
  interface TMSignatureInfoContentProps {
3
3
  inputDcmt: DcmtInfo;
4
+ graphometricManager?: IGraphometricManagerProp;
5
+ onClose?: () => void;
4
6
  }
5
- declare const TMSignatureInfoContent: (props: TMSignatureInfoContentProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ declare const TMSignatureInfoContent: (props: TMSignatureInfoContentProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export default TMSignatureInfoContent;