@topconsultnpm/sdkui-react-beta 6.11.0 → 6.11.2
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
|
-
export interface
|
|
1
|
+
export interface TMWGsDraftThumbViewItemProps {
|
|
2
2
|
item: FileItem;
|
|
3
3
|
isSelected: boolean;
|
|
4
4
|
showId: boolean;
|
|
@@ -72,7 +72,7 @@ export interface TMFileManagerProps {
|
|
|
72
72
|
/** Callback for handling drop file */
|
|
73
73
|
handleDropFileCallback?: (files: Array<File>) => void;
|
|
74
74
|
/** JSX element representing the thumbnail view item for a file or folder */
|
|
75
|
-
thumbnailsViewItemComponent?: (props:
|
|
75
|
+
thumbnailsViewItemComponent?: (props: TMWGsDraftThumbViewItemProps) => JSX.Element;
|
|
76
76
|
}
|
|
77
77
|
declare const TMFileManager: (props: TMFileManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
78
78
|
export default TMFileManager;
|
|
@@ -6,7 +6,8 @@ export interface ITMToolbarCardProps extends ITMRightSidebarProps {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
showHeader?: boolean;
|
|
8
8
|
title?: string;
|
|
9
|
-
|
|
9
|
+
displayedItemsCount?: number;
|
|
10
|
+
totalItems?: number;
|
|
10
11
|
toolbar?: any;
|
|
11
12
|
padding?: string;
|
|
12
13
|
onBack?: () => void;
|
|
@@ -43,9 +43,9 @@ const StyledSearchCardContent = styled.div `
|
|
|
43
43
|
position: relative;
|
|
44
44
|
user-select: none;
|
|
45
45
|
`;
|
|
46
|
-
const TMToolbarCard = ({ items = [], onItemClick, selectedItem, showPanel, color = TMColors.colorHeader, backgroundColor = TMColors.backgroundColorHeader, children, showHeader = true, title,
|
|
46
|
+
const TMToolbarCard = ({ items = [], onItemClick, selectedItem, showPanel, color = TMColors.colorHeader, backgroundColor = TMColors.backgroundColorHeader, children, showHeader = true, title, totalItems, displayedItemsCount, toolbar, padding = '3px', onBack, onClose, onHeaderDoubleClick }) => {
|
|
47
47
|
return (_jsxs(StyledSearchCard, { children: [showHeader && _jsx(StyledSearchCardHeader, { "$backgroundColor": backgroundColor, "$color": color, onDoubleClick: () => { if (onHeaderDoubleClick)
|
|
48
|
-
onHeaderDoubleClick(); }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '8px' }, children: [onBack && _jsx(TMButton, { btnStyle: 'icon', icon: _jsx("div", { style: { backgroundColor: 'white', minWidth: '24px', minHeight: '24px', borderRadius: '24px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(IconArrowLeft, { color: TMColors.primaryColor }) }), caption: 'Torna indietro', onClick: onBack }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' }, children: [_jsx("p", { children: title }),
|
|
48
|
+
onHeaderDoubleClick(); }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '8px' }, children: [onBack && _jsx(TMButton, { btnStyle: 'icon', icon: _jsx("div", { style: { backgroundColor: 'white', minWidth: '24px', minHeight: '24px', borderRadius: '24px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(IconArrowLeft, { color: TMColors.primaryColor }) }), caption: 'Torna indietro', onClick: onBack }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' }, children: [_jsx("p", { children: title }), displayedItemsCount && displayedItemsCount > 0 ? _jsx(StyledBadge, { "$backgroundColor": '#679CE8', children: displayedItemsCount }) : _jsx(_Fragment, {}), displayedItemsCount && displayedItemsCount > 0 && totalItems && totalItems > 0 && _jsx("div", { children: "/" }), totalItems ? _jsx(StyledBadge, { "$backgroundColor": '#679CE8', children: totalItems }) : _jsx(_Fragment, {})] })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: '5px' }, children: [toolbar, onClose && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Close, icon: _jsx("i", { className: 'dx-icon-remove', style: { color: "white" } }), btnStyle: 'icon', onClick: () => onClose?.() })] })] }) }), _jsxs(StyledSearchCardContent, { "$height": showHeader ? "calc(100% - 35px)" : "100%", "$padding": padding, "$backgroundColor": `${TMColors.backgroundColorHeader}12`, children: [_jsx("div", { style: { width: items.length > 0 ? 'calc(100% - 30px)' : '100%' }, children: children }), items.length > 0 &&
|
|
49
49
|
_jsx(TMRightSidebar, { items: items, onItemClick: onItemClick, selectedItem: selectedItem, showPanel: showPanel })] })] }));
|
|
50
50
|
};
|
|
51
51
|
export default TMToolbarCard;
|