@topconsultnpm/sdkui-react 6.19.0-dev1.22 → 6.19.0-dev1.24
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.
|
@@ -332,15 +332,16 @@ const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMul
|
|
|
332
332
|
if (input) {
|
|
333
333
|
input.indeterminate = isIndeterminate(node);
|
|
334
334
|
}
|
|
335
|
-
} })), _jsx("div", { style: { display: 'flex', alignItems: 'center', flex: 1,
|
|
335
|
+
} })), _jsx("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, onClick: (e) => { handleNodeClick(node, e); }, children: itemRender(node) })] }), node.expanded && node.items && (_jsxs("div", { style: { paddingLeft: 20, width: '100%' }, children: [renderTree(getVisibleItems(node)), needsLoadMoreButton(node) && (_jsx("div", { style: { display: 'flex', justifyContent: 'center', margin: '5px 0' }, children: _jsx(TMButton, { onClick: () => handleLoadMoreItems(node.key), showTooltip: false, caption: `Carica altri ${itemsPerPage}... (${node.visibleItemsCount ?? itemsPerPage} / ${node.items?.length ?? 0})` }) }))] }))] }, node.key)));
|
|
336
336
|
}, [handleNodeClick, handleNodeToggle, handleCheckboxChange, focusedItem, selectedItems, allowMultipleSelection, getVisibleItems, needsLoadMoreButton, handleLoadMoreItems, itemsPerPage]);
|
|
337
|
-
return (_jsx("div", { style: { height: '100%', width: '100%', overflowY: 'auto', padding: '0px 5px 2px 2px' }, children: renderTree(dataSource) }));
|
|
337
|
+
return (_jsx("div", { style: { height: '100%', width: '100%', overflowY: 'auto', overflowX: 'hidden', padding: '0px 5px 2px 2px' }, children: renderTree(dataSource) }));
|
|
338
338
|
};
|
|
339
339
|
export default TMTreeView;
|
|
340
340
|
export const StyledTreeNode = styled.div `
|
|
341
341
|
display: flex;
|
|
342
342
|
flex-direction: row;
|
|
343
343
|
width: 100%;
|
|
344
|
+
min-width: 0;
|
|
344
345
|
min-height: 22px;
|
|
345
346
|
max-height: 30px;
|
|
346
347
|
gap: 5px;
|
|
@@ -620,13 +620,26 @@ const TMRelationViewer = ({ inputDcmts, isForMaster = false, showCurrentDcmtIndi
|
|
|
620
620
|
? { ...defaultDocumentStyle, ...customDocumentStyle(item) }
|
|
621
621
|
: defaultDocumentStyle;
|
|
622
622
|
const defaultMetadataContent = item.values && (_jsx(StyledDivHorizontal, { style: {
|
|
623
|
-
whiteSpace: 'nowrap',
|
|
624
|
-
textOverflow: 'ellipsis',
|
|
625
623
|
fontSize: '1rem',
|
|
624
|
+
overflow: 'hidden',
|
|
625
|
+
flex: 1,
|
|
626
|
+
minWidth: 0,
|
|
627
|
+
whiteSpace: 'nowrap'
|
|
626
628
|
}, children: getDcmtDisplayValue(item.values).map((key, index) => {
|
|
627
629
|
const md = item.values?.[key]?.md;
|
|
628
630
|
const value = item.values?.[key]?.value;
|
|
629
|
-
|
|
631
|
+
const displayValues = getDcmtDisplayValue(item.values);
|
|
632
|
+
const isLast = index === displayValues.length - 1;
|
|
633
|
+
return (_jsxs(StyledDivHorizontal, { style: {
|
|
634
|
+
flexShrink: isLast ? 1 : 0,
|
|
635
|
+
minWidth: isLast ? 0 : 'auto',
|
|
636
|
+
overflow: isLast ? 'hidden' : 'visible'
|
|
637
|
+
}, children: [index > 0 && _jsx("span", { style: { margin: '0 5px', color: '#999' }, children: "\u2022" }), showMetadataNames && (_jsxs("span", { style: { color: '#666', marginRight: '5px' }, children: [md?.name || key, ":"] })), md?.dataDomain === MetadataDataDomains.DataList ? (_jsx(TMDataListItemViewer, { dataListId: md.dataListID, viewMode: md.dataListViewMode, value: value })) : md?.dataDomain === MetadataDataDomains.UserID ? (_jsx(TMUserIdViewer, { userId: value, showIcon: true, noneSelectionText: '' })) : (_jsx("span", { style: {
|
|
638
|
+
fontWeight: 500,
|
|
639
|
+
overflow: isLast ? 'hidden' : 'visible',
|
|
640
|
+
textOverflow: isLast ? 'ellipsis' : 'clip',
|
|
641
|
+
whiteSpace: 'nowrap'
|
|
642
|
+
}, children: value }))] }, `${key}_${index}`));
|
|
630
643
|
}) }));
|
|
631
644
|
const metadataContent = customDocumentContent
|
|
632
645
|
? customDocumentContent(item, defaultMetadataContent || _jsx(_Fragment, {}))
|