@topconsultnpm/sdkui-react-beta 6.8.21 → 6.8.23

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.
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  interface TMTreeDropDownProps {
3
3
  dataSource: Array<{
4
4
  id: number;
@@ -6,6 +6,7 @@ interface TMTreeDropDownProps {
6
6
  value: string;
7
7
  categoryId?: number;
8
8
  expanded?: boolean;
9
+ tooltipContent?: ReactNode;
9
10
  }>;
10
11
  values: Array<number>;
11
12
  setValues: React.Dispatch<React.SetStateAction<Array<number>>>;
@@ -54,6 +54,10 @@ const TMTreeDropDown = (props) => {
54
54
  return value.toString();
55
55
  return SDKUI_Localizator.Filters + " (" + value.length + ")";
56
56
  }, []);
57
- return _jsx(TMTooltip, { content: getLabelsByIds(values, 'formatted'), children: _jsx(DropDownBox, { width: "100%", style: elementStyle, valueExpr: "id", displayExpr: "label", displayValueFormatter: displayValueFormatter, value: values, dataSource: dataSource, placeholder: SDKUI_Localizator.SelectDesiredFilters, onContentReady: syncTreeViewSelection, focusStateEnabled: true, contentRender: () => _jsx(TreeView, { ref: treeViewRef, keyExpr: "id", dataSource: dataSource, selectByClick: true, selectNodesRecursive: true, selectionMode: "multiple", displayExpr: "label", parentIdExpr: "categoryId", dataStructure: "plain", showCheckBoxesMode: "normal", onContentReady: syncTreeViewSelection, onItemSelectionChanged: (e) => treeViewItemSelectionChanged(e) }) }) });
57
+ const renderTreeViewItem = (item) => {
58
+ // Customize how tree view items are rendered with a tooltip
59
+ return (item.tooltipContent ? _jsx(TMTooltip, { content: item.tooltipContent, children: item.label }) : item.label);
60
+ };
61
+ return _jsx(TMTooltip, { content: getLabelsByIds(values, 'formatted'), children: _jsx(DropDownBox, { width: "100%", style: elementStyle, valueExpr: "id", displayExpr: "label", displayValueFormatter: displayValueFormatter, value: values, dataSource: dataSource, placeholder: SDKUI_Localizator.SelectDesiredFilters, onContentReady: syncTreeViewSelection, focusStateEnabled: true, contentRender: () => _jsx(TreeView, { ref: treeViewRef, keyExpr: "id", dataSource: dataSource, selectByClick: true, selectNodesRecursive: true, selectionMode: "multiple", displayExpr: "label", parentIdExpr: "categoryId", dataStructure: "plain", showCheckBoxesMode: "normal", onContentReady: syncTreeViewSelection, onItemSelectionChanged: (e) => treeViewItemSelectionChanged(e), itemRender: renderTreeViewItem }) }) });
58
62
  };
59
63
  export default TMTreeDropDown;
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { ResultTypes } from '@topconsultnpm/sdk-ts-beta';
3
3
  export type ResultInfo = {
4
4
  rowIndex: number;
5
- id1: number;
6
- id2: number;
5
+ id1: number | undefined;
6
+ id2: number | undefined;
7
7
  resultType: ResultTypes;
8
8
  description?: any;
9
9
  };
@@ -10,7 +10,7 @@ import { FormModes } from '../../ts';
10
10
  import { TMColors } from '../../utils/theme';
11
11
  import { StyledDivHorizontal, StyledDraggableDiv, StyledModalContainer } from '../base/Styled';
12
12
  import TMButton from '../base/TMButton';
13
- import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../base/TMPopUp';
13
+ import { TMExceptionBoxManager } from '../base/TMPopUp';
14
14
  import TMSpinner from '../base/TMSpinner';
15
15
  import { TMTabItemBadge } from '../base/TMTab';
16
16
  import TMTooltip from '../base/TMTooltip';
@@ -626,7 +626,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, runQdImmediately = fa
626
626
  let result = await SDK_Globals.tmSession?.NewSearchEngine().SearchByIDAsync(qd);
627
627
  let dcmtsFound = result?.dcmtsFound ?? 0;
628
628
  if (dcmtsFound <= 0)
629
- TMMessageBoxManager.show({ title: SDK_Globals.appModule, message: "Nessun documento trovato", buttons: [ButtonNames.OK] });
629
+ ShowAlert({ message: "Nessun documento trovato", mode: 'info', title: "Risultato ricerca", duration: 3000 });
630
630
  else {
631
631
  setElapsedTime(new Date().getTime() - startTime);
632
632
  setResultSearch(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.8.21",
3
+ "version": "6.8.23",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",